6

I'm trying to deploy an application with push notifications. The problem is that I can not get it to work from a device. While using the emulator, everything is ok but when using a cell phone I get a log saying "AUTHENTICATION_FAILED".

I have checked and the Gmail account is synchronized but is always trying to check me out this error.

Could someone give me a hand?

BlackVegetable
  • 12,594
  • 8
  • 50
  • 82
phipex
  • 721
  • 11
  • 14

3 Answers3

9

This is occurred due to the bad Google Account password. Check your account on the phone.

Bad Google Account password. The Android application should ask the user to enter his/her Google Account password, and let the user retry manually later. Fix on the device side.

Check error codes and explanations here.

Parvin Gasimzade
  • 25,180
  • 8
  • 56
  • 83
  • 1
    Synchronize the account before the test but it says the same error, I'm not sure if I'm misunderstanding but if the account is synchronized. Thanks for the prompt response. – phipex Aug 14 '12 at 15:00
  • It helped parvin,+1 for this !! I had changed my gmail password and did not configure the new password in the device, and that was the root cause of the GCM's AUTHENTICATION_ERROR ! – Shraddha Mar 11 '13 at 11:31
2

The problem was that I had multiple accounts on the phone, for those who have the same problem only has to synchronize with an initial account set up the phone.

phipex
  • 721
  • 11
  • 14
  • So what actually fixed it? was it the initial account that had an incorrect password or did you remove the other accounts? – Chris.D Oct 16 '13 at 15:37
  • gcm only works with the main account in versions prior to 3, if you try it with another account does not work, the point is that for the three previous versions can not change the primary account – phipex Oct 17 '13 at 21:12
  • Sorry I dont understand, it not like you can choose the account that GCM authenticates with. I have a user on android 2.3.3 who is getting this error, he has multiple accounts but all sync properly. Thing is it used to work up until recently so perhaps its just a bug with a recent play services update? – Chris.D Oct 18 '13 at 07:57
1

In my case I face this problem due to a firewall on the network which blocked URLs and ports of GCM. I solve it temporarily by using a VPN service i.e. Hotspot.

To solve permanently I allowed following ports and URLs on firewall.

5228 5229 5230

All IPs which are listed in Google's ASN of 15169

Adnan
  • 5,025
  • 5
  • 25
  • 44