Open pptoan23 opened 7 years ago
The problem with me is "NotRegistered" error response from GCM. The token was registered before and worked well untill "NotRegistered" appear. I changed to FCM service and got the same issue. What should i do with it?
If the client app unregisters with GCM. If the client app is automatically unregistered, which can happen if the user uninstalls the application. For example, on iOS, if the APNS Feedback Service reported the APNS token as invalid. If the registration token expires (for example, Google might decide to refresh registration tokens, or the APNS token has expired for iOS devices). If the client app is updated but the new version is not configured to receive messages.
Maybe try to upgrade the package on all your clients. Some of the old packages using GCM, while the server uses FCM
@pptoan23 Yea I was having the same issue. You are experiencing invalid tokens.
This code: "Push.appCollection.update({ token: currentToken }, { $unset: { token: true } }, { multi: true });" is correct.
To fix your issue you have to keep track of invalid tokens, and force the onTokenRefresh handler, which you can call by using push.unregister(successCallback, errorCallback).
So when the users opens the app again they will have a correct token.
Tracking this...
@raix Was this issue fixed ? I am getting same error. Shall i assume that below should be done in client and not server ? Also what action should be taken on successCallback "To fix your issue you have to keep track of invalid tokens, and force the onTokenRefresh handler, which you can call by using push.unregister(successCallback, errorCallback)."
Hi, I use Meteor 1.2.1. And I have problem with GCM token field of _raix_push_app_tokens, they lost randomly although user still logged in. I suspect the below code from "push/lib/server/server.js":
When does this listener is called with "null" value? Note: I use micro services and they are working with the same DB. Thank you!