You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 1, 2022. It is now read-only.
What steps will reproduce the problem?
1. From the application server using the supplied gcm-server.jar helper
classes, attempt to send a multicast message to the GCM server using API
parameters that would result in the GCM replying with a non-200 HTTP status
(Eg. 401 for error authenticating the sender account)
What is the expected output? What do you see instead?
The expected result is for the Sender to throw a InvalidRequestException
similar to how it does for non-multi cast messages. This would allow the user
of the class to handle the problem accordingly.
Instead, using the attached test case, the send request fails with:
Exception in thread "main" java.lang.IllegalArgumentException: argument cannot
be null
at com.google.android.gcm.server.Sender.nonNull(Sender.java:553)
at com.google.android.gcm.server.Sender.getString(Sender.java:534)
at com.google.android.gcm.server.Sender.sendNoRetry(Sender.java:365)
at com.google.android.gcm.server.Sender.send(Sender.java:261)
What version of the product are you using? On what operating system?
The gcm-server.jar MANIFEST.MF file indicates:
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.2
Created-By: 1.6.0-google-v4-61258-31622288 (Sun Microsystems Inc.)
Implementation-Vendor: Google
Implementation-Title: Google Cloud Messaging - server support
Implementation-Version: 1.0.2
This has been tested under Linux on two machines (same result): Ubuntu 10.04
LTS with java 1.6.0_26 and CentOS release 5.8 with 1.6.0_20.
Please provide any additional information below.
The original stackoverflow entry can be found here:
http://stackoverflow.com/questions/11878428/exception-on-web-server-while-implem
enting-google-cloud-messaging/11944282#11944282
gcm group entry:
https://groups.google.com/forum/#!topic/android-gcm/VZhq7-QdLkA%5B1-25%5D
Attached is a test class which reproduces the problem.
Original issue reported on code.google.com by loconet on 14 Aug 2012 at 6:55
Hi, I am getting this error because conn.getErrorStream() is returning null.
The changes you made to Sender do not address this error, as getString() is
still called the same way in getAndClose(). See
http://stackoverflow.com/a/17491468/1596587
Thanks!
Original comment by josh.all...@gmail.com on 5 Jul 2013 at 2:56
Original issue reported on code.google.com by
loconet
on 14 Aug 2012 at 6:55Attachments:
The text was updated successfully, but these errors were encountered: