gerardguerin Member Licensed User Longtime User Nov 25, 2016 #1 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. Any idea?
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. Any idea?
Erel B4X founder Staff member Licensed User Longtime User Nov 27, 2016 #2 How are you sending the messages? Have you updated the server key? Upvote 0
KMatle Expert Licensed User Longtime User Nov 27, 2016 #3 gerardguerin said: changes the Package ID Click to expand... Did you add the "new" app (new package name = new app) to the FCM project via console? Upvote 0
gerardguerin said: changes the Package ID Click to expand... Did you add the "new" app (new package name = new app) to the FCM project via console?
gerardguerin Member Licensed User Longtime User Nov 27, 2016 #4 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 Upvote 0
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
Erel B4X founder Staff member Licensed User Longtime User Nov 27, 2016 #5 Note that you shouldn't send them with the console. Only with the http request from the B4J code. Upvote 0
KMatle Expert Licensed User Longtime User Nov 27, 2016 #6 Erel said: Note that you shouldn't send them with the console. Only with the http request from the B4J code. Click to expand... Yep. But for a quick test, it's ok... 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 Code: Copy 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 Upvote 0
Erel said: Note that you shouldn't send them with the console. Only with the http request from the B4J code. Click to expand... Yep. But for a quick test, it's ok... 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 Code: Copy 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
gerardguerin Member Licensed User Longtime User Nov 27, 2016 #7 KMatle said: Did you *really* enable FCM for your new project? Click to expand... Yes this project is almost a clone of another one, change cosmetic, package name and JSON file Erel said: Note that you shouldn't send them with the console Click to expand... For a test is useful, and for the two other project that work for testing purpose KMatle said: Do you send to a device or a topic? Click to expand... 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 Upvote 0
KMatle said: Did you *really* enable FCM for your new project? Click to expand... Yes this project is almost a clone of another one, change cosmetic, package name and JSON file Erel said: Note that you shouldn't send them with the console Click to expand... For a test is useful, and for the two other project that work for testing purpose KMatle said: Do you send to a device or a topic? Click to expand... 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
KMatle Expert Licensed User Longtime User Nov 27, 2016 #8 I never use a Sender ID (neither in my sending apps nor in my php server). A device token looks like Code: Copy c4qDPptGpY8:APA91bGiK6FrhnCuC96bTDnkbPvfAZRKxlxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 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... It must be something simple Upvote 0
I never use a Sender ID (neither in my sending apps nor in my php server). A device token looks like Code: Copy c4qDPptGpY8:APA91bGiK6FrhnCuC96bTDnkbPvfAZRKxlxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 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... It must be something simple
gerardguerin Member Licensed User Longtime User Nov 27, 2016 #9 KMatle said: Does yours (exactly: from the device) look similar? Click to expand... Yes, I do a copy / paste to be sure KMatle said: It must be something simple Click to expand... 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 Upvote 0
KMatle said: Does yours (exactly: from the device) look similar? Click to expand... Yes, I do a copy / paste to be sure KMatle said: It must be something simple Click to expand... 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
KMatle Expert Licensed User Longtime User Dec 7, 2016 #10 Solution: Be carefol to use Code: Copy #CustomBuildAction: 1, c:\windows\system32\attrib.exe, +r res\*.* /s You can use this code to mark all files under res folder as read-only Click to expand... https://www.b4x.com/android/forum/threads/modules-attributes.24721/#content Yes, but then nothing will be updated Upvote 0
Solution: Be carefol to use Code: Copy #CustomBuildAction: 1, c:\windows\system32\attrib.exe, +r res\*.* /s You can use this code to mark all files under res folder as read-only Click to expand... https://www.b4x.com/android/forum/threads/modules-attributes.24721/#content Yes, but then nothing will be updated
gerardguerin Member Licensed User Longtime User Dec 7, 2016 #11 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. Upvote 0
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.