I made my first application that uses Firebase and it works fine. I resume the sources of this one and modifies some cosmetic element, changes the Package ID and the JSON file, of course with a new Firebase project and I do not receive any more notifications, I have this as error:
The sender ID does not match the registration token. Check the sender ID used in the getToken query.
How are you sending the messages? I send the message by the console
Have you updated the server key? No need for now I use console, I have create a new project in the Firebase console and download the JSON fil, put in the project, the package name is the same
Please check if the JSON is *really* the new one ;-) Did you *really* enable FCM for your new project?
Do you send to a device or a topic? Make sure, you update the token via
B4X:
Public Sub UpdateFCMToken
fm.SubscribeToTopic("general") 'you can subscribe to more topics
Log (fm.Token) ' Copy the token and send a message to this...
End Sub
If I send to ALL topic, nothing append, if I send to a device, I got then error: The sender ID does not match the registration token. Check the sender ID used in the getToken query.
The JSON is fresly donwloaded and Package Name is OK, if not that not compile
Does yours (exactly: from the device) look similar?
When I enter a invalid token (just copied a valid token and changed the last 4 chars) I the message "Invalid token" in the Firebase Console. Where does your message "The sender ID does not match the registration token. Check the sender ID used in the getToken query." come from? I only have seen "not registered" or the one from the screenshot...
Yes I sure it simple but I can't point it , this my third project the Firebase , two other work well (Android and Iphone) but this one it a nightmare, check everything 5 time, delete Firebase project/create again.... I can't see where I forgot something
It in french but that mean: The sender ID does not match the registration token. Check the sender ID used in the getToken query.
If I change a caracter in the Token I got the same error of you
I never got problem with that before, but the NEW file it not documented and generate like a ghost , this the reason I don't look them before, when I need to change resources, I change the flag Read Only, modify the file and it change itself (the flag readonly) at compile.