Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion GCM returns "Unavailable"

Received: by 10.52.178.166 with SMTP id cz6mr4671331vdc.1.1341010436498;
        Fri, 29 Jun 2012 15:53:56 -0700 (PDT)
X-BeenThere: android-c2dm@googlegroups.com
Received: by 10.220.204.129 with SMTP id fm1ls2501487vcb.7.gmail; Fri, 29 Jun
 2012 15:53:55 -0700 (PDT)
Received: by 10.52.94.147 with SMTP id dc19mr308362vdb.17.1341010435475;
        Fri, 29 Jun 2012 15:53:55 -0700 (PDT)
Date: Fri, 29 Jun 2012 15:53:54 -0700 (PDT)
From: Monnand <monn...@gmail.com>
To: android-c2dm@googlegroups.com
Cc: android-gcm@googlegroups.com
Message-Id: <a16ab6f5-27a9-4fea-a22d-daa16d6e5bdf@googlegroups.com>
In-Reply-To: <aa6782f2-737c-411a-b9c2-ba2a61b236fc@googlegroups.com>
References: <5899cd98-6459-4414-a88b-94064ad5f6de@googlegroups.com>
 <CAK_C3agf19H9f79Y2rRgqszW2D-A_2nOvaYDKk-2a9pD_v-4EA@mail.gmail.com>
 <aa6782f2-737c-411a-b9c2-ba2a61b236fc@googlegroups.com>
Subject: Re: GCM returns "Unavailable"
MIME-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_406_16996947.1341010434187"

------=_Part_406_16996947.1341010434187
Content-Type: multipart/alternative; 
	boundary="----=_Part_407_18810321.1341010434187"

------=_Part_407_18810321.1341010434187
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

I think it would be better to cc to android-gcm group. I have already 
corrected the code --- It seems like a bug on GCM side.

