expo: Multiple DeviceNotRegistered errors

Hi Expo team!

Recently I experienced issues with push notifications using Expo’s service in standalone apps. I have set up email alerts to inform me about cases when push receipts contain errors. Some time on May 9th I started receiving unusually high number of alerts: roughly 50% of our users stopped receiving notifications. The errors themselves look like this:

{
    "status": "error",
    "message": "The recipient \"ExponentPushToken[xxxxxxxxxxxxxxxxxxxxxx]\" is not associated with a device actively registered to receive push notifications; stop sending notifications to this recipient until you get an Expo push token from it once again and still have its permission to send notifications.",
    "details": {
      "error": "DeviceNotRegistered"
    }
  },

The app is configured in a way that it will send a request to update token value in DB whenever updated token is available via Notifications.getExpoPushTokenAsync. The problem is that this method still returns old token (the one we already have and using it results in an error). The only way I could get a new token is reinstalling the app completely, which is far from an ideal solution.

Diagnostics report:

Environment: OS: Linux 4.4 Node: 8.6.0 Yarn: 1.6.0 npm: 5.3.0 Watchman: Not Found Xcode: N/A Android Studio: Not Found

Packages: (wanted => installed) expo: ^26.0.0 => 26.0.0 react: 16.3.0-alpha.1 => 16.3.0-alpha.1 react-native: https://github.com/expo/react-native/archive/sdk-26.0.0.tar.gz => https://github.com/expo/react-native/archive/sdk-26.0.0.tar.gz

Things to note:

  1. Neither app or back-end had been updated for about a month before the issue first appeared
  2. This looks different from #1568 as iOS devices are affected as well.
  3. Users definitely didn’t block notifications from the app on their devices.
  4. I’m using expo-server-sdk package

Questions:

  1. What’s the lifespan of expo tokens? Is it possible that they just expired?
  2. Is it possible that these tokens hit their usage limits or something? We kind of send a lot of notifications daily.

Is there any way I can fix this on my side? Let me know if there’s any other info you need, I’ll be glad to help you with the investigation.

Thanks.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 18 (8 by maintainers)

Most upvoted comments

Hi everyone! Sorry this took a little while to discover, the underlying bug here was caused by a caching error being swallowed and converted into a “token no longer valid” error. We’ve resolved the caching issue and will be following up soon to prevent this from happening again. This problem does not appear to have affected the majority of users, but we’re extremely sorry for everyone who was affected.

If you’re still seeing this error, please let us know and we’ll look into it!

It seems the problem is fixed as of 2018.05.14 21:00 PST! Thanks!