In our case, we have two devices. A chat application is developed. On each device, there is a unique user logged in and they are trying to send each other a push notification over a server.
On login, they get their respective push token and send it to the server, which updates it in its database. User A then sends a message to user B, but as both have the same Expo Push token, he might probably end up receiving his own message.
We can see the field “devicePushToken” being different on each device. How can the Expo push token be the same?
Side note: in this case, the device of User B has been created by a backup of the device of User A (Apple backup restore during device setup). On of our other developers has had no problem with this method and push tokens are unique.
I double-checked - we are using Expo SDK v40.0.1 and we are following the managed workflow. We upgraded from Expo SDK 39 to Expo SDK 40 mid March. Could it be some sort of leftover error?
We tried reinstalling Expo Go app from App Store on both devices but both tokens are the same. Could this somehow be related to Expo user accounts?
If there is any information you need for debugging purposes I will be happy to get it for you.
Hi again, the developer is using two physical devices, both running our development app in Expo Go. So two devices, both running Expo Go, both running our app. When our app codes calls “await Notifications.getExpoPushTokenAsync()”, both send the same Expo push token to the server.
I have scheduled to upgrade Expo SDK to 41 for next week. Maybe this will solve the issue.