Open YvesAmmann opened 6 years ago
@YvesAmmann Seems like the registration id you have is for a different project. Make sure your google-service.json is for the same project as where you are sending.
Hi @macdonst
I’ve downloaded the google-services.json from https://console.firebase.google.com/ and the file is in the builded package. Also the project_number is the same.
Is it possible to refresh the token or something?
HI Same issue occure in my application. FCM every time send the {"error":"NotRegistered"} I am also used same Platform and Version (eg. Android 5.0 or iOS 9.2.1) Android 7.0
Plugin version phonegap-plugin-push 2.1.2
@YvesAmmann I would try completely uninstalling the app and re-installing.
@macdonst Already done without success...
@YvesAmmann how about some logs from when the app starts up and registers for push notifications?
adb locat | grep Push
@macdonst No log entrys for "Push".
push.on('registration', function(data) {
$$.ajax({
type: 'GET',
url: api_url
data: {
device_token: data.registrationId
},
dataType: 'text',
async: true,
timeout: 3000,
success: function(response) {},
error: function(xhr, type) {}
});
});
But this method will be invoked, because my api receives the token.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@YvesAmmann did you ever get this resolved? It seems crazy that you'd get a registration ID but not see any logs in logcat for "Push".
@macdonst Hi, i tried sending notifications using postman, i just copied registrationId from my app console.log. the registered id on android is successful, but the one in copied from ios keeps giving invalidRegistration or notRegistered. i have uninstall the app, resulting in new registrationId, copied the new id to postman but still getting the same error
Hello Folks, I'm too facing the same issue, in my application, I am able to get push once I don't login into the app, after I logged in successfully, FCM says "not registered" as error.
using below dependencies: implementation "com.google.firebase:firebase-messaging:11.0.4" implementation "com.google.firebase:firebase-core:11.0.4"
Please revert me if somebody can help me out.
Hi which platform you want to send the notifications Recently I have also same problem occur for iOS but I have that solved it. Kindly share your screenshot then I can provide you the solution
@amanbajpai hi, this one works for me https://github.com/phonegap/phonegap-plugin-push/issues/2518
@parmarkaushik15 I am looking for Android platform.
@amanbajpai hi, this one works for me #2518
Yup but, I need for Android.
@parmarkaushik15 Please help me. i have face same problem for iOS.
Hi which platform you want to send the notifications Recently I have also same problem occur for iOS but I have that solved it. Kindly share your screenshot then I can provide you the solution
Please help me. i have face same problem for iOS.
@parmarkaushik15 @YogendraPatel I have same problem. I get error many times because of "error":"NotRegistered"}. I am getting same error @parmarkaushik15 for iOS. please tell me solution how you solved this problem
Hi which platform you want to send the notifications Recently I have also same problem occur for iOS but I have that solved it. Kindly share your screenshot then I can provide you the solution
I am also facing same issue for iOS
Hi which platform you want to send the notifications Recently I have also same problem occur for iOS but I have that solved it. Kindly share your screenshot then I can provide you the solution
I am also facing same issue for iOS
HI i have solve that issue. If you want to solve then contact me on skype : live:parmarkaushik15
@parmarkaushik15 Please help me. i have face same problem for iOS.
HI i have solve that issue. If you want to solve then contact me on skype : live:parmarkaushik15
@YogendraPatel @ankur62 For ios platform, please read this thread here https://github.com/phonegap/phonegap-plugin-push/issues/2518
Cordova project on Xcode10 is failure for FCM because of XCode's new build system. If you want to use Google FCM Push Notification with iOS device (Coding with Cordova / Ionic 3) try >this; Opening your cordova/ionic project in the Xcode IDE and change the build system in Workspace >Settings to "Legacy Build System". (Under the File Menu)
iam also facing same issuie for iso
{"multicast_id":4314312645771955637,"success":0,"failure":1,"canonical_ids":0,"results":[{"error":"InvalidRegistration"}]}
I'm also facing same issuie for iOS
I'm also facing same issue for android. {"multicast_id":8832974035271031658,"success":0,"failure":1,"canonical_ids":0,"results":[{"error":"NotRegistered"}]}
any solution for this.
Expected Behaviour
Receive push notification on android in foreground and background mode.
Actual Behaviour
Push notification on android was not delivered with my own sending service and also not with the firebase console. On iOS everything works as expected.
The call push.on('registration') fires a token to my backend service (e.g. "xxx5eqQ9qHw:APA91bFjaaGTxYYnxXeWZfU-5JDfnCY7v2UCnMMpIWAKtDT1-iVzVbPZTL4TG2aSuf7DGul03JOqfJkDClJiekJxXj4JrlzpHQG0qqmRL7WMpzCYSDTKORsrh-961m4-PNz72N4wtxxx").
Now I’m send the JSON to the FCM service and the response is:
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
Android 7.0
(Android) What device vendor (e.g. Samsung, HTC, Sony...)
Sony Xperia
Cordova CLI version and cordova platform version
cordova version 7.1.0 cordova platform version android 6.3.0
Plugin version
phonegap-plugin-push 2.1.2
Sample Push Data Payload
My question
Why is the token successfully send to my backend, but the FCM service give an error "NotRegistered"? Thanks in advance!