Android – GetPushNotificationToken returns FIS_AUTH_ERROR in Native Mobile app (FCM configured)

0
Hi everyone,I'm currently implementing push notifications in a Mendix Native Mobile application using Firebase Cloud Messaging.Everything works correctly(just for token generation) on iOS, but on Android, the action GetPushNotificationToken does not return a token and instead throws the following error:ERROR: [messaging/unknown] java.io.IOException: java.util.concurrent.ExecutionException: java.io.IOException: FIS_AUTH_ERROR ContextMendix Native Mobile appUsing Firebase Cloud MessagingiOS token is generated correctlyAndroid returns empty token with FIS_AUTH_ERRORTesting on real Android deviceUsing custom native build (not only Make It Native)Each app environment has its own Firebase project:MakeItNative → separate Firebase projectFleet Acceptance → own Firebase projectFirebase configuration:google-services.json generated from Firebase projectPackage name matches the Android App IdentifierSHA-1 fingerprint added in FirebaseFirebase Admin SDK configured in Mendix for sending notificationsAdditional warning in Android logsWe also see this warning:registerHeadlessTask or registerCancellableHeadlessTask called multiple times for same key 'ReactNativeFirebaseMessagingHeadlessTask' What we already triedVerified Firebase configurationVerified package name matches FirebaseRegenerated google-services.jsonRebuilt native Android appReinstalled app on deviceConfirmed iOS works with same logicConfirmed PushNotifications.DeviceRegistration sync is enabledConfirmed OnPageLoad_RegisterPushNotifications nanoflow is executedQuestionHas anyone encountered FIS_AUTH_ERROR when calling GetPushNotificationToken in a Mendix Native app?Could this be caused by:incorrect Firebase Android configuration?conflict between Make It Native Firebase config and custom app config?duplicate registration of ReactNativeFirebaseMessagingHeadlessTask?missing SHA fingerprint configuration?incorrect integration of @react-native-firebase/messaging inside Mendix Native Builder?Any guidance would be greatly appreciated.Thanks!
asked
1 answers
0

Hi Killian,

The key part of your error is actually:


Plain Text



FIS_AUTH_ERROR

This comes from Firebase Installations Service (FIS), which is used under the hood by FCM to generate and manage registration tokens. In most cases, this error occurs before Mendix or your nanoflow logic is involved, when the Android app cannot successfully authenticate with the Firebase project.

Since:

✅ iOS works

✅ Android app builds successfully

✅ GetPushNotificationToken is executed

❌ Android token generation fails with FIS_AUTH_ERROR

I would focus on the Android Firebase configuration.

First things to verify

1. SHA-1 / SHA-256 fingerprints

The most common cause I've seen is an incorrect or missing Android signing fingerprint.

Make sure the Firebase Android application contains the SHA fingerprint of the actual keystore used to sign the APK/AAB you're testing.

Common mistake:


Plain Text



Debug SHA added

Production build installed

or


Plain Text



Old SHA added

New Native Builder keystore used

After updating fingerprints, download a fresh:


Plain Text



google-services.json

and rebuild the native app.

2. Verify package name

Confirm all three match exactly:


Plain Text



Firebase Android App

Mendix Android App Identifier

Android Manifest package/applicationId

Even a small mismatch can cause Firebase authentication failures.

3. Check which Firebase project is being used

You mentioned:


Plain Text



MakeItNative → Firebase Project A

Fleet Acceptance → Firebase Project B

Make sure the generated APK contains the correct:


Plain Text



google-services.json

for the Acceptance Firebase project.

I've seen situations where:


Plain Text



Package Name = Project B

google-services.json = Project A

leading to FIS_AUTH_ERROR.

4. Clean Install

After changing Firebase configuration:

  • Uninstall the Android app completely
  • Rebuild
  • Reinstall

Firebase installation IDs can be cached locally.

About the HeadlessTask warning


Plain Text



registerHeadlessTask called multiple times

I'd treat this as a secondary warning.

It may indicate:

  • Multiple messaging registrations
  • Duplicated React Native initialization

but it typically does not prevent token generation by itself.

The FIS_AUTH_ERROR is the more significant issue.

My suspicion

Based on your description, if iOS works and Android consistently returns:


Plain Text



java.io.IOException: FIS_AUTH_ERROR

I would investigate in this order:

  1. Wrong/missing SHA-1 or SHA-256 ✅ most likely
  2. Wrong google-services.json
  3. Package name mismatch
  4. Firebase project mismatch between environments
  5. Duplicate messaging registration (less likely)

In my experience, 90% of FIS_AUTH_ERROR cases on Android come down to Firebase Android app registration (SHA fingerprint or project configuration) rather than Mendix push notification logic itself.


answered