Closed meparashar closed 4 years ago
I'm trying this on android emulator.
Have you installed Google Play services on your emulator?
Yes, they are installed.
Have you logged on the emulator with a Google Account, which actually enables Play Services?
Yup, tried logging in with own account as well.
Meaning it worked and you are able to access Play Store?
no, i meant i tried with own account as well but still received the same error.
Do you have a screenshot? I'm not sure how you could get the same error while logging in with Google for Play Services.
Pls excuse my naive questions, but what do you mean by logging in with google for play services. I logged in to my google account (same one using which I log in to my gmail) and then launched my app via tns debug android etc.
errrrrrrr blocks are inside my catch of messaging.getCurrentPushToken call.
messaging.getCurrentPushToken() .then(deviceToken => { console.log(
Current push token: ${deviceToken}) }).catch((err) => { console.log('errrrrrrr'); console.dir(err); console.log(err); console.log('errrrrrrr'); });
How about on real device, did you test it yet?
nope, just on emulator.. i know it's supposed to work on emulator and unlike ios you can receive notifications on android emulator.
Hi Manoj, I think there's some mistake i made. When i logged in, i did, by going to settings > accounts, which didn't solve it. But then I clicked on play icon on home screen and logged in there which seem to have worked. I'm no longer getting the authentication related error. Thank you for your pointers. Thanks.
On trying to get push token (messaging.getCurrentPushToken) or to register push notification/handlers the console prints JS: AUTHENTICATION_FAILED on android platform. On iOS, everything works fine.