I get this message when attempting to send a push notification to either ios or android:
“Error: Could not find APNs credentials for com.blah.blah (@rhodydan/blah). You may need to generate or upload new push credentials.”
"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 have two apps at two different slugs and notifications only works on one of them. Both are set up correctly, and I have tried combinations of them using separate distribution certs and separate APN keys, the same dist cert and same apn keys, etc.
I’ve used credentials:manager to reset these testing each time after re-publishing. I came across this question and it appears that the credentials are published in a redis cache. Maybe my specific slug’s credentials are not getting updated in the cache? Any help is really appreciated!
Output from executing expo diagnostics
Expo CLI 4.3.2 environment info:
OS: macOS 11.2.3
Shell: 5.8 - /bin/zsh
Node: 12.18.4 - /usr/local/bin/node
Yarn: 1.22.5 - /usr/local/bin/yarn
npm: 6.14.6 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
CocoaPods: 1.9.3 - /usr/local/bin/pod
Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
API Levels: 29
Build Tools: 28.0.3, 29.0.2, 29.0.3, 30.0.3
System Images: android-29 | Intel x86 Atom, android-29 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom_64, android-29 | Google Play Intel x86 Atom, android-29 | Google Play Intel x86 Atom_64
Android Studio: 4.1 AI-201.8722.214.171.12442882
Xcode: 12.4/12D4e - /usr/bin/xcodebuild
expo: ^40.0.0 => 40.0.1
react: 16.13.1 => 16.13.1
react-dom: 16.13.1 => 16.13.1
react-native: ~0.63.4 => 0.63.4
react-native-web: ~0.13.12 => 0.13.18
react-navigation: ^4.4.3 => 4.4.4
Expo Workflow: bare
@wkozyra - Since you helped with the other post I linked to, I was wondering if you are aware of issues related to APN and FCM credentials not populating to your redis cache? I can give you the specific slugs in a private message if it helps track down what is going on.
Yes, I’ve verified the creds are correct for each slug. They were not originally, which is why I was thinking the cache got corrupted and I’m not sure how to evict the values that are still there. I’ve tried all of the ways in credentials:manager, in the website manually uploading p8 for example and I still continue to get:
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.
Could not find APNs credentials for com.blah.blah (@rhodydan/blah). You may need to generate or upload new push credentials.
How can I make sure the creds are cleared out on your side before uploading again?
if it helps, the problematic slug is: @rhodydan/Hangar54
Thank you so much for any help pointing me in the right direction!
Hmmmm… I’ve been building natively (using xcode and android studio) and publishing the js bundles using expo publish. I tried expo build:ios and when it didn’t work (still got the APN credentials missing message), I didn’t bother to do android.
The other app (that has notifications working) was built using expo build before, so maybe that is why it works and this one does not. Let me give turtle cli a try. I’ll report back by tomorrow.
Even simpler fix…and I am going to start drinking early today… the slug that I was passing as the ExperienceID when registering for the token was not capitalized the same as the slug on expo.io. It is case sensitive.
Works now. Not sure how I missed that. Thank you for all of your help!