Converse.js: Random HTTP ERROR: 400

Created on 29 Apr 2017  路  25Comments  路  Source: conversejs/converse.js

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='[email protected]' 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='[email protected]' 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>


md5-8328d3f7cad55a6d7f1e7e7a9b41a2b1




md5-b2fc215ee8400f145acf490aa8050c75


<hr /><i><small>Powered by Jetty://</small></i>
</body>
</html>

screenshot from 2017-04-29 10-05-18

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?

All 25 comments

So you first get a 404 with error Invalid SID value and then you get a 400?

You should check the logs of your XMPP server (turn on debugging) to see if there is any information there.

It might be that the BOSH session expires on the XMPP server's side, and then the next time a request comes in from Strophe/Converse, the SID (Session ID) is invalid because the associated session no longer exists, and the XMPP server therefore returns a 404.

I guess Strophe/Converse then tries again with the same SID and then the XMPP server returns a 400. However, these are just guesses. I assume you'll find more info in your XMPP server's logs.

What XMPP server are you using?

What happens when you get a 400, does converse.js not try to reconnect?

@jcbrand Thanks for blazing fast response!

Sometimes is just a series of 404:

screenshot from 2017-04-29 10-34-53

I just noticed this error in js console: Error: attemptPreboundSession: If you use prebind and not keepalive, then you MUST supply JID, RID and SID values or a prebind_url..

Even I have:

converse.initialize({
        authentication: 'prebind',
        keepalive: true,
        hide_muc_server: true,
        auto_reconnect: true,
        bosh_service_url: 'http://localhost:7070/http-bind/',
        show_controlbox_by_default: false,
        allow_muc_invitations: false,
        jid: 'name20-collab11@openfire/foo',
        sid: '467nvfarj4',
        rid: '9490944584',
        auto_join_rooms: [{jid: '[email protected]', nick: 'name20'}]
    });`

in the source of the page. :0

I don't remember seeing it in 2.0.6.

After 400, I get few more 400 errors and that's it.

With series of 404 converse.js 3.0.2 sometimes shows:

screenshot from 2017-04-29 10-36-43

400 error can end up with where you can type but messages are not getting through.

@jcbrand Found:

2017.04.29 08:41:33 org.jivesoftware.openfire.http.HttpBindServlet - Root element 'body' does not contain a SID attribute value in parsed request data from [172.19.0.1] in OpenFire info.log

2017.04.29 08:47:26 org.jivesoftware.openfire.http.HttpSession - Unable to deliver a stanza (it is being queued instead), although there are available connections! RID / Connection processing is out of sync!
in OpenFire warn.log

I don't think auto_reconnect: true can work when you manually pass in the rid and sid parameters (that might also explain why a sid is not included in some requests). Instead, use the credentials_url option to set a URL where the tokens can be fetched.

Then, when the connection drops, converse.js will automatically call that URL to get new tokens.

@jcbrand How should credentials_url look for code like?

For the code like this:

converse.initialize({
        authentication: 'prebind',
        keepalive: true,
        hide_muc_server: true,
        auto_reconnect: true,
        bosh_service_url: 'http://localhost:7070/http-bind/',
        show_controlbox_by_default: false,
        allow_muc_invitations: false,
        jid: 'name20-collab11@openfire/foo',
        sid: '467nvfarj4',
        rid: '9490944584',
        auto_join_rooms: [{jid: '[email protected]', nick: 'name20'}]
    });`

? Do you have some example. It's strange that there is nothing in the docs about the format of credentials_url.

Thanks!

In my previous comment I linked to the docs that describes the format.

See here: https://conversejs.org/docs/html/configuration.html#credentials-url

@jcbrand I see, thanks!

