Random HTTP ERROR: 400
See original GitHub issueHi, 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?
Issue Analytics
- State:
- Created 6 years ago
- Comments:25 (10 by maintainers)
Top Results From Across the Web
How to Fix a 400 Bad Request Error: 8 Easy Methods
The 400 bad request error is an HTTP status code that describes an error caused by an invalid request. Thus, the server can't...
Read more >What is HTTP error 400 and how do you fix it? - IT PRO
HTTP error 400 causes · 1. Bad URL Syntax · 2. Invalid Cookies · 3. Incorrect file size · 4. Unsynchronized DNS Cache...
Read more >random http 400 errors when retrieving file - Stack Overflow
This error doesn't happen every time, just randomly every few tries. This rules out a lot of possible explanations, like any problem in...
Read more >400 Bad Request Error: What It Is and How to Fix It
The 400 Bad Request Error is an HTTP response status code indicating that the server was unable to process the request sent by...
Read more >What is a Bad Request Error 400 and How Do You Fix It?
HTTP Error 400 – The request hostname is invalid. Why Are You Getting an Error 400? Your computer sends a request to a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Great, thanks for checking.
@jcbrand Oh, new version is released!?! 😃
I’ll test it soonish!