1

I'm trying to run the GCM CCS server sample found at https://github.com/antoinecampbell/GCMCCSDemo/blob/master/GCM_CCS_Application/src/com/antoinecampbell/gcmserver/SmackCcsClient.java

When I run it, I get the following error:

java.io.EOFException: no more data available - expected end tag </stream:stream> to close start tag <stream:stream> from line 1, parser stopped on END_TAG seen ...</mechanisms></stream:features>... @1:344

and I can see that the response from the server is

<stream:stream from="gcm.googleapis.com" id="275112302C7D0892" version="1.0" xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client">
<stream:features><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>X-OAUTH2</mechanism><mechanism>X-GOOGLE-TOKEN</mechanism><mechanism>PLAIN</mechanism></mechanisms></stream:features>

Is the response correct? Should there not be a closing tag for <stream:stream>?

John Moffitt
  • 5,730
  • 7
  • 30
  • 39
  • You should try to catch and handle your exception. And also maybe [**this**](http://stackoverflow.com/questions/25882594/java-io-eofexception-no-more-data-available-expected-end-tag-streamstream) can give you some hint as he/she experienced similar exception problem due to jabber server issues. – so_jin_ee Jan 21 '15 at 17:08
  • Thank you for the comment. I did see that question but mine was failing instantly, so a ping to keep connection alive wouldn't help. Also the example i was using does try to connect when the connection drops, but it would crash every time because it wasnt finding a close tag for from google. – John Moffitt Jan 21 '15 at 17:12

0 Answers0