Hello,
I’m running an expo app in the bare workflow and am currently trying to get push messages to work on Android.
I can retrieve the ExpoPushToken strings from the phones perfectly fine, but when I try to actually send a push message I get the following error: “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.”
I looked through the related threads, but none of the tips there seemed to help.
Things I already tried and checked:
- The google-services.json file is downloaded to **./android/app/google-services.json". The expo.android.googleServicesFile key in app.json points there.
- $ expo push:android:show returns the correct FCM API key
- I tried to clear this and re-upload the key. I get a success message for storing the key, but still fail to push a message.
- I tried to set the key through credentials manager. The upload works, the error message does not change.
- I created an new server key in Firebase Console and tried that, but it also did not work
- The package name in the Firebase console matches the key android.defaultConfig.applicationId in android/app/build.gradle and android.package in app.json
- In the Google Cloud Console, I have enabled the Cloud Messaging, Firebase Cloud Messaging API, Firebase Installations API and FCM Registration API
- I tried setting the “owner” property in app.json - it did not have any effect, I’m not on a paid plan but was desperate for ideas
- I removed the app from the Firebase project and added it again.
- I removed the whole Firebase project and re-created it. Still, same error message.
- I tried sending the message through expo’s push notification tool at https://expo.io/notifications - same error
Any suggestions and hints are greatly appreciated. I have completely run out of ideas
Thanks,
Bernhard