push-notificationnotificationsfirebase-cloud-messagingexpo

Expo Push Notification Unable to retrieve the FCM server key for the recipient’s app. Make sure you have provided a server key as directed…


SDK Version: 40 Platforms(Android/iOS/web/all): Android

I already have setted the expo push:android:show error return me:

Click to see error img

If I click on button just have no returns

I’m just using the example code available on Push Notifications Overview - Expo Documentation 1

setted expo push:android:show and fcm,firebase,push,google-services.json look:

Cick to see what I setted

I installed the expo dependecies before expo ejected. I setted the Firebase app name com.myname.testpush as the AndroidManifest package name as well.

“dependencies”: {
“expo”: “~40.0.0”,
“expo-status-bar”: “~1.0.3”,
“react”: “16.13.1”,
“react-dom”: “16.13.1”,
“react-native”: “~0.63.4”,
“react-native-web”: “~0.13.12”,
“expo-notifications”: “~0.8.2”,
“expo-permissions”: “~10.0.0”,
“expo-splash-screen”: “~0.8.1”,
“expo-task-manager”: “~8.5.0”,
“expo-updates”: “~0.4.0”,
“expo-constants”: “~9.3.0”,
“@react-native-firebase/app”: “^10.5.0”,
“react-native-gesture-handler”: “~1.8.0”,
“react-native-reanimated”: “~1.13.0”,
“react-native-screens”: “~2.15.0”,
“react-native-unimodules”: “~0.12.0”
},
“devDependencies”: {
“@babel/core”: “~7.9.0”,
“babel-jest”: “~25.2.6”,
“jest”: “~25.2.6”,
“react-test-renderer”: “~16.13.1”
},

posted on expo as well: https://forums.expo.io/t/push-notification-unable-to-retrieve-the-fcm-server-key-for-the-recipients-app-make-sure-you-have-provided-a-server-key-as-directed/48529


Solution

  • Solved on Expo Forum (https://forums.expo.io/t/push-notification-unable-to-retrieve-the-fcm-server-key-for-the-recipients-app-make-sure-you-have-provided-a-server-key-as-directed/48529/2)

    @adamjnav creating a new project I could see that I forgot of set my experienceId: "@myexpouser/myproject" and my app.json android: { …, “useNextNotificationsApi”: true, “adaptiveIcon”:"… }