-
Notifications
You must be signed in to change notification settings - Fork 1.9k
FCM server response error (pushID?) NotRegistered #1812
Comments
@rolinger push plugin 1.10.3 uses GCM but you are trying to send via FCM. That's probably why you are getting an invalid registration ID error from the server. Did you recently move the server side to FCM? |
@macdonst - I only installed all these plugins just two weeks ago. And got everything working...and from the beginning I used FCM...a few days ago I noticed it was breaking and can't explain why it was working and now its not. What plugin version should I be using for FCM? |
@rolinger FCM support is in the 2.0.0 stream which is currently on RC5 and I hope to be officially out soon. You might want to try forcing a new registration of your app by uninstalling and installing again. |
@macdonst - I see in version 2.0 you removed senderID and replaced with the google-services.json file. I def have not installed the google-services.json file and mine is using the senderID....so mine was working with the current version (1.10.4) as I was receiving push msgs to my phone. In fact I have log messages from June 1st when I originally got all working...it was over the last week I noticed that it wasn't working while testing new app features that required a push notification to be sent. Did something change? I see a new version 1.10.5 was pushed two weeks ago. |
@macdonst - i have uninstalled and reinstalled my app several times now...after each new install I am def getting a new pushID. Oh...and I am on 1.10.4...in your first response you said 1.10.3 |
@rolinger okay cool, with that data point we can reasonably be sure it is the GCM/FCM difference. The biggest difference between 1.10.4 and 1.10.5 is upgrading from GCM 10.2 to 11. |
hmmmm, ok...so something did change. What should my next action be? |
@rolinger if you are using 1.10.x try sending via GCM. If you are stuck with FCM then upgrade to the 2.x stream. |
@macdonst - since everything I have worked with thus far has been FCM, will my senderIDs/Server Keys be different using GCM? Meaning that I need to separately register my app with GCM? Or does it just require sending push notices to the GCM server vs the FCM server? Currently I am sending to https://fcm.googleapis.com/fcm/send - what would that change to? I will try this route first...if it does not work then I will upgrade the plugin to 2.0 for FCM. |
I decided to move to phonegap-plugin-push@2.0.0-rc5. Thus in order to do that I had to update my
Now, based on other reading, I don't have plugin-firebase or plugin-analytics so I don't know what is causing this issue. How can I fix it? Here are my plugins: |
@macdonst - ok...so my specific issue is related then. Interestingly though, the line that it says is throwing the error doesn't have the
ie: |
@macdonst - I also want to make certain I am doing this correctly and there is nothing on my end I am doing wrong. In the Installation documentation for 2.0 you reference the the following SDKs: Compilation
And then provide a screen shot that both A) only shows Android Support Library 23.0.1 and B) does not even list the FirebaseMessaging library. When I open my SDK Manager I have Android Support Library 23.2.1 and can't find anyway to upgrade it to 25.0.1 or higher...also can't find a specific way to even add the Firebase Library. Can you comment on this? Do I still need to apply those SDKs...and if so, how do I do it. I am on Windows 7, and I did the |
@macdonst - found this, could this be of use (last comment by: qpa99c ) ??? |
@macdonst - downgraded back down to v1.10.5...recompiled and reinstalled my app. I honestly have NO IDEA why this is happening - but now its working!
In my app, I am using senderID to generate the pushID:
And in my server, I am using that pushID in the following PHP script:
So...in short.... I changed nothing in my app code or server code. All I really did was upgrade from 1.10.4 to 1.10.5...didn't work. Upgraded to 2.0.0 didn't work...then downgraded back to 1.10.5 and now its all working again. |
After it was all working again...I tested like 10 times. I moved on to other coding...testing some non-related app registration stuff. Uninstalled my app...then reinstalled...and now push notifications are not working again. However, this time all the messages appear to be sending from my server and the FBC Notification console...but the messages are not arriving. |
This thread has been automatically locked. |
Expected Behaviour
Push notification sent from server should be getting "success=1", instead getting "failure=1" and "error=NotRegistered"
Actual Behaviour
Server side error received when trying to push to the phone:
object(stdClass)#4 (5) { ["multicast_id"]=> int(4650881156566144680) ["success"]=> int(0) ["failure"]=> int(1) ["canonical_ids"]=> int(0) ["results"]=> array(1) { [0]=> object(stdClass)#5 (1) { ["error"]=> string(13) "NotRegistered" } } }
Reproduce Scenario (including but not limited to)
I am successfully getting a pushID using my registered senderID. I save that pushID to my server db and then use another script on the server to send a notification to that pushID. That's when i get the "error=NotRegistered" - I think this means the pushID is not registered and therefor is invalid...but how is it possible to even get an invalid pushID?
I actually had all this working two weeks ago and suddenly it all stopped working. I have no idea whats going on. I validated my senderID (app side) and server key (server side) are correct:
Steps to Reproduce
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
Android: 7.0
(Android) What device vendor (e.g. Samsung, HTC, Sony...)
Android LG K20- Plus
Cordova CLI version and cordova platform version
Plugin version
Sample Push Data Payload
Sample Code that illustrates the problem
Logs taken while reproducing problem
The text was updated successfully, but these errors were encountered: