I am puzzled by this. I sent a notification two days ago, but then they stopped sending. I tested sending with curl and got this back:
{"data":{"status":"error","message":"Could not find APNs credentials for com.___.___ (...). Check whether you are trying to send a notification to a detached app."}}
I couldn’t find anything in the documentation about this.
Other information: we did recently send a new version to the app store. Because we ran into difficulties with the upgrade from SDK 22 to 24 we ran exp build:ios -c as that worked for other users. It seems like that reset the notification credentials.
That looks like an accurate diagnosis. exp build:ios -c clears your Apple credentials registered with Expo, including your Apple push notification certificate. Expo then would no longer have the certificate needed to send push notifications.
If you recreate your Apple credentials – either by letting Expo take care of it with exp build:ios or by uploading your push certificate (also via exp) – your push notifications with the existing tokens should start working awhile after.
So we went through the steps again and noted that our Push p12 password is undefined (see output below). We did another build and a fetch and got the same result. Seems like a bug.
[exp] There is a new version of exp available (48.0.0).
You are currently using exp 47.4.4
Run `npm install -g exp` to get the latest version
[exp] Retreiving iOS credentials for @our/app
[exp] These credentials are associated with Apple Team ID: xxxxxxxxxx
[exp] Writing distribution cert to /filepath/file_dist.p12...
[exp] Done writing distribution cert credentials to disk.
[exp] Writing push cert to /filepath/file_push.p12...
[exp] Done writing push cert credentials to disk.
[exp] Writing provisioning profile to /filepath/file.mobileprovision...
[exp] Done writing provisioning profile to disk
[exp] Save these important values as well:
Distribution p12 password: xxxxxxxxxxxxxxxxxxxxxxxxxx
Push p12 password: undefined
@monjohn Thank you very much for your patience, it was a bug indeed in how exp was saving your push password that you gave when uploading your own files.
Just released a small update to exp fixing that. Should work now after upgrading exp.
[exp] Looking for releases...
[exp] (_xdl || _load_xdl(...)).Project.getLatestReleaseAsync is not a function
[exp] Set EXPO_DEBUG=true in your env to view the stack trace.
Hi @monjohn! This error (Project.getLatestReleaseAsync is not a function) should be fixed in exp version 48.0.2. Can you try upgrading to the latest exp version and see if that helps?