FCM getting MismatchSenderId

前端 未结 29 1893
刺人心
刺人心 2020-12-04 17:34

I have an application that uses Google FCM for sending push notifications.

When i send a push notification to a group of users, i get a response of MismatchSen

相关标签:
29条回答
  • 2020-12-04 18:01

    We spent hours and hours to resolve this issue. What we found that token was being generated using different FCM account settings (google-services.json) and notification was being set using different FCM account. When we synced both it worked like a charm.

    0 讨论(0)
  • 2020-12-04 18:01

    I was trying to send notification using the fcm api "https://fcm.googleapis.com/fcm/send" from postman. Server key was ok and token was pasted fine but was still getting error "MismatchSenderId".

    Then introduced the follwoing dependency in the gradle file on android side.

    implementation platform('com.google.firebase:firebase-bom:25.12.0') 
    

    and it started receiving notifications on the device

    0 讨论(0)
  • 2020-12-04 18:04

    Note: I had truncated the first part of the FCM token (before :) and the error was MismatchSenderId

    Fixed my script and now everything works fine.

    0 讨论(0)
  • 2020-12-04 18:07

    In my case someone had deleted APN SSL Certificates for my app in Apple development portal.

    • I needed to create new certificates: Identifiers / My AppId / Push Notifications / Edit.
    • Then I uploaded them to the Firebase project from console: Project Settings / Cloud Messaging / iOS app configuration / APNs Certificates.

    This solved the problem.

    0 讨论(0)
  • 2020-12-04 18:09

    As per response "MismatchSenderId", this is a mismatch between FireBase and your local "google-services.json", you have to make sure that both manifests matches

    In FireBase console you go to "YourProject > Project OverView > Cloud Messaging" you'll see the "SenderID" which MUST match with the "google-services.json" in your Android project.

    Best thing you can do is download the final json file from "General" tab and place it in your project.

    0 讨论(0)
提交回复
热议问题