Here is the message I sent causing "unavailable error"
{"registration_ids":["SOME REG 
ID"],"collapse_key":"c058391ee54cec4b8812ab121411afbaf6de024a","data":{"msg":"Hello 
World"},"delay_while_idle":false,"time_to_live":4294967295}

Here is the message I sent without problem:
{"registration_ids":["SOME REG ID"],"data":{"msg":"Hello World"}}

Then I thought it might be the value of time_to_live field is too large. So 
I tried this:

{"registration_ids":["APA91bHaWwM9ytxfHVBjHZTtQ7Ggw_rovTOYFMzhi5ae-gLySoejokMpBx9krhynlYj_9kG2d3rg7C5carlybQcfIiIlIho4MR1AjWJIhk45SJ4mMFWP038KUP5THTZtVsuAPicio54IRqjSMgCNy9TgOdZAL_toow"],"collapse_key":"67ab7e1dae275e389c9fbc323b68a2b568962294","data":{"msg":"Hello 
World"},"time_to_live":4294967295}

And I got unavailable; but the following data could be sent.

 {"registration_ids":["APA91bHaWwM9ytxfHVBjHZTtQ7Ggw_rovTOYFMzhi5ae-gLySoejokMpBx9krhynlYj_9kG2d3rg7C5carlybQcfIiIlIho4MR1AjWJIhk45SJ4mMFWP038KUP5THTZtVsuAPicio54IRqjSMgCNy9TgOdZAL_toow"],"collapse_key":"1c2ded740aca18f2148fec0a78e9a1a57526440e","data":{"msg":"Hello 
World"},"time_to_live":120}

Would you please check if I am correct? It might be better if set 
time_to_live to the default value if the value in the request is too large.

Regards,
-Monnand




On Friday, June 29, 2012 6:36:29 PM UTC-4, Monnand wrote:
>
> Hi Felipe,
>
> I got it every time I retried. I am using my own code. Is it possible that 
> I got unavailable error because of the error on my side? (According to 
> documents, it should not be possible.)
>
> Here is the result I received:
>
>
> {"multicast_id":5030400576422639801,"success":0,"failure":1,"canonical_ids":0,"results":[{"error":"Unavailable"}]}
>
> Thank you!
>
> Regards,
> -Monnand
>
> On Friday, June 29, 2012 6:04:52 PM UTC-4, Felipe Leme wrote:
>>
>> Did you get it just once or did you get it again when you retried?
>>
>> Usually, you get an 'Unavailable' when the server could not process one 
>> message in the multicast, in which case you should try again. But if you're 
>> always getting that error, it might be caused by something else that we 
>> would have to investigate.
>>
>> Notice that if you use the Sender class from the gcm-server.jar, it has 
>> logic to automatically retry.
>>
>>
>>
>> On Fri, Jun 29, 2012 at 1:33 AM, sparkgene <jun1...@gmail.com> wrote:
>>
>>> I'm working on migrate to gcm.
>>>
>>> Using gcm.jar to get the registration id is successfully done.
>>> Sending the message to gcm endpoint returns HTTP Status 200.
>>>
>>> But the result contains error => Unavailable.
>>>
>>> In the GCM document(
>>> http://developer.android.com/guide/google/gcm/gcm.html) this error 
>>> solution is "If it is Unavailable, you could retry to send it in another 
>>> request."
>>>
>>> Do anyone have information about this error?
>>>
>>>
>>>
>>
------=_Part_407_18810321.1341010434187
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

I think it would be better to cc to android-gcm group. I have already corre=
cted the code --- It seems like a bug on GCM side.<br><br>Here is the messa=
ge I sent causing "unavailable error"<br>{"registration_ids":["SOME REG ID"=
],"collapse_key":"c058391ee54cec4b8812ab121411afbaf6de024a","data":{"msg":"=
Hello World"},"delay_while_idle":false,"time_to_live":4294967295}<br><br>He=
re is the message I sent without problem:<br>{"registration_ids":["SOME REG=
 ID"],"data":{"msg":"Hello World"}}<br><br>Then I thought it might be the v=
alue of time_to_live field is too large. So I tried this:<br><br>{"registra=
tion_ids":["APA91bHaWwM9ytxfHVBjHZTtQ7Ggw_rovTOYFMzhi5ae-gLySoejokMpBx9krhy=
nlYj_9kG2d3rg7C5carlybQcfIiIlIho4MR1AjWJIhk45SJ4mMFWP038KUP5THTZtVsuAPicio5=
4IRqjSMgCNy9TgOdZAL_toow"],"collapse_key":"67ab7e1dae275e389c9fbc323b68a2b5=
68962294","data":{"msg":"Hello World"},"time_to_live":4294967295}<br><br>An=
d I got unavailable; but the following data could be sent.<br><br>&nbsp;{"r=
egistration_ids":["APA91bHaWwM9ytxfHVBjHZTtQ7Ggw_rovTOYFMzhi5ae-gLySoejokMp=
Bx9krhynlYj_9kG2d3rg7C5carlybQcfIiIlIho4MR1AjWJIhk45SJ4mMFWP038KUP5THTZtVsu=
APicio54IRqjSMgCNy9TgOdZAL_toow"],"collapse_key":"1c2ded740aca18f2148fec0a7=
8e9a1a57526440e","data":{"msg":"Hello World"},"time_to_live":120}<br><br>Wo=
uld you please check if I am correct? It might be better if set time_to_liv=
e to the default value if the value in the request is too large.<br><br>Reg=
ards,<br>-Monnand<br><br><br><br><br>On Friday, June 29, 2012 6:36:29 PM UT=
C-4, Monnand wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;mar=
gin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">Hi Felipe,<=
br><br>I got it every time I retried. I am using my own code. Is it possibl=
e that I got unavailable error because of the error on my side? (According =
to documents, it should not be possible.)<br><br>Here is the result I recei=
ved:<br><br>{"multicast_id":<wbr>5030400576422639801,"success":<wbr>0,"fail=
ure":1,"canonical_ids":<wbr>0,"results":[{"error":"<wbr>Unavailable"}]}<br>=
<br>Thank you!<br><br>Regards,<br>-Monnand<br><br>On Friday, June 29, 2012 =
6:04:52 PM UTC-4, Felipe Leme wrote:<blockquote class=3D"gmail_quote" style=
=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"=
><div>Did you get it just once or did you get it again when you retried?</d=
iv><div><br></div><div>Usually, you get an 'Unavailable' when the server co=
uld not process one message in the multicast, in which case you should try =
again. But if you're always getting that error, it might be caused by somet=
hing else that we would have to investigate.</div>

<div><br></div><div>Notice that if you use the Sender class from the gcm-se=
rver.jar, it has logic to automatically retry.</div><div><br></div><div><br=
></div><br><div class=3D"gmail_quote">On Fri, Jun 29, 2012 at 1:33 AM, spar=
kgene <span dir=3D"ltr">&lt;<a href=3D"mailto:jun1...@gmail.com" target=3D"=
_blank">jun1...@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div>I'm working on migrate to gcm.</div><di=
v><br></div><div>Using gcm.jar to get the registration id is successfully d=
one.</div>

<div>Sending the message to gcm endpoint returns HTTP Status 200.</div><div=
><br></div><div>But the result contains error =3D&gt; Unavailable.</div><di=
v><br></div><div>In the GCM document(<a href=3D"http://developer.android.co=
m/guide/google/gcm/gcm.html" target=3D"_blank">http://developer.<wbr>androi=
d.com/guide/google/gcm/<wbr>gcm.html</a>) this error solution is "If it is =
Unavailable, you could retry to send it in another request."</div>

<div><br></div><div>Do anyone have information about this error?</div><div>=
<br></div><div><br></div></blockquote></div><br>
</blockquote></blockquote>
------=_Part_407_18810321.1341010434187--

------=_Part_406_16996947.1341010434187--