[expo-notifications] DeviceNotRegistered: The recipient device is not registered with FCM.
See original GitHub issueš Bug Report
Summary of Issue
token = (await Notifications.getExpoPushTokenAsync({ experienceId: experienceId })).data; retrieves invalid push tokens Here are some:
ExponentPushToken[0J23tlOl6Qz92gG9SM4ceI] ExponentPushToken[qcL4EiLB_aTct8VdVsXFfu] ExponentPushToken[D5PQ0qDWvvDqoomMg8I2G8]
Environment - output of expo diagnostics & the platform(s) youāre targeting
Bare workflow
Expo CLI 3.22.3 environment info:
System:
OS: Windows 10 10.0.18362
Binaries:
Node: 14.4.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.4 - C:\Users\Myself\AppData\Roaming\npm\yarn.CMD
npm: 6.14.4 - C:\Program Files\nodejs\npm.CMD
npmPackages:
expo: ^38.0.8 => 38.0.8
react: ~16.11.0 => 16.11.0
react-dom: ~16.11.0 => 16.11.0
react-native: ~0.62.2 => 0.62.2
react-native-web: ~0.11.7 => 0.11.7
Reproducible Demo
Steps to Reproduce
retrieved token with token = (await Notifications.getExpoPushTokenAsync({ experienceId: experienceId })).data;
https://exp.host/--/api/v2/push/send
POST
{
"to": "ExponentPushToken[qcL4EiLB_aTct8VdVsXFfu]",
"sound": "default",
"title": "Test",
"body": "Test",
"data": { "data": "goes here" }
}
Expected Behavior vs Actual Behavior
{
"data": {
"id": "20ede6dd-95d8-484d-96aa-3560c21031a3",
"status": "error",
"message": "The recipient device is not registered with FCM.",
"details": {
"error": "DeviceNotRegistered",
"fault": "developer"
}
}
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:24 (10 by maintainers)
Top Results From Across the Web
expo-notifications DeviceNotRegistered error : r/reactnative
"ExponentPushToken[]" is not a registered push notification recipient". It's possible that you're not sending any token to expo.
Read more >Sending Notifications with Expo's Push API
The DeviceNotRegistered error appears in push receipts only when Apple, Google, or another push notification provider deems the device to be unregistered;Ā ...
Read more >The recipient device is not registered with FCM - Stack Overflow
The registration token you are trying to send a notification to is registered to another Firebase project. Please make sure that the app...
Read more >Basics and caveats of Expo-notifications - DEV Community ā ā
... the message to the recipient devices. Be aware that expo-notifications does not work on emulators, so you should tested on real devices....
Read more >Best practices for FCM registration token management
Retrieve and store registration tokens; Detect invalid token responses from the ... sometimes the FCM backend cannot verify whether or not a device...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Iāve followed all those steps⦠otherwise it would not work at all⦠š¤·āāļø BTW, iām running these latest tests on LDPLayer. Can that be the problem?
Deleting the app and reinstalling it will generate a new Expo push token
As Iāve stated above, Expo is simply forwarding this error message along from FCM. Weāve had this error message posted a few times, and itās always been a configuration issue, or the deviceās token is no longer valid (app hasnāt been opened in a while or the user revoked notification permissions).
Hereās a great list of common mistakes when setting up FCM notifications in Expo.
Googleās documentation is very clear that if you receive this message, you should stop sending notifications to the app: