Parse Error On Initial Connection To Firebase/Google Cloud Messenger
Issue #119
closed
I'm receiving this parse error as soon as a connection to Firebase / Google Cloud Message Service has been attempted. I'm not sure if the error stems from not invoking the proper build methods or there's an error in using the SSLContext.
OUT: <?xml version="1.0" encoding="UTF-8"?><stream:stream xml:lang="en-US" to="xmpp.googleapis.com" version="1.0" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams">
Connection issue: rocks.xmpp.core.XmppException: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1]
Message: Content is not allowed in prolog.
Comments (4)
-
repo owner -
reporter Perfect. The default SSLSocketFactory worked. Thank you!
-
repo owner - changed status to resolved
SSLSocketFactory worked, I close this issue.
-
repo owner - changed status to closed
- Log in to comment
From the documentation:
You must initiate a Transport Layer Security (TLS) connection. Note that CCS doesn't currently support the STARTTLS extension.
By default this library uses StartTLS (as per the XMPP spec). Try creating aTcpConnectionConfiguration
with aSSLSocketFactory
set, which uses your SSLContext. It should then connect directly with SSL.