Push notifications failing for app name mismatch

Please provide the following:

  1. SDK Version: 40
  2. Platform: Android


While developing an app i distributed the apk file to multiple users, during development I realized that the app name in the app.json was misspelled, so I tried to fix it . But that in itself was a problem because of the certificates mismatch. So I went back to the original name and published the app in the play store. The first days everything went ok. But then the notifications stopped working and i got the following error :

{ Error: All push notification messages in the same request must be for the same project; check the details field to investigate cApr 22 16:44:25 srv022164 PROJECT_NAME-backend[1906]:     at Expo.getErrorFromResultError (ROUTE_TO_PROJECT/node_modules/expo-server-sdk/build/ExpoClient.js:257:23)
    at Expo.getErrorFromResult (ROUTE_TO_PROJECT/node_modules/expo-server-sdk/build/ExpoClient.js:247:28)
    at Expo.<anonymous> (ROUTE_TO_PROJECT/node_modules/expo-server-sdk/build/ExpoClient.js:229:25)
    at Generator.next (<anonymous>)
    at fulfilled (ROUTE_TO_PROJECT/node_modules/expo-server-sdk/build/ExpoClient.js:5:58)
    at process._tickCallback (internal/process/next_tick.js:68:7)
   { '@MY_USERNAME/PROJECT_NAME': [ 'ExponentPushToken[qJIcfMB4DqCsRPCpasd143an7kLn]' ],
     '@MY_USERNAME/OLD_PROJECT_NAME': [ 'ExponentPushToken[h_T6CAKaB4DqCsRPCpavD6-_6uoKdjobG]' ] } 

It’s there a way to prevent this error, without having to tell the users to uninstall the app with the old name?

Or in other case from the PushToken get wich project it belongs to so I can know wich notifications to push to the bulk messaging?

Thanks in advance for any information

Hey @sernad, there isn’t an elegant way to determine what experience a given token is connected to via the node server sdk. Not sure how many people have the old app but trying to inform them to install the correct one will probably be the best course of action here.

Another thing you could potentially do is save the experienceId and the token value in your db when you get the token on the client side. experienceId can be read via Constants.manifest.id from expo-constants. This feels hacky and messy though.


Thanks for the reply, I’ve been looking for an alternative to fix my problem. An now im going to start trying to tell my users to install the new app

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