question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Push Notification token doesn't update with a new device

See original GitHub issue

Environment

Production Standalone iOS

Steps to Reproduce

  1. User installs the app
  2. Enables push notifications
  3. Get token via Notifications.getExpoPushTokenAsync()
  4. User receives a push notification successfully
  5. User makes a backup of their device
  6. User gets a new device
  7. User restores from backup
  8. User opens already-installed app
  9. Push token via Notifications.getExpoPushTokenAsync() is the same as in 3
  10. No push notifications are ever received by the new device

Expected Behavior

A new token should probably be generated so that the server can send to the new device.

Actual Behavior

No push notifications are received by the new device.

Only course of action for the user seems to be to uninstall + reinstall, at which point, push notifications work without issue.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:8
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
mschreiber68commented, Jan 7, 2019

This issue affects our standalone, non-ejected iOS app as well. The push notification token, as well as Constants.installationId, have the same values on the new device. Users don’t receive push notifications until they uninstall and reinstall the app.

1reaction
somanystevescommented, Apr 11, 2020

Not sure if this is the place to ask, but I’m running out of ideas. I have the exact same issue as described above. However… even after an uninstall/reinstall, a new token isn’t generated. And ofc notifications don’t work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Not receiving push device token in… | Apple Developer Forums
Hi there, I'm seeing weird behavior when trying to register for push notifications in macOS development builds for any of my apps
Read more >
android - How to update the old device token with the new ...
Your server that is sending the push notifications should monitor the response from APNS. When it indicates that a token is no longer...
Read more >
Best practices for FCM registration token management
On this page · Basic best practices. Retrieve and store registration tokens; Detect invalid token responses from the FCM backend · Ensuring registration...
Read more >
Push Registration - Braze
Unfortunately, APNs and FCM don't really define this. Push tokens can expire when an app is updated, when users transfer their data to...
Read more >
Push notification troubleshooting and FAQ
Your device doesn't have push enabled. · Your device's push token was added after the message was scheduled to send. · Your device...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found