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
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
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 firstname.lastname@example.org.
To post to this group, send email to email@example.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-gcm/3c342249-0391-457a-9e7d-7e4873bd190e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.