App Compatibility Services crashes for WhatsApp Device Attestation and WhatsApp registration cannot complete on Fairphone 3 (/e/OS 4.1.1)

I am experiencing two issues on the same device which may or may not be related:

  1. App Compatibility Services crashes reproducibly when opening the WhatsApp entry under Settings → System → Device Attestation.

  2. WhatsApp cannot complete the initial registration. After entering the phone number and pressing Connect, the app attempts to connect for approximately 4–5 seconds before silently returning to the phone number screen without any error message.

I collected logcat traces for both issues.


Device

  • Device: Fairphone 3

  • /e/OS version: 4.1.1

  • Android: 15

  • App Compatibility Services: 0.3.15.252432-72


WhatsApp registration issue

Steps to reproduce

  1. Install WhatsApp (tested with both App Lounge and the official APK).

  2. Open WhatsApp.

  3. Enter phone number.

  4. Press Connect.

Expected behavior

Registration continues with SMS or phone verification.

Actual behavior

  • WhatsApp displays “Connecting” for approximately 4–5 seconds.

  • It then silently returns to the phone number entry screen.

  • No SMS verification starts.

  • No error message is shown.


Device Attestation crash

Steps to reproduce

  1. Open Settings

  2. Navigate to System → Device Attestation

  3. Tap the WhatsApp entry

Expected behavior

The WhatsApp Device Attestation settings should open.

Actual behavior

Immediately afterwards Android reports:

“App Compatibility Services keeps stopping”

The crash is reproducible every time.

Interestingly, this only happens for WhatsApp. Other entries under Device Attestation open normally.


Additional observations

  • All App Compatibility Services / microG self-checks pass.

  • Network connectivity is working.

  • The problem is identical with:

    • App Lounge version

    • official APK downloaded

  • DroidGuard mode:

    • Embedded
  • “Block hardware attestation” is enabled (default configuration).


Relevant logcat observations

During the WhatsApp registration:

  • Express Device Integrity is requested.

  • An integrity token is generated successfully.

  • WhatsApp receives a RegistrationVerification push message.

  • microG successfully delivers the message to WhatsApp.

There are no obvious TLS, network, SecurityException or Play Integrity failures visible in the log.


The Device Attestation crash consistently produces the following exception:

java.lang.ClassCastException:
androidx.preference.SwitchPreference
cannot be cast to
androidx.preference.SwitchPreferenceCompat

Stack trace:

org.microg.gms.ui.SafetyNetAppFragment.onBindPreferences(
    SafetyNetAppFragment.kt:43
)

Android then force-finishes:

com.google.android.gms/org.microg.gms.ui.SettingsActivity


Related community discussions

This appears to be related to several recent community reports regarding WhatsApp activation:

Although my device is a Fairphone 3 running /e/OS 4.1.1, the observed behavior appears to be very similar.

I’d appreciate any help.

  • WhatsApp displays “Connecting” for approximately 4–5 seconds.
  • It then silently returns to the phone number entry screen.

you’d need to wait for v4.2 .. the gitlab issue has details similar to yours

Thanks a lot @tcecyk for pointing me to the the other forum post and the issue. I obviously didn’t check carefully enough.
Let’s hope v4.2 won’t take too long.

That ClassCastException is a clear microG bug, SwitchPreference being cast to SwitchPreferenceCompat in SafetyNetAppFragment, so the attestation crash is on their side and worth filing upstream. The registration failure looks separate despite the integrity token succeeding. Since it silently loops back after receiving the verification push, it might be a microG delivery timing issue. Your logcat detail is excellent, definitely link it in the existing Fairphone 6 threads.