iosobjective-cfirebaseapple-push-notificationsfirebase-cloud-messaging

The provided registration token is not registered


I'm trying to send push notification for iOS via Google cloud functions but it returns error that The provided registration token is not registered. But I've checked it by debugging my app and the FCM registration token is correct. After that I've tried to send push notification via Firebase console to single device by providing FCM token but it failed due to Unregistered registration token. How this happens because there is no issue with device FCM token?


Solution

  • I think it should be some careless mistake, you should make sure the things below:

    1. The token is same with -[FIRMessagingDelegate messaging:(FIRMessaging *)messaging didReceiveRegistrationToken:(NSString *)fcmToken]

    2. The GoogleService-Info.plist is downloaded from the same account with your Firebase push console.

    3. Updated to the latest Firebase SDK.

    From the Google Firebase document are some description of your error The provided registration token is not registered.

    The provided registration token is not registered. A previously valid registration token can be unregistered for a variety of reasons, including:

    • The client app unregistered itself from FCM.
    • The client app was automatically unregistered. This can happen if the user uninstalls the application or, on iOS, if the APNS Feedback Service reported the APNS token as invalid.
    • The registration token expired. For example, Google might decide to refresh registration tokens or the APNS token may have expired for iOS devices.
    • The client app was updated, but the new version is not configured to receive messages. For all these cases, remove this registration token and stop using it to send messages.