I seem to be running into an issue when one or both of my two Expo apps (being used for different users for the same project) keep having the User Credentials for iOS be removed from the app, leading to push notifications not reaching the apps with the error: “Could not find APN credentials for , you may need to generate or upload new push credentials”. At first I thought this was an issue from a couple weeks ago when I was testing something with a new expo account in the cli (bad move) which led to different credentials being used, but then I cleared all my credentials locally, made sure they were removed from the Apple Developer Portal, and generated a new Push Notification Key for both apps to use.
That fix was only a few days ago, but after a recent build and push to the App stores last night, today both apps stopped receiving pushes with the same error again. I ran credentials:manager and saw that the Push Notification Key and Distribution Certificate were both listed as being “unused by any app”, which was obviously unusual since I used every “let Expo handle the process” command when generating the new creds. I used the manager to “use existing push notif key and distribution cert in current project”, in both apps, and then both key and cert read as being used by both apps.
I was unsure how this happened in the first place, but while showing another developer how I diagnosed the issue with the credentials:manager command in case it became an issue again, now only ONE app is using the Cert and Key, even though both apps had been listed as using them only a few minutes earlier, from the same project location.
Both apps appear to be receiving pushes without issue now, even though the credentials manager lists only one app as using the certs, but based on previous experiences this week another build for the unlisted app may break push notification functionality for it again. Is this actually an error and my iOS keys/certs are getting unassigned from my apps? And if so, how do I prevent it from happening again?
Edit: It might be worth noting that whenever I attempt to assign the Distribution Certificate or Push Notification Key to the current project, I get the helper text “? Validity of this certificate on Apple’s servers is unknown”. I can’t find anything relevant from searching for that response, however.
Output from executing expo diagnostics
Expo CLI 3.20.9 environment info:
System:
OS: Linux 5.0 Ubuntu 19.04 (Disco Dingo)
Shell: 5.0.3 - /bin/bash
Binaries:
Node: 13.6.0 - ~/.nvm/versions/node/v13.6.0/bin/node
Yarn: 1.21.1 - /usr/bin/yarn
npm: 6.14.4 - ~/.nvm/versions/node/v13.6.0/bin/npm
npmPackages:
expo: ~36.0.0 => 36.0.2
react: ~16.9.0 => 16.9.0
react-dom: ~16.9.0 => 16.9.0
react-native: https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz => 0.61.4
react-native-web: ~0.11.7 => 0.11.7
npmGlobalPackages:
expo-cli: 3.20.9