Looks like this requires HTTPS connection? Got Password fields present on an insecure (http://) page. This is a security risk that allows user login credentials to be stolen.

Here is how my code looks now:

 converse.initialize({
        authentication: 'login',
        keepalive: true,
        hide_muc_server: true,
        auto_reconnect: true,
        bosh_service_url: 'http://localhost:7070/http-bind/',
        show_controlbox_by_default: false,
        allow_muc_invitations: false,
        credentials_url: '/chat/credentials/21',
        auto_join_rooms: [{jid: '[email protected]', nick: 'name2'}]
    });

You're not supposed to have password fields, the user should be logged in automatically.

I think you need to set auto_login to true.

OK, that error is gone after setting auto_login: true, now my code looks like this:

converse.initialize({
    authentication: 'login',
    keepalive: true,
    auto_login: true,
    hide_muc_server: true,
    auto_reconnect: true,
    bosh_service_url: 'http://localhost:7070/http-bind/',
    show_controlbox_by_default: false,
    allow_muc_invitations: false,
    credentials_url: '/web/app_dev.php/chat/credentials/21',
    auto_join_rooms: [{jid: '[email protected]', nick: 'name2'}]
});

Worked, but after several refreshes I get: Error: A "url" property or function must be specified in converse.js:46572:11, and chat window looks like https://cloud.githubusercontent.com/assets/208957/25554212/d2b22cee-2cc7-11e7-9393-393edad0e50b.png again and tries to reconnect indefinatelly.

This looks like backbone error in:

  // Throw an error when a URL is needed, and none is supplied.
  var urlError = function() {
    throw new Error('A "url" property or function must be specified');
  };

I think we are on the right path, thanks for your help and answers, really appreciate it.

@jcbrand Any idea about A "url" property or function must be specified in converse.js:46572:11? I don't see a reason for it in my code. :)

That error happens when data is saved to a model (ChatBox or ControlBox) that wasn't properly initialized.

Use an unminified bundle, put debug to true and then paste the full stacktrace of any errors you see in the console.

@jcbrand Thanks for being available to help on this, really appreciate that!

Here is the info you requested, it's large since it's reconnects indefinately:

request id 6.1 state changed to 2  converse.js:47357:17
request id 6.1 state changed to 4  converse.js:47357:17
ERROR: request id 6.1 error 0 happened  converse.js:47355:17
request errored, status: 0, number of errors: 1  converse.js:47357:17
_throttledRequestHandler called with 1 requests  converse.js:47357:17
request id 7.1 posting  converse.js:47357:17
request id 7.1 state changed to 1  converse.js:47357:17
<body rid="2275859185" sid="5omoqpqkmg"/>  converse.js:47357:17
request id 7.2 state changed to 2  converse.js:47357:17
request id 7.2 state changed to 3  converse.js:47357:17
request id 7.2 state changed to 4  converse.js:47357:17
removing request  converse.js:47357:17
_throttledRequestHandler called with 0 requests  converse.js:47357:17
request id 7 should now be removed  converse.js:47357:17
request id 7.2 got 200  converse.js:47357:17
_dataRecv called  converse.js:47357:17
<body xmlns="http://jabber.org/protocol/httpbind" ack="2275859185"/>  converse.js:47357:17
no requests during idle cycle, sending blank request  converse.js:47357:17
_throttledRequestHandler called with 1 requests  converse.js:47357:17
request id 8.0 posting  converse.js:47357:17
request id 8.0 state changed to 1  converse.js:47357:17
<body rid="2275859186" sid="5omoqpqkmg"/>  converse.js:47357:17
Status changed to: ATTACHED  converse.js:47357:17
Attached  converse.js:47357:17
no requests during idle cycle, sending blank request  converse.js:47357:17
_throttledRequestHandler called with 1 requests  converse.js:47357:17
request id 1.0 posting  converse.js:47357:17
request id 1.0 state changed to 1  converse.js:47357:17
<body rid="2275859187" sid="5omoqpqkmg"/>  converse.js:47357:17
_throttledRequestHandler called with 1 requests  converse.js:47357:17
_processRequest: first request has readyState of 1  converse.js:47357:17
_throttledRequestHandler called with 1 requests  converse.js:47357:17
_processRequest: first request has readyState of 1  converse.js:47357:17
_throttledRequestHandler called with 2 requests  converse.js:47357:17
_processRequest: first request has readyState of 1  converse.js:47357:17
request id 2.0 posting  converse.js:47357:17
request id 2.0 state changed to 1  converse.js:47357:17
<body rid="2275859188" sid="5omoqpqkmg"><iq from="name2-collab7@openfire/dfoo" to="[email protected]" type="get" id="76da11db-2a9e-4492-af2e-704102739e60:sendIQ"><query/></iq><iq type="get" id="bf2be06e-b4d7-47a4-8309-0b506ecb7260:roster"><query/></iq></body>  converse.js:47357:17
request id 1.1 state changed to 2  converse.js:47357:17
request id 1.1 state changed to 3  converse.js:47357:17
request id 1.1 state changed to 4  converse.js:47357:17
removing request  converse.js:47357:17
_throttledRequestHandler called with 1 requests  converse.js:47357:17
_processRequest: first request has readyState of 1  converse.js:47357:17
request id 1 should now be removed  converse.js:47357:17
request id 1.1 got 200  converse.js:47357:17
_dataRecv called  converse.js:47357:17
<body xmlns="http://jabber.org/protocol/httpbind" type="terminate" condition="policy-violation"/>  converse.js:47357:17
Status changed to: CONNFAIL  converse.js:47357:17
_doDisconnect was called  converse.js:47357:17
Status changed to: DISCONNECTED  converse.js:47357:17
RECONNECTING  converse.js:47357:17
The connection has dropped, attempting to reconnect.  converse.js:47357:17
POST 
XHR 
http://localhost:7070/http-bind/ [HTTP/1.1 404 Invalid SID value. 2ms]
request id 2.1 state changed to 2  converse.js:47357:17
request id 2.1 state changed to 3  converse.js:47357:17
request id 2.1 state changed to 4  converse.js:47357:17
removing request  converse.js:47357:17
_throttledRequestHandler called with 0 requests  converse.js:47357:17
request id 2 should now be removed  converse.js:47357:17
ERROR: request id 2.1 error 404 happened  converse.js:47355:17
request errored, status: 404, number of errors: 1  converse.js:47357:17
Status changed to: DISCONNECTING  converse.js:47357:17
_doDisconnect was called  converse.js:47357:17
Status changed to: DISCONNECTED  converse.js:47357:17
Status changed to: CONNECTING  converse.js:47357:17
_throttledRequestHandler called with 1 requests  converse.js:47357:17
request id 3.0 posting  converse.js:47357:17
request id 3.0 state changed to 1  converse.js:47357:17
<body rid="4244272870" to="openfire" xml:lang="en" wait="60" hold="1" content="text/xml; charset=utf-8" ver="1.6" xmpp:version="1.0" xmlns:xmpp="urn:xmpp:xbosh"/>  converse.js:47357:17
request id 3.1 state changed to 2  converse.js:47357:17
request id 3.1 state changed to 3  converse.js:47357:17
request id 3.1 state changed to 4  converse.js:47357:17
removing request  converse.js:47357:17
_throttledRequestHandler called with 0 requests  converse.js:47357:17
request id 3 should now be removed  converse.js:47357:17
request id 3.1 got 200  converse.js:47357:17
_connect_cb was called  converse.js:47357:17
<body xmlns="http://jabber.org/protocol/httpbind" xmlns:stream="http://etherx.jabber.org/streams" from="openfire" authid="73sg4peiob" sid="73sg4peiob" secure="true" requests="2" inactivity="30" polling="5" wait="60" hold="1" ack="4244272870" maxpause="300" ver="1.6"><stream:features><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>PLAIN</mechanism></mechanisms><register xmlns="http://jabber.org/features/iq-register"/><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/><session xmlns="urn:ietf:params:xml:ns:xmpp-session"><optional/></session></stream:features></body>  converse.js:47357:17
_throttledRequestHandler called with 0 requests  converse.js:47357:17
_throttledRequestHandler called with 1 requests  converse.js:47357:17
request id 4.0 posting  converse.js:47357:17
request id 4.0 state changed to 1  converse.js:47357:17
<body rid="4244272871" sid="73sg4peiob"><auth mechanism="PLAIN">bmFtZTItY29sbGFiN0BvcGVuZmlyZQBuYW1lMi1jb2xsYWI3ADQyYmNjZDdkZWZmMjJlMDI4MzkzNWNkMjQ2M2VmOGVj</auth></body>  converse.js:47357:17
Error: A "url" property or function must be specified  converse.js:46572:11
request id 4.1 state changed to 2  converse.js:47357:17
request id 4.1 state changed to 3  converse.js:47357:17
request id 4.1 state changed to 4  converse.js:47357:17
removing request  converse.js:47357:17
_throttledRequestHandler called with 0 requests  converse.js:47357:17
request id 4 should now be removed  converse.js:47357:17
request id 4.1 got 200  converse.js:47357:17
_dataRecv called  converse.js:47357:17
<body xmlns="http://jabber.org/protocol/httpbind" ack="4244272871"><success xmlns="urn:ietf:params:xml:ns:xmpp-sasl"/></body>  converse.js:47357:17
SASL authentication succeeded.  converse.js:47357:17
_throttledRequestHandler called with 0 requests  converse.js:47357:17
_throttledRequestHandler called with 1 requests  converse.js:47357:17
request id 5.0 posting  converse.js:47357:17
request id 5.0 state changed to 1  converse.js:47357:17
<body rid="4244272872" sid="73sg4peiob" to="openfire" xml:lang="en" xmpp:restart="true" xmlns:xmpp="urn:xmpp:xbosh"/>  converse.js:47357:17
request id 5.1 state changed to 2  converse.js:47357:17
request id 5.1 state changed to 3  converse.js:47357:17
request id 5.1 state changed to 4  converse.js:47357:17
removing request  converse.js:47357:17
_throttledRequestHandler called with 0 requests  converse.js:47357:17
request id 5 should now be removed  converse.js:47357:17
request id 5.1 got 200  converse.js:47357:17
_dataRecv called  converse.js:47357:17
<body xmlns="http://jabber.org/protocol/httpbind" xmlns:stream="http://etherx.jabber.org/streams"><stream:features><register xmlns="http://jabber.org/features/iq-register"/><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/><session xmlns="urn:ietf:params:xml:ns:xmpp-session"><optional/></session></stream:features></body>  converse.js:47357:17
_throttledRequestHandler called with 0 requests  converse.js:47357:17
_throttledRequestHandler called with 1 requests  converse.js:47357:17
request id 6.0 posting  converse.js:47357:17
request id 6.0 state changed to 1  converse.js:47357:17
<body rid="4244272873" sid="73sg4peiob"><iq type="set" id="_bind_auth_2"><bind><resource>dfoo</resource></bind></iq></body>  converse.js:47357:17
request id 6.1 state changed to 2  converse.js:47357:17
request id 6.1 state changed to 3  converse.js:47357:17
request id 6.1 state changed to 4  converse.js:47357:17
removing request  converse.js:47357:17
_throttledRequestHandler called with 0 requests  converse.js:47357:17
request id 6 should now be removed  converse.js:47357:17
request id 6.1 got 200  converse.js:47357:17
_dataRecv called  converse.js:47357:17
<body xmlns="http://jabber.org/protocol/httpbind" ack="4244272873"><iq type="result" id="_bind_auth_2" to="openfire/73sg4peiob" xmlns="jabber:client"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><jid>name2-collab7@openfire/dfoo</jid></bind></iq></body>  converse.js:47357:17
_throttledRequestHandler called with 0 requests  converse.js:47357:17
_throttledRequestHandler called with 1 requests  converse.js:47357:17
request id 7.0 posting  converse.js:47357:17
request id 7.0 state changed to 1  converse.js:47357:17
<body rid="4244272874" sid="73sg4peiob"><iq type="set" id="_session_auth_2"><session/></iq></body>  converse.js:47357:17
RECONNECTING  converse.js:47357:17
The connection has dropped, attempting to reconnect.  converse.js:47357:17
request id 7.1 state changed to 2  converse.js:47357:17
request id 7.1 state changed to 3  converse.js:47357:17
request id 7.1 state changed to 4  converse.js:47357:17
removing request  converse.js:47357:17
_throttledRequestHandler called with 0 requests  converse.js:47357:17
request id 7 should now be removed  converse.js:47357:17
request id 7.1 got 200  converse.js:47357:17
_dataRecv called  converse.js:47357:17
<body xmlns="http://jabber.org/protocol/httpbind" ack="4244272874"><iq type="result" id="_session_auth_2" to="name2-collab7@openfire/dfoo" xmlns="jabber:client"/></body>  converse.js:47357:17
Status changed to: CONNECTED  converse.js:47357:17
Reconnected  converse.js:47357:17
no requests during idle cycle, sending blank request  converse.js:47357:17
_throttledRequestHandler called with 1 requests  converse.js:47357:17
request id 8.0 posting  converse.js:47357:17
request id 8.0 state changed to 1  converse.js:47357:17
<body rid="4244272875" sid="73sg4peiob"/>  converse.js:47357:17
_throttledRequestHandler called with 1 requests  converse.js:47357:17
_processRequest: first request has readyState of 1  converse.js:47357:17
_throttledRequestHandler called with 1 requests  converse.js:47357:17
_processRequest: first request has readyState of 1  converse.js:47357:17
_throttledRequestHandler called with 1 requests  converse.js:47357:17
_processRequest: first request has readyState of 1  converse.js:47357:17
Status changed to: CONNECTING  converse.js:47357:17
_throttledRequestHandler called with 2 requests  converse.js:47357:17
_processRequest: first request has readyState of 1  converse.js:47357:17
POST 
XHR 
http://localhost:7070/http-bind/ [HTTP/1.1 404 Invalid SID value. 28ms]
request id 8.1 state changed to 2  converse.js:47357:17
request id 8.1 state changed to 3  converse.js:47357:17
request id 8.1 state changed to 4  converse.js:47357:17
removing request  converse.js:47357:17
_throttledRequestHandler called with 1 requests  converse.js:47357:17
request id 9.0 posting  converse.js:47357:17
request id 9.0 state changed to 1  converse.js:47357:17
<body rid="2320110874" to="openfire" xml:lang="en" wait="60" hold="1" content="text/xml; charset=utf-8" ver="1.6" xmpp:version="1.0" xmlns:xmpp="urn:xmpp:xbosh"/>  converse.js:47357:17
request id 8 should now be removed  converse.js:47357:17
ERROR: request id 8.1 error 404 happened  converse.js:47355:17
request errored, status: 404, number of errors: 1  converse.js:47357:17
Status changed to: DISCONNECTING  converse.js:47357:17
_doDisconnect was called  converse.js:47357:17
Status changed to: DISCONNECTED  converse.js:47357:17
RECONNECTING  converse.js:47357:17
The connection has dropped, attempting to reconnect.  converse.js:47357:17
request id 9.1 state changed to 2  converse.js:47357:17
request id 9.1 state changed to 3  converse.js:47357:17
request id 9.1 state changed to 4  converse.js:47357:17
removing request  converse.js:47357:17
_throttledRequestHandler called with 0 requests  converse.js:47357:17
request id 9 should now be removed  converse.js:47357:17
request id 9.1 got 200  converse.js:47357:17
_connect_cb was called  converse.js:47357:17
<body xmlns="http://jabber.org/protocol/httpbind" xmlns:stream="http://etherx.jabber.org/streams" from="openfire" authid="4ajairb6y5" sid="4ajairb6y5" secure="true" requests="2" inactivity="30" polling="5" wait="60" hold="1" ack="2320110874" maxpause="300" ver="1.6"><stream:features><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>PLAIN</mechanism></mechanisms><register xmlns="http://jabber.org/features/iq-register"/><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/><session xmlns="urn:ietf:params:xml:ns:xmpp-session"><optional/></session></stream:features></body>  converse.js:47357:17
_throttledRequestHandler called with 0 requests  converse.js:47357:17
_throttledRequestHandler called with 1 requests  converse.js:47357:17
request id 10.0 posting  converse.js:47357:17
request id 10.0 state changed to 1  converse.js:47357:17
<body rid="3302079744" sid="4ajairb6y5"><auth mechanism="PLAIN">bmFtZTItY29sbGFiN0BvcGVuZmlyZQBuYW1lMi1jb2xsYWI3ADQyYmNjZDdkZWZmMjJlMDI4MzkzNWNkMjQ2M2VmOGVj</auth></body>  converse.js:47357:17
Status changed to: CONNECTING  converse.js:47357:17
_throttledRequestHandler called with 2 requests  converse.js:47357:17
_processRequest: first request has readyState of 1  converse.js:47357:17
request id 10.1 state changed to 2  converse.js:47357:17
request id 10.1 state changed to 3  converse.js:47357:17
request id 10.1 state changed to 4  converse.js:47357:17
removing request  converse.js:47357:17
_throttledRequestHandler called with 1 requests  converse.js:47357:17
request id 11.0 posting  converse.js:47357:17
request id 11.0 state changed to 1  converse.js:47357:17
<body rid="639690727" to="openfire" xml:lang="en" wait="60" hold="1" content="text/xml; charset=utf-8" ver="1.6" xmpp:version="1.0" xmlns:xmpp="urn:xmpp:xbosh"/>  converse.js:47357:17
request id 10 should now be removed  converse.js:47357:17
request id 10.1 got 200  converse.js:47357:17
_dataRecv called  converse.js:47357:17
<body xmlns="http://jabber.org/protocol/httpbind" type="terminate" condition="item-not-found"/>  converse.js:47357:17
Status changed to: CONNFAIL  converse.js:47357:17
_doDisconnect was called  converse.js:47357:17
Status changed to: DISCONNECTED  converse.js:47357:17
request id 11.1 state changed to 2  converse.js:47357:17
request id 11.1 state changed to 3  converse.js:47357:17
request id 11.1 state changed to 4  converse.js:47357:17
removing request  converse.js:47357:17
_throttledRequestHandler called with 0 requests  converse.js:47357:17
request id 11 should now be removed  converse.js:47357:17
request id 11.1 got 200  converse.js:47357:17
_connect_cb was called  converse.js:47357:17
<body xmlns="http://jabber.org/protocol/httpbind" xmlns:stream="http://etherx.jabber.org/streams" from="openfire" authid="2gmfyvj510" sid="2gmfyvj510" secure="true" requests="2" inactivity="30" polling="5" wait="60" hold="1" ack="639690727" maxpause="300" ver="1.6"><stream:features><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>PLAIN</mechanism></mechanisms><register xmlns="http://jabber.org/features/iq-register"/><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/><session xmlns="urn:ietf:params:xml:ns:xmpp-session"><optional/></session></stream:features></body>  converse.js:47357:17
_throttledRequestHandler called with 0 requests  converse.js:47357:17
_throttledRequestHandler called with 1 requests  converse.js:47357:17
request id 12.0 posting  converse.js:47357:17
request id 12.0 state changed to 1  converse.js:47357:17
<body rid="3775402098" sid="2gmfyvj510"><auth mechanism="PLAIN">bmFtZTItY29sbGFiN0BvcGVuZmlyZQBuYW1lMi1jb2xsYWI3ADQyYmNjZDdkZWZmMjJlMDI4MzkzNWNkMjQ2M2VmOGVj</auth></body>  converse.js:47357:17
request id 12.1 state changed to 2  converse.js:47357:17
request id 12.1 state changed to 3  converse.js:47357:17
request id 12.1 state changed to 4  converse.js:47357:17
removing request  converse.js:47357:17
_throttledRequestHandler called with 0 requests  converse.js:47357:17
request id 12 should now be removed  converse.js:47357:17
request id 12.1 got 200  converse.js:47357:17
_dataRecv called  converse.js:47357:17
<body xmlns="http://jabber.org/protocol/httpbind" type="terminate" condition="item-not-found"/>  converse.js:47357:17
Status changed to: CONNFAIL  converse.js:47357:17
_doDisconnect was called  converse.js:47357:17
Status changed to: DISCONNECTED  converse.js:47357:17
RECONNECTING  converse.js:47357:17
The connection has dropped, attempting to reconnect.  converse.js:47357:17
Status changed to: CONNECTING  converse.js:47357:17
_throttledRequestHandler called with 1 requests  converse.js:47357:17
request id 13.0 posting  converse.js:47357:17
request id 13.0 state changed to 1  converse.js:47357:17
<body rid="3750420604" to="openfire" xml:lang="en" wait="60" hold="1" content="text/xml; charset=utf-8" ver="1.6" xmpp:version="1.0" xmlns:xmpp="urn:xmpp:xbosh"/>  converse.js:47357:17
request id 13.1 state changed to 2  converse.js:47357:17
request id 13.1 state changed to 3  converse.js:47357:17
request id 13.1 state changed to 4  converse.js:47357:17
removing request  converse.js:47357:17
_throttledRequestHandler called with 0 requests  converse.js:47357:17
request id 13 should now be removed  converse.js:47357:17
request id 13.1 got 200  converse.js:47357:17
_connect_cb was called  converse.js:47357:17
<body xmlns="http://jabber.org/protocol/httpbind" xmlns:stream="http://etherx.jabber.org/streams" from="openfire" authid="74o6t1l4el" sid="74o6t1l4el" secure="true" requests="2" inactivity="30" polling="5" wait="60" hold="1" ack="3750420604" maxpause="300" ver="1.6"><stream:features><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>PLAIN</mechanism></mechanisms><register xmlns="http://jabber.org/features/iq-register"/><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/><session xmlns="urn:ietf:params:xml:ns:xmpp-session"><optional/></session></stream:features></body>  converse.js:47357:17
_throttledRequestHandler called with 0 requests  converse.js:47357:17
_throttledRequestHandler called with 1 requests  converse.js:47357:17
request id 14.0 posting  converse.js:47357:17
request id 14.0 state changed to 1  converse.js:47357:17
<body rid="3750420605" sid="74o6t1l4el"><auth mechanism="PLAIN">bmFtZTItY29sbGFiN0BvcGVuZmlyZQBuYW1lMi1jb2xsYWI3ADQyYmNjZDdkZWZmMjJlMDI4MzkzNWNkMjQ2M2VmOGVj</auth></body>  converse.js:47357:17
request id 14.1 state changed to 2  converse.js:47357:17
request id 14.1 state changed to 3  converse.js:47357:17
request id 14.1 state changed to 4  converse.js:47357:17
removing request  converse.js:47357:17
_throttledRequestHandler called with 0 requests  converse.js:47357:17
request id 14 should now be removed  converse.js:47357:17
request id 14.1 got 200  converse.js:47357:17
_dataRecv called  converse.js:47357:17
<body xmlns="http://jabber.org/protocol/httpbind" ack="3750420605"><success xmlns="urn:ietf:params:xml:ns:xmpp-sasl"/></body>  converse.js:47357:17
SASL authentication succeeded.  converse.js:47357:17
_throttledRequestHandler called with 0 requests  converse.js:47357:17
_throttledRequestHandler called with 1 requests  converse.js:47357:17
request id 15.0 posting  converse.js:47357:17
request id 15.0 state changed to 1  converse.js:47357:17
<body rid="3750420606" sid="74o6t1l4el" to="openfire" xml:lang="en" xmpp:restart="true" xmlns:xmpp="urn:xmpp:xbosh"/>  converse.js:47357:17
request id 15.1 state changed to 2  converse.js:47357:17
request id 15.1 state changed to 3  converse.js:47357:17
request id 15.1 state changed to 4  converse.js:47357:17
removing request  converse.js:47357:17
_throttledRequestHandler called with 0 requests  converse.js:47357:17
request id 15 should now be removed  converse.js:47357:17
request id 15.1 got 200  converse.js:47357:17
_dataRecv called  converse.js:47357:17
<body xmlns="http://jabber.org/protocol/httpbind" xmlns:stream="http://etherx.jabber.org/streams"><stream:features><register xmlns="http://jabber.org/features/iq-register"/><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/><session xmlns="urn:ietf:params:xml:ns:xmpp-session"><optional/></session></stream:features></body>  converse.js:47357:17
_throttledRequestHandler called with 0 requests  converse.js:47357:17
_throttledRequestHandler called with 1 requests  converse.js:47357:17
request id 16.0 posting  converse.js:47357:17
request id 16.0 state changed to 1  converse.js:47357:17
<body rid="3750420607" sid="74o6t1l4el"><iq type="set" id="_bind_auth_2"><bind><resource>dfoo</resource></bind></iq></body>  converse.js:47357:17
request id 16.1 state changed to 2  converse.js:47357:17
request id 16.1 state changed to 3  converse.js:47357:17
request id 16.1 state changed to 4  converse.js:47357:17
removing request  converse.js:47357:17
_throttledRequestHandler called with 0 requests  converse.js:47357:17
request id 16 should now be removed  converse.js:47357:17
request id 16.1 got 200  converse.js:47357:17
_dataRecv called  converse.js:47357:17
<body xmlns="http://jabber.org/protocol/httpbind" ack="3750420607"><iq type="result" id="_bind_auth_2" to="openfire/74o6t1l4el" xmlns="jabber:client"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><jid>name2-collab7@openfire/dfoo</jid></bind></iq></body>  converse.js:47357:17
_throttledRequestHandler called with 0 requests  converse.js:47357:17
_throttledRequestHandler called with 1 requests  converse.js:47357:17
request id 17.0 posting  converse.js:47357:17
request id 17.0 state changed to 1  converse.js:47357:17
<body rid="3750420608" sid="74o6t1l4el"><iq type="set" id="_session_auth_2"><session/></iq></body>  converse.js:47357:17
request id 17.1 state changed to 2  converse.js:47357:17
request id 17.1 state changed to 3  converse.js:47357:17
request id 17.1 state changed to 4  converse.js:47357:17
removing request  converse.js:47357:17
_throttledRequestHandler called with 0 requests  converse.js:47357:17
request id 17 should now be removed  converse.js:47357:17
request id 17.1 got 200  converse.js:47357:17
_dataRecv called  converse.js:47357:17
<body xmlns="http://jabber.org/protocol/httpbind" ack="3750420608"><iq type="result" id="_session_auth_2" to="name2-collab7@openfire/dfoo" xmlns="jabber:client"/></body>  converse.js:47357:17
Status changed to: CONNECTED  converse.js:47357:17
Reconnected  converse.js:47357:17
no requests during idle cycle, sending blank request  converse.js:47357:17
_throttledRequestHandler called with 1 requests  converse.js:47357:17
request id 18.0 posting  converse.js:47357:17
request id 18.0 state changed to 1  converse.js:47357:17
<body rid="3750420609" sid="74o6t1l4el"/>  converse.js:47357:17
_throttledRequestHandler called with 1 requests  converse.js:47357:17
_processRequest: first request has readyState of 1  converse.js:47357:17
_throttledRequestHandler called with 1 requests  converse.js:47357:17
_processRequest: first request has readyState of 1  converse.js:47357:17
_throttledRequestHandler called with 1 requests  converse.js:47357:17
_processRequest: first request has readyState of 1  converse.js:47357:17
_throttledRequestHandler called with 2 requests  converse.js:47357:17
_processRequest: first request has readyState of 1  converse.js:47357:17
request id 19.0 posting  converse.js:47357:17
request id 19.0 state changed to 1  converse.js:47357:17
<body rid="3750420610" sid="74o6t1l4el"><iq type="get" id="31a7295c-bcf8-4935-a7ea-a702054ffd16:roster"><query/></iq><presence><priority>0</priority></presence><presence from="name2-collab7@openfire/dfoo" to="[email protected]/name2"><x><history/></x></presence></body>  converse.js:47357:17
request id 18.1 state changed to 2  converse.js:47357:17
request id 18.1 state changed to 3  converse.js:47357:17
request id 18.1 state changed to 4  converse.js:47357:17
removing request  converse.js:47357:17
_throttledRequestHandler called with 1 requests  converse.js:47357:17
_processRequest: first request has readyState of 1  converse.js:47357:17
request id 18 should now be removed  converse.js:47357:17
request id 18.1 got 200  converse.js:47357:17
_dataRecv called  converse.js:47357:17
<body xmlns="http://jabber.org/protocol/httpbind" ack="3750420610"/>  converse.js:47357:17
request id 19.1 state changed to 2  converse.js:47357:17
request id 19.1 state changed to 3  converse.js:47357:17
request id 19.1 state changed to 4  converse.js:47357:17
removing request  converse.js:47357:17
_throttledRequestHandler called with 0 requests  converse.js:47357:17
request id 19 should now be removed  converse.js:47357:17
request id 19.1 got 200  converse.js:47357:17
_dataRecv called  converse.js:47357:17
<body xmlns="http://jabber.org/protocol/httpbind" ack="3750420610"><iq type="result" id="31a7295c-bcf8-4935-a7ea-a702054ffd16:roster" to="name2-collab7@openfire/dfoo" xmlns="jabber:client"><query xmlns="jabber:iq:roster"/></iq></body>  converse.js:47357:17
_throttledRequestHandler called with 0 requests  converse.js:47357:17
_throttledRequestHandler called with 1 requests  converse.js:47357:17
request id 20.0 posting  converse.js:47357:17
request id 20.0 state changed to 1  converse.js:47357:17
<body rid="3750420611" sid="74o6t1l4el"><presence><priority>0</priority></presence></body>  converse.js:47357:17
request id 20.1 state changed to 2  converse.js:47357:17
request id 20.1 state changed to 3  converse.js:47357:17
request id 20.1 state changed to 4  converse.js:47357:17
removing request  converse.js:47357:17
_throttledRequestHandler called with 0 requests  converse.js:47357:17
request id 20 should now be removed  converse.js:47357:17
request id 20.1 got 200  converse.js:47357:17
_dataRecv called  converse.js:47357:17
<body xmlns="http://jabber.org/protocol/httpbind" ack="3750420610"><presence from="[email protected]/name2" to="name2-collab7@openfire/dfoo" xmlns="jabber:client"><x xmlns="http://jabber.org/protocol/muc#user"><item jid="name2-collab7@openfire/dfoo" affiliation="owner" role="moderator"/><status code="110"/><status code="100"/><status code="201"/></x></presence></body>  converse.js:47357:17
no requests during idle cycle, sending blank request  converse.js:47357:17
_throttledRequestHandler called with 1 requests  converse.js:47357:17
request id 21.0 posting  converse.js:47357:17
request id 21.0 state changed to 1  converse.js:47357:17
<body rid="3750420612" sid="74o6t1l4el"/>  converse.js:47357:17
request id 21.1 state changed to 2  converse.js:47357:17
request id 21.1 state changed to 3  converse.js:47357:17
request id 21.1 state changed to 4  converse.js:47357:17
removing request  converse.js:47357:17
_throttledRequestHandler called with 0 requests  converse.js:47357:17
request id 21 should now be removed  converse.js:47357:17
request id 21.1 got 200  converse.js:47357:17
_dataRecv called  converse.js:47357:17
<body xmlns="http://jabber.org/protocol/httpbind" ack="3750420611"><presence from="name2-collab7@openfire/dfoo" to="name2-collab7@openfire/dfoo" xmlns="jabber:client"><priority>0</priority></presence></body>  converse.js:47357:17
no requests during idle cycle, sending blank request  converse.js:47357:17
_throttledRequestHandler called with 1 requests  converse.js:47357:17
request id 22.0 posting  converse.js:47357:17
request id 22.0 state changed to 1  converse.js:47357:17
<body rid="3750420613" sid="74o6t1l4el"/>

You're welcome @umpirsky

Unfortunately the pasted logs don't help me figure out where the problem lies because it doesn't have the stacktrace that leads to that error.

What you can do is to put a breakpoint at line 46572 (where the error is thrown).
Then, when that point is reached, you can type console.trace() to print the stack trace.

Then please paste that here. That's the info I need.

@jcbrand Here comes the trace:

<anonymous> debugger eval code:1:1
urlError https://cdn.conversejs.org/3.0.2/dist/converse.js:46572:5
url https://cdn.conversejs.org/3.0.2/dist/converse.js:45359:9
result https://cdn.conversejs.org/3.0.2/dist/converse.js:26069:38
Backbone.sync https://cdn.conversejs.org/3.0.2/dist/converse.js:46067:20
Backbone.sync https://cdn.conversejs.org/3.0.2/dist/converse.js:47127:10
sync https://cdn.conversejs.org/3.0.2/dist/converse.js:45102:14
save https://cdn.conversejs.org/3.0.2/dist/converse.js:45313:17
afterShown https://cdn.conversejs.org/3.0.2/dist/converse.js:54211:25
apply https://cdn.conversejs.org/3.0.2/dist/converse.js:12946:22
wrapper https://cdn.conversejs.org/3.0.2/dist/converse.js:17807:16
afterAnimationEnd https://cdn.conversejs.org/3.0.2/dist/converse.js:37623:13
apply https://cdn.conversejs.org/3.0.2/dist/converse.js:12947:22
wrapper https://cdn.conversejs.org/3.0.2/dist/converse.js:17807:16

I hope this will reveal why error happens. Thanks!

@jcbrand Any idea about the error?

I haven't had time to look at it yet

I took a look at this again. The Error A "url" property or function must be specifier happens when the code tries to persist a Backbone.Model's data to sessionStorage before that model has been properly initialized. It must have a browserStorage or collection.browserStorage attribute that specifies the UID for sessionStorage.

I think sometimes after automatic reconnection chat rooms aren't properly reconnected anymore, and then this error might happen.

I've updated a check to avoid the error and I'll try to figure out a solution before the next release.

@jcbrand Thanks! Please keep me posted on this, I'd like to update to get fix for this issue.

@jcbrand Hi, when do you plan to release next version with this fix? I'm interested in plans and timeframes. Is there something I can help you with so we can release it sooner? Thanks.

@umpirsky Probably within the next two weeks or so.

I don't expect many more changes to come in before the release, mostly bugfixes.

You can help by testing out the current code and letting me know if you find any bugs.

You'll have to make new dist and css files to use, which you can do by running make dist && make css

Thanks.

@jcbrand OK, thanks, will test it out!

@jcbrand It worked great with latest master, thanks!

Waiting for the release!

Please ping me once released so I can test with latest version and close this.

@jcbrand Oh, new version is released!?! :)

I'll test it soonish!

Worked, thanks!

Great, thanks for checking.

Was this page helpful?
0 / 5 - 0 ratings