EddyVerbruggen / nativescript-plugin-firebase

:fire: NativeScript plugin for Firebase
https://firebase.google.com
MIT License
1.01k stars 444 forks source link

JS: AUTHENTICATION_FAILED #1580

Closed meparashar closed 4 years ago

meparashar commented 4 years ago

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.

meparashar commented 4 years ago

I'm trying this on android emulator.

manojdcoder commented 4 years ago

Have you installed Google Play services on your emulator?

meparashar commented 4 years ago

Yes, they are installed.

manojdcoder commented 4 years ago

Have you logged on the emulator with a Google Account, which actually enables Play Services?

meparashar commented 4 years ago

Yup, tried logging in with own account as well.

manojdcoder commented 4 years ago

Meaning it worked and you are able to access Play Store?

meparashar commented 4 years ago

no, i meant i tried with own account as well but still received the same error.

manojdcoder commented 4 years ago

Do you have a screenshot? I'm not sure how you could get the same error while logging in with Google for Play Services.

meparashar commented 4 years ago

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.

Screen Shot 2020-04-08 at 10 06 08 AM Screen Shot 2020-04-08 at 10 07 17 AM Screen Shot 2020-04-08 at 10 05 27 AM
meparashar commented 4 years ago

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'); });

manojdcoder commented 4 years ago

How about on real device, did you test it yet?

meparashar commented 4 years ago

nope, just on emulator.. i know it's supposed to work on emulator and unlike ios you can receive notifications on android emulator.

meparashar commented 4 years ago

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.