Open stevenroose opened 8 years ago
I encountered this issue using Prosody 0.9.10. It also appears to be described in issue #439. I was able to fix it by setting consider_bosh_secure = true;
in the global configuration--I'm proxying to bosh on the local server, so there's no security issue.
I also was able to fix it by changing c2s_require_encryption = false;
, but that's obviously not ideal if you wanted it set to true in the first place.
According to the other thread, you can also use bosh over HTTPS to fix the issue, but I didn't try it myself.
With Candy debugging enabled, I see the following:
[Strophe][INFO]: Websocket open
SENT: <stream:stream to='localhost' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>
That's not how you open an XMPP-in-WebSocket stream according to RFC7395. It changed in draft-ietf-xmpp-websocket-01 to sending a self-closing <open />
element, due to concerns about lack of streaming XML parsers in browser.
Thus, this is a strophe issue.
Looks like this should be fixed by updating Strophe.js to 1.2.0 or later.
I have both BOSH and Websockets setup for my domain (I cannot test them however, but Kaiwa used to work in the past).
This is what happens:
/http-bind
, the "Connecting" window stays forever./xmpp-websocket
, a very brief "Disconnected" is shown and the login screen comes up again.These are the Prosody logs during the login attempts: https://gist.github.com/stevenroose/b278c00bc9a1ce9ba57fe75b54f06079