FCM getting MismatchSenderId

前端 未结 29 1892
刺人心
刺人心 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 17:58

    I wasted days on this.

    In my case, I followed this blog to use Postman and get the mismatchsenderid error. Previously, I was getting messaging/mismatched-credential, and people reported that their client app used multiple projects.

    However, for me, I have one-to-one, a web app and a project. BUT, I host all apps via ng serve on default port 4200. So regardless of what project / app pair I was developing on, I would always get the same token from my client web app using AngularFireMessaging.requestToken - this token was always the token created on my first ever run of a firebase app in development.

    As a work around, I start different apps / projects on different ports and get proper tokens for respective projects.

    0 讨论(0)
  • 2020-12-04 17:58

    I have noticed that when a device id is created in GCM you cannot send push messages through FCM using the new server key, you have to use the old API-key.

    0 讨论(0)
  • 2020-12-04 17:59

    Firebase has upgraded their server keys to new version. Use new keys instead of old one.

    go to settings->project settings->cloud messaging tab

    0 讨论(0)
  • 2020-12-04 17:59

    I found that the senderId is different from the project number in the FCM console
    so I re-downloaded google-services.json and everything works fine

    0 讨论(0)
  • 2020-12-04 17:59

    I had the same error while trying to send push notificaion. Get the updated google-services.json file and replaced with it. Worked for me.

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

    I found this solution:

    • First I check server key is correct or not it was correct which is like AIzaXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    • Then I check Sender Id like 79XXXXXXXX it was also correct.
    • Main issue was in device_ID(UDID) to whom I have to send the notification. Actually DeviceId we got on android side in FCM is different than GCM. You can't use GCM created DeviceId in FCM.
    0 讨论(0)
提交回复
热议问题