We are consistently receiving an error when trying to send push notifications to Androids.
InvalidCredentials: 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.
We have followed the FCM Documentation. We set up a Firebase console app and included the google-services.json in our app (with a reference to it in the app.json)
We also included “useNextNotificationsApi”: true in app.json
We created a new build of the project.
We then obtained the server key from the Firebase app and uploaded it using expo push:android:upload --api-key <your-token-here>
command
We are still getting this error.
Our top level creds are : Google Play console owner
@gmail.com
App Name = Autowash Dev
App Bundle Id = com.autowash.dev
Expo
Account Owner = @insiten-expo
Account Owner Email = expo@insiten.com
App Name = Autowash Dev
App Bundle Id = com.autowash.dev
App.json file:
{
"expo": {
"name": "Autowash Dev",
"slug": "AutowashMobile",
"version": "1.0.11",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
"scheme": "autowash",
"owner": "insiten-expo",
"userInterfaceStyle": "automatic",
"splash": {
"image": "./assets/images/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 30000
},
"assetBundlePatterns": ["**/*"],
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.autowash.dev",
"buildNumber": "36"
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/images/adaptive-icon.png",
"backgroundColor": "#FFFFFF"
},
"package": "com.autowash.dev",
"versionCode": 36,
"config": {
"googleMaps": {
"apiKey": "RANDOM KEY HERE"
}
},
"permissions": [
"ACCESS_COARSE_LOCATION ",
"ACCESS_FINE_LOCATION",
"NOTIFICATIONS"
],
"googleServicesFile": "./configuration/dev/google-services.json",
"useNextNotificationsApi": true
},
"web": {
"favicon": "./assets/images/favicon.png"
}
}
}