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
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.
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.
Firebase has upgraded their server keys to new version. Use new keys instead of old one.
go to settings->project settings->cloud messaging tab
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
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.
I found this solution: