expo push:android:upload --api-key with continued FCM failure

In my case, push notifications on android are failing with the following error message:

message: "Unable to retrieve the FCM server key for the recipient's app. Make sure you have provided a server key as directed by the Expo FCM documentation.",
  details: { error: 'InvalidCredentials', fault: 'developer' }

I’ve followed the directions on https://docs.expo.io/versions/latest/guides/using-fcm/. The upload of credentials (cloud messaging/server key) seems to work:

expo push:android:upload --api-key %MY_KEY%
Reading project configuration...
Logging in...
Setting API key on Expo's servers...
All done!

But when I go to send a PN to Android, I always get the same InvalidCredentials error. IOS is working fine.

I can verify that:

  • the android package name is the same value as android.package in the app.json
  • the google-services.json is up to date
  • google-services is referenced in android.googleServicesFile

Is it possible to verify that the server credentials are uploaded correctly on Expo’s end?
Are there any other steps I can take to resolve this issue?

Same issue…

Are you sure that you put correct value in expo push:android:upload --api-key %MY_KEY% command?
It should be Settings → ProjectSettings → Cloud Messaging → Server key

Looks like the issue the owner of the expo app changed. The token was not registered with the new owner. All good now, thanks @ide!

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.