FAQ
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

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to android-gcm@googlegroups.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.

Search Discussions

  • Pconcepcion at Mar 13, 2014 at 1:14 pm
    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

    [1] http://stackoverflow.com/questions/22214007/how-to-troubleshoot-android-gcm-401-error
    On Tuesday, March 11, 2014 9:54:35 AM UTC+1, Matt Innes wrote:

    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
    --
    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+unsubscribe@googlegroups.com.
    To post to this group, send email to android-gcm@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.
  • Costin Manolache at Mar 14, 2014 at 4:29 pm
    Could you send me the registration ID that fails ?


    Costin

    On Thu, Mar 13, 2014 at 6:14 AM, wrote:

    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

    [1]
    http://stackoverflow.com/questions/22214007/how-to-troubleshoot-android-gcm-401-error

    On Tuesday, March 11, 2014 9:54:35 AM UTC+1, Matt Innes wrote:

    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
    --
    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+unsubscribe@googlegroups.com.
    To post to this group, send email to android-gcm@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<https://groups.google.com/d/msgid/android-gcm/d60de8b0-2c99-4638-a2ad-89a37b5810b6%40googlegroups.com?utm_medium=email&utm_source=footer>
    .

    For more options, visit https://groups.google.com/d/optout.
    --
    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+unsubscribe@googlegroups.com.
    To post to this group, send email to android-gcm@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/android-gcm/CAP8-Fq%3DboVxmyT97irZcW-xFM7UNbBmDzy1RznRqYgzA8A7qUw%40mail.gmail.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupandroid-gcm @
categoriesandroid
postedMar 11, '14 at 8:54a
activeMar 14, '14 at 4:29p
posts3
users3
websitedeveloper.android.com...

People

Translate

site design / logo © 2019 Grokbase