iOS - Notification stop receive after re-build

Please provide the following:

  1. SDK Version: 36
  2. Platforms(Android/iOS/web/all): iOS

After I re-build the standalone app with current APNs config. The notification service stop working, I was not received notification anymore. The app on app-store also effected.

I didn’t changed any things in config/or APNs key. I have try to rebuild the app with -c flag, and the new push cert but still not working.

curl 'https://exp.host/--/api/v2/push/send' \
  -H 'authority: exp.host' \
  -H 'pragma: no-cache' \
  -H 'cache-control: no-cache' \
  -H 'accept: application/json' \
  -H 'dnt: 1' \
  -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.122 Safari/537.36' \
  -H 'content-type: application/json' \
  -H 'origin: https://expo.io' \
  -H 'sec-fetch-site: cross-site' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-dest: empty' \
  -H 'referer: https://expo.io/' \
  -H 'accept-language: vi,en-US;q=0.9,en;q=0.8,vi-VN;q=0.7' \
  --data-binary '[{"to":"ExponentPushToken[s1JcmQFix4sw2n5XtFtfUc]","title":"Hello world","body":"This is a test notification"}]' \

Hi! To diagnose the root cause, we’ll need the error that’s happening. You can try and get that by looking at the push ticket and push receipt. See our push notification documentation on how to get those.

as you can see from the receipts, the error message indicates that the push key we have associated with your project is invalid. I would clear your push key (by passing --clear-push-key), and let Expo handle the new one’s generation

Hi @charliecruzan, once again. Now, I facing with same issue after the app Ready-for-Sale on App Store. I didn’t do anything after submit the app to App Store, even an OTA updates.

What is going on?

curl -H "Content-Type: application/json" -X POST "https://exp.host/--/api/v2/push/getReceipts" -d '{
  "ids": ["52a6edfc-9a58-44e3-ab2b-7e9aa3d61e71"]
}'
{"data":{"52a6edfc-9a58-44e3-ab2b-7e9aa3d61e71":{"status":"error","message":"The Apple Push Notification service key for your account could not be loaded, likely due to a malformed p8 file. Expo needs a valid PEM key in order to deliver notifications to APNs.","details":{"error":"InvalidCredentials","sentAt":1588851802},"__debug":{"internalError":"Failed to generate token: error:0909006C:PEM routines:get_name:no start line"}}}}

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.