Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot auth with v0.6.0 #9

Closed
lboynton opened this issue Feb 17, 2012 · 4 comments
Closed

Cannot auth with v0.6.0 #9

lboynton opened this issue Feb 17, 2012 · 4 comments
Assignees

Comments

@lboynton
Copy link
Contributor

Hi, it seems with v0.6.0 I can no longer authenticate with the XMPP server (I'm using ejabberd). Here is the log:

+----------------------------------------------------------------------------------------------------------------+
| Starting WEBSOCKET DRAFT 10 server 'v0.6.0' on ws://0.0.0.0:5280' at 'Fri Feb 17 2012 10:35:42 GMT+0000 (GMT)' |
+----------------------------------------------------------------------------------------------------------------+
[2012-02-17 10:35:50.702] [INFO] [http-server.js] - RECD: <body xmlns="http://jabber.org/protocol/httpbind" content="text/xml charset=utf-8" rid="9487908443" xml:lang="en" hold="1" to="abc.com" xmlns:xmpp="urn:xmpp:xbosh" xmpp:version="1.0" wait="60" route="xmpp:my.jabber.server:5222"/>
[2012-02-17 10:35:50.710] [INFO] [xmpp-proxy.js] - fef2a90b-72bd-4754-8be7-ddd32ad9b0a3 9adb3ccc-9adb-4b1b-8033-6c5ac76a5c9a Sent: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" to="abc.com" version="1.0">
[2012-02-17 10:35:50.713] [INFO] [xmpp-proxy.js] - fef2a90b-72bd-4754-8be7-ddd32ad9b0a3 9adb3ccc-9adb-4b1b-8033-6c5ac76a5c9a _on_data RECD: <?xml version='1.0'?><stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='3344545251' from='abc.com' version='1.0' xml:lang='en'><stream:features><starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/><mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><mechanism>SCRAM-SHA-1</mechanism><mechanism>DIGEST-MD5</mechanism><mechanism>PLAIN</mechanism></mechanisms></stream:features>
[2012-02-17 10:35:50.714] [INFO] [xmpp-proxy.js] - fef2a90b-72bd-4754-8be7-ddd32ad9b0a3 9adb3ccc-9adb-4b1b-8033-6c5ac76a5c9a _on_stanza parsed: <stream:features><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>SCRAM-SHA-1</mechanism><mechanism>DIGEST-MD5</mechanism><mechanism>PLAIN</mechanism></mechanisms></stream:features>
[2012-02-17 10:35:50.715] [INFO] [xmpp-proxy.js] - fef2a90b-72bd-4754-8be7-ddd32ad9b0a3 9adb3ccc-9adb-4b1b-8033-6c5ac76a5c9a Sent: <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>
[2012-02-17 10:35:50.715] [INFO] [xmpp-proxy.js] - fef2a90b-72bd-4754-8be7-ddd32ad9b0a3 9adb3ccc-9adb-4b1b-8033-6c5ac76a5c9a _on_data RECD: <proceed xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
[2012-02-17 10:35:50.717] [INFO] [xmpp-proxy.js] - fef2a90b-72bd-4754-8be7-ddd32ad9b0a3 9adb3ccc-9adb-4b1b-8033-6c5ac76a5c9a _on_stanza parsed: <proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>
[2012-02-17 10:35:50.749] [INFO] [xmpp-proxy.js] - fef2a90b-72bd-4754-8be7-ddd32ad9b0a3 9adb3ccc-9adb-4b1b-8033-6c5ac76a5c9a Sent: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" to="abc.com" version="1.0">
[2012-02-17 10:35:50.750] [INFO] [xmpp-proxy.js] - fef2a90b-72bd-4754-8be7-ddd32ad9b0a3 9adb3ccc-9adb-4b1b-8033-6c5ac76a5c9a _on_data RECD: <?xml version='1.0'?><stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='2692183849' from='abc.com' version='1.0' xml:lang='en'><stream:features><mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><mechanism>SCRAM-SHA-1</mechanism><mechanism>DIGEST-MD5</mechanism><mechanism>PLAIN</mechanism></mechanisms></stream:features>
[2012-02-17 10:35:50.751] [ERROR] [xmpp-proxy.js] - fef2a90b-72bd-4754-8be7-ddd32ad9b0a3 9adb3ccc-9adb-4b1b-8033-6c5ac76a5c9a _on_stream_error - will terminate: undefined
[2012-02-17 10:35:50.751] [INFO] [xmpp-proxy.js] - fef2a90b-72bd-4754-8be7-ddd32ad9b0a3 9adb3ccc-9adb-4b1b-8033-6c5ac76a5c9a Sent: </stream:stream>
[2012-02-17 10:35:50.753] [INFO] [response.js] - SENT: <body xmlns="http://jabber.org/protocol/httpbind" type="terminate"/>

It works with v0.5.6, so I assume this is a new bug. For some reason it thinks there is a stream error, but it looks fine to me?

@lboynton
Copy link
Contributor Author

OK, I now know the actual error is "will terminate: XML or text declaration not at start of entity". I had this issue before because I was sending stanzas with the XML declaration: . When I took that out it worked. My question is should stanzas include the XML declaration? In this case it is ejabberd which is sending it so I'm thinking this is normal behaviour?

@dhruvbird
Copy link
Collaborator

We've switched to a new SAX based XML parser for better speed. This might be due to the switch to a SAX based parser. The XML generated by ejabbed looks fine. Will fix.

@ghost ghost assigned satyamshekhar Feb 17, 2012
satyamshekhar added a commit that referenced this issue Feb 18, 2012
@satyamshekhar
Copy link
Collaborator

Can you please check if commit 0caf940(or current master) fixes the issue.

@lboynton
Copy link
Contributor Author

I've tested with current master and can confirm that it now works for me. Thanks!

satyamshekhar added a commit that referenced this issue Feb 23, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants