Intermittent 401s accessing GCM

90 views
Skip to first unread message

Matt Innes

unread,
Mar 11, 2014, 4:54:35 AM3/11/14
to andro...@googlegroups.com
Hello!

I am trying to use GCM to push notifications from my server to my Android app.   Recently I have been getting intermittent 401s trying to push messages.  The problem has been getting worse, to the point now where more than 50% of the calls fail with a 401.  As I am not changing ANYTHING between the successes and the failures I can only surmise it is some problem with either my configuration on Google's servers or the infrastructure.  To avoid having to explain the intricacies of my overall architecture I have boiled this down to a simple script that checks the validity of my GCM registration id and api key

I have attached 2 files that I hope will illustrate my problem:

1) check_api.sh.clean - this is the script I run to verify.  It prints the date and the uses curl to query the Google REST interface with a registration id and apikey (these have been removed from the script for security)

2) check.output - this is the output of multiple runs of the above script within a period of a minute or so.  Of the 18 attempts made there were 8 successes and 10 failures.   This is running the identical script. 

I am totally stumped by this (and there seem to be very few tools for debugging this server side) and I've invested a large amount of effort porting my app to GCM so any help that can be offered is gratefully appreciated :-)

Many thanks!

Warm regards,
Matt
check.output
check_apikey.sh.clean

pconc...@gmail.com

unread,
Mar 13, 2014, 9:14:13 AM3/13/14
to andro...@googlegroups.com
Hi Matt,

I'm facing a very similar problem as I have posted on Stack overflow [1], I'm also quite surprised with the result, I've done similar tests with similar results.

Just for you to know that it's not only happening to you, if you figure what's going on please let me know... I'll do the same.

Thanks in advance.

Pablo

Costin Manolache

unread,
Mar 14, 2014, 12:29:01 PM3/14/14
to andro...@googlegroups.com
Could you send me the registration ID that fails ? 


Costin


--
You received this message because you are subscribed to the Google Groups "android-gcm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-gcm...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-gcm/d60de8b0-2c99-4638-a2ad-89a37b5810b6%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages