react-native-fcm: iOS push notifications failing after several days

I’m facing an issue where a new iOS user will initially be able to receive FCM push notifications, but after a few days, stops being able to receive them. However, the server which is sending the push notifications still receives a success message from FCM:

{ multicast_id: 5364950433438816000, 
  success: 1, 
  failure: 0, 
  canonical_ids: 0, 
  results: [ { message_id: '0:1471123826177313%13c7f1c613c7f1c6' } ] } 

After I tried manually sending a notification to the relevant FCM token through the firebase console (which failed), the server then starts getting a failed message from FCM:

{ multicast_id: 4711697033517732000, 
  success: 0, 
  failure: 1, 
  canonical_ids: 0, 
  results: [ { error: 'NotRegistered' } ] } 

This led me to believe that the FCM token my server had was somehow out of date; however, I double checked, and the FCM token my server is using is consistent with the token given by calling FCM.on('refreshToken', (token) => ... in the app.

Is there some other reason why this might be occurring?

About this issue

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

Most upvoted comments

do you get refreshToken called all the time?