converse.js: Random HTTP ERROR: 400
Hi, I am using converse.js 3.0.2 (same happens in 2.0.6) with OpenFire 4.1.3.
Converse is initialized like:
converse.initialize({
authentication: 'prebind',
keepalive: true,
hide_muc_server: true,
auto_reconnect: true,
bosh_service_url: '{{ chat.bosh }}',
show_controlbox_by_default: false,
allow_muc_invitations: false,
jid: '{{ chat.session.jid }}',
sid: '{{ chat.session.sid }}',
rid: '{{ chat.session.rid }}',
auto_join_rooms: [{jid: '{{ chat.room }}', nick: '{{ app.user.username }}'}]
});
It works fine, but in some cases I get responses like:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 400 </title>
</head>
<body>
<h2>HTTP ERROR: 400</h2>
<p>Problem accessing /http-bind/. Reason:
<pre> Bad Request</pre></p>
<hr /><i><small>Powered by Jetty://</small></i>
</body>
</html>
For request:
<body rid='3080009452' xmlns='http://jabber.org/protocol/httpbind'><iq from='name2-collab7@openfire/foo' to='collab7@conference.openfire' type='get' xmlns='jabber:client' id='5a3b3e39-0579-4549-911d-4626acd00bb4:sendIQ'><query xmlns='http://jabber.org/protocol/disco#info'/></iq><iq type='get' id='726ab6d9-06d4-4e42-aede-bcfb8ab8f652:roster' xmlns='jabber:client'><query xmlns='jabber:iq:roster'/></iq><message to='collab7@conference.openfire' type='groupchat' xmlns='jabber:client'><active xmlns='http://jabber.org/protocol/chatstates'/><no-store xmlns='urn:xmpp:hints'/><no-permanent-store xmlns='urn:xmpp:hints'/></message></body>
Request that fails with 404 just before this one is:
<body rid='3851232776' xmlns='http://jabber.org/protocol/httpbind' sid='6w69ragxyv'/>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 404 </title>
</head>
<body>
<h2>HTTP ERROR: 404</h2>
<p>Problem accessing /http-bind/. Reason:
<pre> Invalid SID value.</pre></p>
<hr /><i><small>Powered by Jetty://</small></i>
</body>
</html>
I noticed this 404s before, that’s why I put auto_reconnect: true
.
Any idea why this can happen? Can I in worst case listen to this error and refresh the page if 400?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 25 (10 by maintainers)
Great, thanks for checking.
@jcbrand Oh, new version is released!?! 😃
I’ll test it soonish!
@jcbrand Thanks! Please keep me posted on this, I’d like to update to get fix for this issue.
I haven’t had time to look at it yet