react-native-fcm icon indicating copy to clipboard operation
react-native-fcm copied to clipboard

Not receiving notifications on my device

Open Thanmai-C opened this issue 7 years ago • 7 comments

Hey I am running this project on my android 7 device,i am able to get local notifications. But I am not receiving the server notification. When i click on the send notification/send data/send notification and data/schedule notification i get an error in the console as below:

'Send notification response', { type: 'default', status: 401, ok: false, statusText: undefined, headers: { map: { 'alt-svc': [ 'quic=":443"; ma=2592000; v="39,38,37,36,35"' ], 'x-frame-options': [ 'SAMEORIGIN' ], 'x-content-type-options': [ 'nosniff' ], server: [ 'GSE' ], 'cache-control': [ 'private, max-age=0' ], date: [ 'Fri, 14 Jul 2017 04:46:52 GMT' ], 'x-xss-protection': [ '1; mode=block' ], expires: [ 'Fri, 14 Jul 2017 04:46:52 GMT' ], 'content-type': [ 'text/html; charset=UTF-8' ] } }, url: 'https://fcm.googleapis.com/fcm/send', _bodyInit: '<HTML>\n<HEAD>\n<TITLE>Unauthorized</TITLE>\n</HEAD>\n<BODY BGCOLOR="#FFFFFF" TEXT="#000000">\n<H1>Unauthorized</H1>\n<H2>Error 401</H2>\n</BODY>\n</HTML>\n', _bodyText: '<HTML>\n<HEAD>\n<TITLE>Unauthorized</TITLE>\n</HEAD>\n<BODY BGCOLOR="#FFFFFF" TEXT="#000000">\n<H1>Unauthorized</H1>\n<H2>Error 401</H2>\n</BODY>\n</HTML>\n' }

I am using react native 0.46.1 version and react-native-fcm 7.1.0 version. Please need assistance on this issue to receive remote notifications.

Thanmai-C avatar Jul 14 '17 05:07 Thanmai-C

Do you have you're google services json file on your project?

LMestre14 avatar Jul 18 '17 15:07 LMestre14

Yes i have it my project folder

Thanmai-C avatar Jul 19 '17 04:07 Thanmai-C

Sorry,any solution for remote notifications?

Thanmai-C avatar Jul 20 '17 10:07 Thanmai-C

I am actually experiencing the same problem. I can receive local notifications, but I do not receive any remote notifications.

Also when running the example, I can't "Send Notifications" getting the same error as stated above ( 401 ).

Did anyone else found the same problem?

aeonphyxius avatar Jul 25 '17 11:07 aeonphyxius

Hello is there any solution for this issue??..

zptlwin avatar Oct 05 '17 08:10 zptlwin

Have you setup API keys, google json file etc etc?

evollu avatar Oct 05 '17 17:10 evollu

Any Solution I also getting same response with the status 401 ?

nasir03082409229 avatar Dec 28 '18 16:12 nasir03082409229