NotRegistered Response from FCM even when the app is installed on a users mobile device

23,136
  1. Reasons as to why a NotRegistered happens are stated in the docs, the third one, being a probable reason for your case (emphasis mine):

    An existing registration token may cease to be valid in a number of scenarios, including:

    • If the client app unregisters with FCM.
    • If the client app is automatically unregistered, which can happen if the user uninstalls the application. For example, on iOS, if the APNS Feedback Service reported the APNS token as invalid.
    • If the registration token expires (for example, Google might decide to refresh registration tokens, or the APNS token has expired for iOS devices).
    • If the client app is updated but the new version is not configured to receive messages.

    For all these cases, remove this registration token from the app server and stop using it to send messages.

  2. Nope. As I linked above, the NotRegistered error doesn't only trigger during uninstalls. AFAIK, there is no standard way of doing this. Have a look at some of these posts.

Share:
23,136
karan
Author by

karan

Updated on May 30, 2020

Comments

  • karan
    karan almost 4 years

    We just migrated from GCM to FCM. For tracking uninstalls we send a silent notification to all our users and if we get a "NotRegistered" response we treat the user as uninstalled. Since the last few days, we started getting "NotRegistered" for some of the users who have not uninstalled the app.

    On querying the FCM diagnostics for the same Registration token the messages are being delivered but they are continuously in accepted state.Attached is the screenshot. The error code I received while sending the message is still "NotRegistered" . The user has not uninstalled the app.Attached is the screenshot.

    We are getting "Not Registered" since 1st of June while messages are in accepted state till 4th of June. This image shows message Ids of notifications sent till 4th of June:

    1

    Would like a clarification on the following:

    1. Why did the status of the FCM registration token change to NotRegistered. There was no upgrade since the last month and the user has been using the latest version since a long time?

    2. Is checking FCM error code "NotRegistered" a full proof way to track uninstalls? Are there better mechanisms available?

  • vnaren001
    vnaren001 about 6 years
    Hi, I am getting same error NotRegistered with iOS FCM. Not getting why this happening and what should I do in this case , since in application I get always same FCM Token and I submit this token to server. But my application did not get idea locally that this token is invalid because of some reason. How can verify this at application side. Is anybody have any solution ? Please suggest
  • AL.
    AL. about 6 years
    Hi vnaren001. NotRegistered only occurs when the token is actually invalid. Have you tried uninstalling and re-installing your app (to trigger a refresh) and see if it still occurs? If it still does, I suggest posting a question here in SO with as much details (specially the code) as you can provide. Cheers!
  • vnaren001
    vnaren001 about 6 years
    @ AL , Thanks for reply. When I delete the app that token is removed . New token works fine . But it happened 3-4 times that but actual question is that how app would have the idea that Token to s deleted and it how it should be a valid token always. ??
  • Yogendra Patel
    Yogendra Patel about 5 years
    @vnaren001 i also face same problem. have you find any solution for this issue. if yes then please help me.
  • dev.nikolaz
    dev.nikolaz over 4 years
    @vnaren001, Did you found solution? I also get this issue. Thx
  • TT_TT
    TT_TT almost 2 years
    how do we know if it's perfectly safe to remove the token with "NotRegistered" error? e.g. "If the client app is updated but the new version is not configured to receive messages." the new version will use a new token or reuse back the token?
  • AL.
    AL. almost 2 years
    @TT_TT The Google doc already says to remove it. Not sure what else are you looking for. As far as reusing token goes, I've never experienced using the same token after it received a NotRegistered error.