librelist archives

« back to archive

Prebinding doesn't complete

Prebinding doesn't complete

From:
Simon Hill
Date:
2014-11-08 @ 17:23
I'm using Prosody and node-xmpp-client to do prebinding. Converse looks
like it prebinds - no login dialog, no errors, but no contacts are listed,
can't look anyone up, can't send, and trying to do anything like change
status doesn't work. It could a problem with my prebinding lib, so I'd be
grateful if anyone can rule on that.

Here is the visual: http://screencast.com/t/ScaXpPqEtr

vs what it looks like it I log in 'manually' (by setting status to log out
and then logging in through the form): http://screencast.com/t/5v0TjEnm

Here is the output from Prosody when I prebind:

http://screencast.com/t/5v0TjEnm

 Here is the output from converse:

chat prebinding initialized Object {rid: "6896357116", sid:
"ae1772fa-0dd9-41d5-9667-4f2c047007c1", jid: "test@localhost"} (index):192
Attached converse.min.js:229
0 _throttledRequestHandler called with 0 requests converse.min.js:229
0 _throttledRequestHandler called with 0 requests converse.min.js:229
0 _throttledRequestHandler called with 0 requests converse.min.js:229
0 _throttledRequestHandler called with 0 requests converse.min.js:229
Attached converse.min.js:229
0 _throttledRequestHandler called with 0 requests converse.min.js:229
0 _throttledRequestHandler called with 0 requests converse.min.js:229
0 _throttledRequestHandler called with 0 requests converse.min.js:229
0 request id 1.0 posting converse.min.js:229
0 request id 1.0 state changed to 1 converse.min.js:229
<body rid=​"6896357116" xmlns=​"http:​/​/​jabber.org/​protocol/​httpbind"
sid=​"ae1772fa-0dd9-41d5-9667-4f2c047007c1">​…​</body>​ converse.min.js:229
0 request id 1.1 state changed to 2 converse.min.js:229
0 request id 1.1 state changed to 3 converse.min.js:229
0 request id 1.1 state changed to 4 converse.min.js:229
0 removing request converse.min.js:229
0 _throttledRequestHandler called with 0 requests converse.min.js:229
0 request id 1 should now be removed converse.min.js:229
0 request id 1.1 got 200 converse.min.js:229
1 _dataRecv called converse.min.js:229
<body xmlns:stream=​"http:​/​/​etherx.jabber.org/​streams"
xmlns=​"http:​/​/​jabber.org/​protocol/​httpbind"
sid=​"ae1772fa-0dd9-41d5-9667-4f2c047007c1">​</body>​ converse.min.js:229
1 no requests during idle cycle, sending blank request converse.min.js:229
0 request id 2.0 posting converse.min.js:229
0 request id 2.0 state changed to 1 converse.min.js:229
<body rid=​"6896357117" xmlns=​"http:​/​/​jabber.org/​protocol/​httpbind"
sid=​"ae1772fa-0dd9-41d5-9667-4f2c047007c1">​</body>​ converse.min.js:229
0 request id 2.1 state changed to 2 converse.min.js:229
0 request id 2.1 state changed to 3 converse.min.js:229
0 request id 2.1 state changed to 4 converse.min.js:229
0 removing request converse.min.js:229
0 _throttledRequestHandler called with 0 requests converse.min.js:229
0 request id 2 should now be removed converse.min.js:229
0 request id 2.1 got 200 converse.min.js:229
1 _dataRecv called converse.min.js:229
<body xmlns:stream=​"http:​/​/​etherx.jabber.org/​streams"
xmlns=​"http:​/​/​jabber.org/​protocol/​httpbind"
sid=​"ae1772fa-0dd9-41d5-9667-4f2c047007c1">​</body>​ converse.min.js:229
1 no requests during idle cycle, sending blank request converse.min.js:229
0 request id 3.0 posting converse.min.js:229
0 request id 3.0 state changed to 1 converse.min.js:229
<body rid=​"6896357118" xmlns=​"http:​/​/​jabber.org/​protocol/​httpbind"
sid=​"ae1772fa-0dd9-41d5-9667-4f2c047007c1">​</body>​ converse.min.js:229
0 request id 3.1 state changed to 2 converse.min.js:229
0 request id 3.1 state changed to 3 converse.min.js:229
0 request id 3.1 state changed to 4 converse.min.js:229
0 removing request converse.min.js:229
0 _throttledRequestHandler called with 0 requests converse.min.js:229
0 request id 3 should now be removed converse.min.js:229
0 request id 3.1 got 200 converse.min.js:229
1 _dataRecv called converse.min.js:229
<body xmlns:stream=​"http:​/​/​etherx.jabber.org/​streams"
xmlns=​"http:​/​/​jabber.org/​protocol/​httpbind"
sid=​"ae1772fa-0dd9-41d5-9667-4f2c047007c1">​</body>​ converse.min.js:229
1 no requests during idle cycle, sending blank request converse.min.js:229
0 request id 4.0 posting converse.min.js:229
0 request id 4.0 state changed to 1 converse.min.js:229
<body rid=​"6896357119" xmlns=​"http:​/​/​jabber.org/​protocol/​httpbind"
sid=​"ae1772fa-0dd9-41d5-9667-4f2c047007c1">​</body>​ converse.min.js:229
0 request id 4.1 state changed to 2 converse.min.js:229
0 request id 4.1 state changed to 3 converse.min.js:229
0 request id 4.1 state changed to 4 converse.min.js:229
0 removing request converse.min.js:229
0 _throttledRequestHandler called with 0 requests converse.min.js:229
0 request id 4 should now be removed converse.min.js:229
0 request id 4.1 got 200 converse.min.js:229
1 _dataRecv called converse.min.js:229
<body xmlns:stream=​"http:​/​/​etherx.jabber.org/​streams"
xmlns=​"http:​/​/​jabber.org/​protocol/​httpbind"
sid=​"ae1772fa-0dd9-41d5-9667-4f2c047007c1">​</body>​ converse.min.js:229
1 no requests during idle cycle, sending blank request converse.min.js:229
0 request id 5.0 posting converse.min.js:229
0 request id 5.0 state changed to 1 converse.min.js:229
<body rid=​"6896357120" xmlns=​"http:​/​/​jabber.org/​protocol/​httpbind"
sid=​"ae1772fa-0dd9-41d5-9667-4f2c047007c1">​</body>​ converse.min.js:229
0 request id 5.1 state changed to 2 converse.min.js:229
0 request id 5.1 state changed to 3 converse.min.js:229
0 request id 5.1 state changed to 4 converse.min.js:229
0 removing request converse.min.js:229
0 _throttledRequestHandler called with 0 requests converse.min.js:229
0 request id 5 should now be removed converse.min.js:229
0 request id 5.1 got 200 converse.min.js:229
1 _dataRecv called converse.min.js:229
<body xmlns:stream=​"http:​/​/​etherx.jabber.org/​streams"
xmlns=​"http:​/​/​jabber.org/​protocol/​httpbind"
sid=​"ae1772fa-0dd9-41d5-9667-4f2c047007c1">​</body>​ converse.min.js:229
1 no requests during idle cycle, sending blank request converse.min.js:229
0 request id 6.0 posting converse.min.js:229
0 request id 6.0 state changed to 1 converse.min.js:229
<body rid=​"6896357121" xmlns=​"http:​/​/​jabber.org/​protocol/​httpbind"
sid=​"ae1772fa-0dd9-41d5-9667-4f2c047007c1">​</body>​ converse.min.js:229
0 request id 6.1 state changed to 2 converse.min.js:229
0 request id 6.1 state changed to 3 converse.min.js:229
0 request id 6.1 state changed to 4 converse.min.js:229
0 removing request converse.min.js:229
0 _throttledRequestHandler called with 0 requests converse.min.js:229
0 request id 6 should now be removed converse.min.js:229
0 request id 6.1 got 200 converse.min.js:229
1 _dataRecv called converse.min.js:229
<body xmlns:stream=​"http:​/​/​etherx.jabber.org/​streams"
xmlns=​"http:​/​/​jabber.org/​protocol/​httpbind"
sid=​"ae1772fa-0dd9-41d5-9667-4f2c047007c1">​</body>​ converse.min.js:229
1 no requests during idle cycle, sending blank request converse.min.js:229
0 request id 7.0 posting converse.min.js:229
0 request id 7.0 state changed to 1 converse.min.js:229
<body rid=​"6896357122" xmlns=​"http:​/​/​jabber.org/​protocol/​httpbind"
sid=​"ae1772fa-0dd9-41d5-9667-4f2c047007c1">​</body>​ converse.min.js:229
0 request id 7.1 state changed to 2 converse.min.js:229
0 request id 7.1 state changed to 3 converse.min.js:229
0 request id 7.1 state changed to 4 converse.min.js:229
0 removing request converse.min.js:229
0 _throttledRequestHandler called with 0 requests converse.min.js:229
0 request id 7 should now be removed converse.min.js:229
0 request id 7.1 got 200 converse.min.js:229
1 _dataRecv called converse.min.js:229
<body xmlns:stream=​"http:​/​/​etherx.jabber.org/​streams"
xmlns=​"http:​/​/​jabber.org/​protocol/​httpbind"
sid=​"ae1772fa-0dd9-41d5-9667-4f2c047007c1">​</body>​ converse.min.js:229
1 no requests during idle cycle, sending blank request converse.min.js:229
0 request id 8.0 posting converse.min.js:229
0 request id 8.0 state changed to 1 converse.min.js:229
<body rid=​"6896357123" xmlns=​"http:​/​/​jabber.org/​protocol/​httpbind"
sid=​"ae1772fa-0dd9-41d5-9667-4f2c047007c1">​</body>​

Here is my converse config:

$.getJSON('/api/v1/chat/prebind/', function (data) {
            require(['converse'], function (converse) {
                console.log('chat prebinding initialized',data);
                converse.initialize({
                    prebind: true,
                    auto_list_rooms: true,
                    auto_subscribe: false,
                    bosh_service_url: 'http://localhost:5280/http-bind',
                    hide_muc_server: true,
                    i18n: locales.en, // Refer to ./locale/locales.js
to see which locales are supported
                    show_controlbox_by_default: true,
                    roster_groups: false,
                    jid: data.jid,
                    sid: data.sid,
                    rid: data.rid,
                    message_carbons: true,
                    fullname: 'Simon',
                    debug: true,
                    keepalive: true,
                    allow_muc: false,
                    storage: 'local'
                })
            })

        }
);


And here is my prebind function:

var XMPP = require('node-xmpp-client');
var prebind = new XMPP({
    jid: 'test@localhost',
    password: 'xxxxx',
    preferred: 'PLAIN',
    wait: 10,
    bosh: {
        url: 'http://localhost:5280/http-bind/',
        prebind: function (error, data) {
            if (error) throw new Error(error);
            data.jid = 'test@localhost';
            console.log(data);
            return res.send(data);
        }
    },
    reconnect: true

});

Re: [conversejs] Prebinding doesn't complete

From:
Jc Brand
Date:
2014-11-09 @ 16:22
I think your problem is likely with node-xmpp-client.

I tried using node-xmpp-client for prebinding a while back and also 
struggled to get
it to work.

Eventually I ended up using node-bosh-xmpp-client
https://github.com/eelcocramer/node-bosh-xmpp-client

It also didn't work out of the box for me, but it was conceptually much simpler
and easier to figure out what was going on and make the necessary changes (which
thankfully have been accepted in a pull request).


On Sat, Nov 08, 2014 at 09:23:02AM -0800, Simon Hill wrote:
>    I'm using Prosody and node-xmpp-client to do prebinding. Converse looks
>    like it prebinds - no login dialog, no errors, but no contacts are listed,
>    can't look anyone up, can't send, and trying to do anything like change
>    status doesn't work. It could a problem with my prebinding lib, so I'd be
>    grateful if anyone can rule on that.
>    Here is the visual: [1]http://screencast.com/t/ScaXpPqEtr
>    vs what it looks like it I log in 'manually' (by setting status to log out
>    and then logging in through the form): [2]http://screencast.com/t/5v0TjEnm
>    Here is the output from Prosody when I prebind:
>    [3]http://screencast.com/t/5v0TjEnm
>     Here is the output from converse:
>    chat prebinding initialized Object {rid: "6896357116", sid:
>    "ae1772fa-0dd9-41d5-9667-4f2c047007c1", jid: "test@localhost"} (index):192
>    Attached converse.min.js:229
>    0 _throttledRequestHandler called with 0 requests converse.min.js:229
>    0 _throttledRequestHandler called with 0 requests converse.min.js:229
>    0 _throttledRequestHandler called with 0 requests converse.min.js:229
>    0 _throttledRequestHandler called with 0 requests converse.min.js:229
>    Attached converse.min.js: 229
>    0 _throttledRequestHandler called with 0 requests converse.min.js:229
>    0 _throttledRequestHandler called with 0 requests converse.min.js:229
>    0 _throttledRequestHandler called with 0 requests converse.min.js:229
>    0 request id 1.0 posting converse.min.js:229
>    0 request id 1.0 state changed to 1 converse.min.js:229
>    <body rid="6896357116"
>    xmlns="http://[4]jabber.org/protocol/httpbind"
>    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1">…</body>
>    converse.min.js:229
>    0 request id 1.1 state changed to 2 converse.min.js:229
>    0 request id 1.1 state changed to 3 converse.min.js:229
>    0 request id 1.1 state changed to 4 converse.min.js:229
>    0 removing request converse.min.js:229
>    0 _throttledRequestHandler called with 0 requests converse.min.js:229
>    0 request id 1 should now be removed converse.min.js:229
>    0 request id 1.1 got 200 converse.min.js:229
>    1 _dataRecv called converse.min.js:229
>    <body xmlns:stream="http://[5]etherx.jabber.org/streams"
>    xmlns="http://[6]jabber.org/protocol/httpbind"
>    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1"></body> converse.min.js:229
>    1 no requests during idle cycle, sending blank request converse.min.js:229
>    0 request id 2.0 posting converse.min.js:229
>    0 request id 2.0 state changed to 1 converse.min.js:229
>    <body rid="6896357117"
>    xmlns="http://[7]jabber.org/protocol/httpbind"
>    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1"></body> converse.min.js:229
>    0 request id 2.1 state changed to 2 converse.min.js:229
>    0 request id 2.1 state changed to 3 converse.min.js:229
>    0 request id 2.1 state changed to 4 converse.min.js:229
>    0 removing request converse.min.js:229
>    0 _throttledRequestHandler called with 0 requests converse.min.js:229
>    0 request id 2 should now be removed converse.min.js:229
>    0 request id 2.1 got 200 converse.min.js:229
>    1 _dataRecv called converse.min.js:229
>    <body xmlns:stream="http://[8]etherx.jabber.org/streams"
>    xmlns="http://[9]jabber.org/protocol/httpbind"
>    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1"></body> converse.min.js:229
>    1 no requests during idle cycle, sending blank request converse.min.js:229
>    0 request id 3.0 posting converse.min.js:229
>    0 request id 3.0 state changed to 1 converse.min.js:229
>    <body rid="6896357118"
>    xmlns="http://[10]jabber.org/protocol/httpbind"
>    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1"></body> converse.min.js:229
>    0 request id 3.1 state changed to 2 converse.min.js:229
>    0 request id 3.1 state changed to 3 converse.min.js:229
>    0 request id 3.1 state changed to 4 converse.min.js:229
>    0 removing request converse.min.js:229
>    0 _throttledRequestHandler called with 0 requests converse.min.js:229
>    0 request id 3 should now be removed converse.min.js:229
>    0 request id 3.1 got 200 converse.min.js:229
>    1 _dataRecv called converse.min.js:229
>    <body xmlns:stream="http://[11]etherx.jabber.org/streams"
>    xmlns="http://[12]jabber.org/protocol/httpbind"
>    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1"></body>�� converse.min.js:229
>    1 no requests during idle cycle, sending blank request converse.min.js:229
>    0 request id 4.0 posting converse.min.js:229
>    0 request id 4.0 state changed to 1 converse.min.js:229
>    <body rid="6896357119"
>    xmlns="http://[13]jabber.org/protocol/httpbind"
>    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1"></body> converse.min.js:229
>    0 request id 4.1 state changed to 2 converse.min.js:229
>    0 request id 4.1 state changed to 3 converse.min.js:229
>    0 request id 4.1 state changed to 4 converse.min.js:229
>    0 removing request converse.min.js:229
>    0 _throttledRequestHandler called with 0 requests converse.min .js:229
>    0 request id 4 should now be removed converse.min.js:229
>    0 request id 4.1 got 200 converse.min.js:229
>    1 _dataRecv called converse.min.js:229
>    <body xmlns:stream="http://[14]etherx.jabber.org/streams"
>    xmlns="http://[15]jabber.org/protocol/httpbind"
>    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1"></body> converse.min.js:229
>    1 no requests during idle cycle, sending blank request converse.min.js:229
>    0 request id 5.0 posting converse.min.js:229
>    0 request id 5.0 state changed to 1 converse.min.js:229
>    <body rid="6896357120" xmlns="http://jabber.org/protocol/httpbind"
>    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1"></body> converse.min.js:229
>    0 request id 5.1 state changed to 2 converse.min.js:229
>    0 request id 5.1 state changed to 3 converse.min.js:229
>    0 request id 5.1 state changed to 4 converse.min.js:229
>    0 removing request converse.min.js:229
>    0 _throttledRequestHandler called with 0 requests converse.min.js:229
>    0 request id 5 should now be removed converse.min.js:229
>    0 request id 5.1 got 200 converse.min.js:229
>    1 _dataRecv called converse.min.js:229
>    <body xmlns:stream="http://[16]etherx.jabber.org/ streams"
>    xmlns="http://[17]jabber.org/protocol/httpbind"
>    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1"></body> converse.min.js:229
>    1 no requests during idle cycle, sending blank request converse.min.js:229
>    0 request id 6.0 posting converse.min.js:229
>    0 request id 6.0 state changed to 1 converse.min.js:229
>    <body rid="6896357121"
>    xmlns="http://[18]jabber.org/protocol/httpbind"
>    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1"></body> converse.min.js:229
>    0 request id 6.1 state changed to 2 converse.min.js:229
>    0 request id 6.1 state changed to 3 converse.min.js:229
>    0 requ est id 6.1 state changed to 4 converse.min.js:229
>    0 removing request converse.min.js:229
>    0 _throttledRequestHandler called with 0 requests converse.min.js:229
>    0 request id 6 should now be removed converse.min.js:229
>    0 request id 6.1 got 200 converse.min.js:229
>    1 _dataRecv called converse.min.js:229
>    <body xmlns:stream="http://[19]etherx.jabber.org/streams"
>    xmlns="http://[20]jabber.org/protocol/httpbind"
>    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1"></body> converse.min.js:229
>    1 no requests during idle cycle, sending blank request converse.min.js:229
>    0 request id 7.0 posting converse.min.js:229
>    0 request id 7.0 state changed to 1 converse.min.js:229
>    <body rid="6896357122"
>    xmlns="http://[21]jabber.org/protocol/httpbind"
>    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1"></body> converse.min.js:229
>    0 request id 7.1 state changed to 2 converse.min.js:229
>    0 request id 7.1 state changed to 3 converse.min.js:229
>    0 request id 7.1 state changed to 4 converse.min.js:229
>    0 removing request converse.min.js:229
>    0 _throttledRequestHandler called with 0 requests converse.min.js:229
>    0 request id 7 should now be removed converse.min.js:229
>    0 request id 7.1 got 200 converse.min.js:229
>    1 _dataRecv called converse.min.js:229
>    <body xmlns:stream="http://[22]etherx.jabber.org/streams"
>    xmlns="http://[23]jabber.org/protocol/httpbind"
>    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1"></body> converse.min.js:229
>    1 no requests during idle cycle, sending blank request converse.min.js:229
>    0 request id 8.0 posting converse.min.js:229
>    0 request id 8.0 state changed to 1 converse.min.js:229
>    <body rid="6896357123"
>    xmlns="http://[24]jabber.org/protocol/httpbind"
>    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1"></body> 
>    Here is my converse config:
> 
>  $.getJSON('/api/v1/chat/prebind/', function (data) {
>              require(['converse'], function (converse) {
>                  console.log('chat prebinding initialized',data);
>                  converse.initialize({
> 
>                     prebind: true,
>                      auto_list_rooms: true,
>                      auto_subscribe: false,
>                      bosh_service_url: '[25]http://localhost:5280/http-bind',
>                      hide_muc_server: true,
>                      i18n: locales.en, // Refer to ./locale/locales.js 
to see which locales are supported
>                      show_controlbox_by_default: true,
>                      roster_groups: false,
>                      jid: data.jid,
>                      sid: data.sid,
>                      rid: data.rid,
>                      message_carbons: true,
>                      fullname: 'Simon',
>                      debug: true,
>                      keepalive: true,
>                      allow_muc: false,
>                      storage: 'local'
>                  })
>              })
> 
>          }
>  );
> 
>    And here is my prebind function:
> 
>  var XMPP = require('node-xmpp-client');
>  var prebind = new XMPP({
>      jid: 'test@localhost',
>      password: 'xxxxx',
>      preferred: 'PLAIN',
>      wait: 10,
>      bosh: {
>          url: '[26]http://localhost:5280/http-bind/',
>          prebind: function (error, data) {
>              if (error) throw new Error(error);
>              data.jid = 'test@localhost';
>              console.log(data);
>              return res.send(data);
>          }
>      },
>      reconnect: true
>  });

Re: [conversejs] Prebinding doesn't complete

From:
Simon Hill
Date:
2014-11-09 @ 23:22
I filed a bug with the maintainer of
https://github.com/node-xmpp/node-xmpp-client and he replied with the
suggestion that I add 1 to the rid. This did the trick! Problem solved.

On Sun, Nov 9, 2014 at 8:22 AM, JC Brand <lists@opkode.com> wrote:

> I think your problem is likely with node-xmpp-client.
>
> I tried using node-xmpp-client for prebinding a while back and also
> struggled to get
> it to work.
>
> Eventually I ended up using node-bosh-xmpp-client
> https://github.com/eelcocramer/node-bosh-xmpp-client
>
> It also didn't work out of the box for me, but it was conceptually much
> simpler
> and easier to figure out what was going on and make the necessary changes
> (which
> thankfully have been accepted in a pull request).
>
>
> On Sat, Nov 08, 2014 at 09:23:02AM -0800, Simon Hill wrote:
> >    I'm using Prosody and node-xmpp-client to do prebinding. Converse
> looks
> >    like it prebinds - no login dialog, no errors, but no contacts are
> listed,
> >    can't look anyone up, can't send, and trying to do anything like
> change
> >    status doesn't work. It could a problem with my prebinding lib, so
> I'd be
> >    grateful if anyone can rule on that.
> >    Here is the visual: [1]http://screencast.com/t/ScaXpPqEtr
> >    vs what it looks like it I log in 'manually' (by setting status to
> log out
> >    and then logging in through the form): [2]
> http://screencast.com/t/5v0TjEnm
> >    Here is the output from Prosody when I prebind:
> >    [3]http://screencast.com/t/5v0TjEnm
> >     Here is the output from converse:
> >    chat prebinding initialized Object {rid: "6896357116", sid:
> >    "ae1772fa-0dd9-41d5-9667-4f2c047007c1", jid: "test@localhost"}
> (index):192
> >    Attached converse.min.js:229
> >    0 _throttledRequestHandler called with 0 requests converse.min.js:229
> >    0 _throttledRequestHandler called with 0 requests converse.min.js:229
> >    0 _throttledRequestHandler called with 0 requests converse.min.js:229
> >    0 _throttledRequestHandler called with 0 requests converse.min.js:229
> >    Attached converse.min.js: 229
> >    0 _throttledRequestHandler called with 0 requests converse.min.js:229
> >    0 _throttledRequestHandler called with 0 requests converse.min.js:229
> >    0 _throttledRequestHandler called with 0 requests converse.min.js:229
> >    0 request id 1.0 posting converse.min.js:229
> >    0 request id 1.0 state changed to 1 converse.min.js:229
> >    <body rid="6896357116"
> >    xmlns="http://[4]jabber.org/protocol/httpbind"
> >    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1">…</body>
> >    converse.min.js:229
> >    0 request id 1.1 state changed to 2 converse.min.js:229
> >    0 request id 1.1 state changed to 3 converse.min.js:229
> >    0 request id 1.1 state changed to 4 converse.min.js:229
> >    0 removing request converse.min.js:229
> >    0 _throttledRequestHandler called with 0 requests converse.min.js:229
> >    0 request id 1 should now be removed converse.min.js:229
> >    0 request id 1.1 got 200 converse.min.js:229
> >    1 _dataRecv called converse.min.js:229
> >    <body xmlns:stream="http://[5]etherx.jabber.org/streams"
> >    xmlns="http://[6]jabber.org/protocol/httpbind"
> >    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1"></body> converse.min.js:229
> >    1 no requests during idle cycle, sending blank request
> converse.min.js:229
> >    0 request id 2.0 posting converse.min.js:229
> >    0 request id 2.0 state changed to 1 converse.min.js:229
> >    <body rid="6896357117"
> >    xmlns="http://[7]jabber.org/protocol/httpbind"
> >    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1"></body> converse.min.js:229
> >    0 request id 2.1 state changed to 2 converse.min.js:229
> >    0 request id 2.1 state changed to 3 converse.min.js:229
> >    0 request id 2.1 state changed to 4 converse.min.js:229
> >    0 removing request converse.min.js:229
> >    0 _throttledRequestHandler called with 0 requests converse.min.js:229
> >    0 request id 2 should now be removed converse.min.js:229
> >    0 request id 2.1 got 200 converse.min.js:229
> >    1 _dataRecv called converse.min.js:229
> >    <body xmlns:stream="http://[8]etherx.jabber.org/streams"
> >    xmlns="http://[9]jabber.org/protocol/httpbind"
> >    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1"></body> converse.min.js:229
> >    1 no requests during idle cycle, sending blank request
> converse.min.js:229
> >    0 request id 3.0 posting converse.min.js:229
> >    0 request id 3.0 state changed to 1 converse.min.js:229
> >    <body rid="6896357118"
> >    xmlns="http://[10]jabber.org/protocol/httpbind"
> >    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1"></body> converse.min.js:229
> >    0 request id 3.1 state changed to 2 converse.min.js:229
> >    0 request id 3.1 state changed to 3 converse.min.js:229
> >    0 request id 3.1 state changed to 4 converse.min.js:229
> >    0 removing request converse.min.js:229
> >    0 _throttledRequestHandler called with 0 requests converse.min.js:229
> >    0 request id 3 should now be removed converse.min.js:229
> >    0 request id 3.1 got 200 converse.min.js:229
> >    1 _dataRecv called converse.min.js:229
> >    <body xmlns:stream="http://[11]etherx.jabber.org/streams"
> >    xmlns="http://[12]jabber.org/protocol/httpbind"
> >    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1"></body>��
> converse.min.js:229
> >    1 no requests during idle cycle, sending blank request
> converse.min.js:229
> >    0 request id 4.0 posting converse.min.js:229
> >    0 request id 4.0 state changed to 1 converse.min.js:229
> >    <body rid="6896357119"
> >    xmlns="http://[13]jabber.org/protocol/httpbind"
> >    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1"></body> converse.min.js:229
> >    0 request id 4.1 state changed to 2 converse.min.js:229
> >    0 request id 4.1 state changed to 3 converse.min.js:229
> >    0 request id 4.1 state changed to 4 converse.min.js:229
> >    0 removing request converse.min.js:229
> >    0 _throttledRequestHandler called with 0 requests converse.min .js:229
> >    0 request id 4 should now be removed converse.min.js:229
> >    0 request id 4.1 got 200 converse.min.js:229
> >    1 _dataRecv called converse.min.js:229
> >    <body xmlns:stream="http://[14]etherx.jabber.org/streams"
> >    xmlns="http://[15]jabber.org/protocol/httpbind"
> >    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1"></body> converse.min.js:229
> >    1 no requests during idle cycle, sending blank request
> converse.min.js:229
> >    0 request id 5.0 posting converse.min.js:229
> >    0 request id 5.0 state changed to 1 converse.min.js:229
> >    <body rid="6896357120" xmlns="http://jabber.org/protocol/httpbind"
> >    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1"></body> converse.min.js:229
> >    0 request id 5.1 state changed to 2 converse.min.js:229
> >    0 request id 5.1 state changed to 3 converse.min.js:229
> >    0 request id 5.1 state changed to 4 converse.min.js:229
> >    0 removing request converse.min.js:229
> >    0 _throttledRequestHandler called with 0 requests converse.min.js:229
> >    0 request id 5 should now be removed converse.min.js:229
> >    0 request id 5.1 got 200 converse.min.js:229
> >    1 _dataRecv called converse.min.js:229
> >    <body xmlns:stream="http://[16]etherx.jabber.org/ streams"
> >    xmlns="http://[17]jabber.org/protocol/httpbind"
> >    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1"></body> converse.min.js:229
> >    1 no requests during idle cycle, sending blank request
> converse.min.js:229
> >    0 request id 6.0 posting converse.min.js:229
> >    0 request id 6.0 state changed to 1 converse.min.js:229
> >    <body rid="6896357121"
> >    xmlns="http://[18]jabber.org/protocol/httpbind"
> >    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1"></body> converse.min.js:229
> >    0 request id 6.1 state changed to 2 converse.min.js:229
> >    0 request id 6.1 state changed to 3 converse.min.js:229
> >    0 requ est id 6.1 state changed to 4 converse.min.js:229
> >    0 removing request converse.min.js:229
> >    0 _throttledRequestHandler called with 0 requests converse.min.js:229
> >    0 request id 6 should now be removed converse.min.js:229
> >    0 request id 6.1 got 200 converse.min.js:229
> >    1 _dataRecv called converse.min.js:229
> >    <body xmlns:stream="http://[19]etherx.jabber.org/streams"
> >    xmlns="http://[20]jabber.org/protocol/httpbind"
> >    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1"></body> converse.min.js:229
> >    1 no requests during idle cycle, sending blank request
> converse.min.js:229
> >    0 request id 7.0 posting converse.min.js:229
> >    0 request id 7.0 state changed to 1 converse.min.js:229
> >    <body rid="6896357122"
> >    xmlns="http://[21]jabber.org/protocol/httpbind"
> >    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1"></body> converse.min.js:229
> >    0 request id 7.1 state changed to 2 converse.min.js:229
> >    0 request id 7.1 state changed to 3 converse.min.js:229
> >    0 request id 7.1 state changed to 4 converse.min.js:229
> >    0 removing request converse.min.js:229
> >    0 _throttledRequestHandler called with 0 requests converse.min.js:229
> >    0 request id 7 should now be removed converse.min.js:229
> >    0 request id 7.1 got 200 converse.min.js:229
> >    1 _dataRecv called converse.min.js:229
> >    <body xmlns:stream="http://[22]etherx.jabber.org/streams"
> >    xmlns="http://[23]jabber.org/protocol/httpbind"
> >    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1"></body> converse.min.js:229
> >    1 no requests during idle cycle, sending blank request
> converse.min.js:229
> >    0 request id 8.0 posting converse.min.js:229
> >    0 request id 8.0 state changed to 1 converse.min.js:229
> >    <body rid="6896357123"
> >    xmlns="http://[24]jabber.org/protocol/httpbind"
> >    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1"></body>
> >    Here is my converse config:
> >
> >  $.getJSON('/api/v1/chat/prebind/', function (data) {
> >              require(['converse'], function (converse) {
> >                  console.log('chat prebinding initialized',data);
> >                  converse.initialize({
> >
> >                     prebind: true,
> >                      auto_list_rooms: true,
> >                      auto_subscribe: false,
> >                      bosh_service_url: '[25]
> http://localhost:5280/http-bind',
> >                      hide_muc_server: true,
> >                      i18n: locales.en, // Refer to ./locale/locales.js
> to see which locales are supported
> >                      show_controlbox_by_default: true,
> >                      roster_groups: false,
> >                      jid: data.jid,
> >                      sid: data.sid,
> >                      rid: data.rid,
> >                      message_carbons: true,
> >                      fullname: 'Simon',
> >                      debug: true,
> >                      keepalive: true,
> >                      allow_muc: false,
> >                      storage: 'local'
> >                  })
> >              })
> >
> >          }
> >  );
> >
> >    And here is my prebind function:
> >
> >  var XMPP = require('node-xmpp-client');
> >  var prebind = new XMPP({
> >      jid: 'test@localhost',
> >      password: 'xxxxx',
> >      preferred: 'PLAIN',
> >      wait: 10,
> >      bosh: {
> >          url: '[26]http://localhost:5280/http-bind/',
> >          prebind: function (error, data) {
> >              if (error) throw new Error(error);
> >              data.jid = 'test@localhost';
> >              console.log(data);
> >              return res.send(data);
> >          }
> >      },
> >      reconnect: true
> >  });
>

Re: [conversejs] Prebinding doesn't complete

From:
Simon Hill
Date:
2014-11-09 @ 18:06
Thanks for confirming this. I just tried:

https://github.com/eelcocramer/node-bosh-xmpp-client

And get  ERROR: Plain SASL authentication unavailable!!!

The github project doesn't allow me to raise an issue, so I am stuck. My
Prosody config permits saslauth and legacyauth.

DEBUG: request: <body content="text/xml; charset=utf-8" to="localhost"
rid="5039" hold="1" wait="60" ver="1.6" xml:lang="en" xmpp:version="1.0"
xmlns="http://jabber.org/protocol/httpbind" xmlns:xmpp="urn:xmpp:xbosh"/>
Express server listening on port 8084 in development mode
DEBUG: response: <body xmlns:stream='http://etherx.jabber.org/streams'
xmpp:version='1.0' xmlns:xmpp='urn:xmpp:xbosh' ver='1.6' inactivity='60'
requests='2' polling='5' secure='true' hold='1' from='localhost'
authid='aea55ee7-b8ef-453e-9dd9-3b935f6cd2fb' wait='60'
sid='aea55ee7-b8ef-453e-9dd9-3b935f6cd2fb' xmlns='
http://jabber.org/protocol/httpbind'><stream:features><mechanisms

xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><mechanism>SCRAM-SHA-1</mechanism><mechanism>DIGEST-MD5</mechanism></mechanisms><register
xmlns='http://jabber.org/features/iq-register'/></stream:features></body>
ERROR: Plain SASL authentication unavailable!!!

Any clues about what to try next?

On Sun, Nov 9, 2014 at 8:22 AM, JC Brand <lists@opkode.com> wrote:

> I think your problem is likely with node-xmpp-client.
>
> I tried using node-xmpp-client for prebinding a while back and also
> struggled to get
> it to work.
>
> Eventually I ended up using node-bosh-xmpp-client
> https://github.com/eelcocramer/node-bosh-xmpp-client
>
> It also didn't work out of the box for me, but it was conceptually much
> simpler
> and easier to figure out what was going on and make the necessary changes
> (which
> thankfully have been accepted in a pull request).
>
>
> On Sat, Nov 08, 2014 at 09:23:02AM -0800, Simon Hill wrote:
> >    I'm using Prosody and node-xmpp-client to do prebinding. Converse
> looks
> >    like it prebinds - no login dialog, no errors, but no contacts are
> listed,
> >    can't look anyone up, can't send, and trying to do anything like
> change
> >    status doesn't work. It could a problem with my prebinding lib, so
> I'd be
> >    grateful if anyone can rule on that.
> >    Here is the visual: [1]http://screencast.com/t/ScaXpPqEtr
> >    vs what it looks like it I log in 'manually' (by setting status to
> log out
> >    and then logging in through the form): [2]
> http://screencast.com/t/5v0TjEnm
> >    Here is the output from Prosody when I prebind:
> >    [3]http://screencast.com/t/5v0TjEnm
> >     Here is the output from converse:
> >    chat prebinding initialized Object {rid: "6896357116", sid:
> >    "ae1772fa-0dd9-41d5-9667-4f2c047007c1", jid: "test@localhost"}
> (index):192
> >    Attached converse.min.js:229
> >    0 _throttledRequestHandler called with 0 requests converse.min.js:229
> >    0 _throttledRequestHandler called with 0 requests converse.min.js:229
> >    0 _throttledRequestHandler called with 0 requests converse.min.js:229
> >    0 _throttledRequestHandler called with 0 requests converse.min.js:229
> >    Attached converse.min.js: 229
> >    0 _throttledRequestHandler called with 0 requests converse.min.js:229
> >    0 _throttledRequestHandler called with 0 requests converse.min.js:229
> >    0 _throttledRequestHandler called with 0 requests converse.min.js:229
> >    0 request id 1.0 posting converse.min.js:229
> >    0 request id 1.0 state changed to 1 converse.min.js:229
> >    <body rid="6896357116"
> >    xmlns="http://[4]jabber.org/protocol/httpbind"
> >    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1">…</body>
> >    converse.min.js:229
> >    0 request id 1.1 state changed to 2 converse.min.js:229
> >    0 request id 1.1 state changed to 3 converse.min.js:229
> >    0 request id 1.1 state changed to 4 converse.min.js:229
> >    0 removing request converse.min.js:229
> >    0 _throttledRequestHandler called with 0 requests converse.min.js:229
> >    0 request id 1 should now be removed converse.min.js:229
> >    0 request id 1.1 got 200 converse.min.js:229
> >    1 _dataRecv called converse.min.js:229
> >    <body xmlns:stream="http://[5]etherx.jabber.org/streams"
> >    xmlns="http://[6]jabber.org/protocol/httpbind"
> >    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1"></body> converse.min.js:229
> >    1 no requests during idle cycle, sending blank request
> converse.min.js:229
> >    0 request id 2.0 posting converse.min.js:229
> >    0 request id 2.0 state changed to 1 converse.min.js:229
> >    <body rid="6896357117"
> >    xmlns="http://[7]jabber.org/protocol/httpbind"
> >    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1"></body> converse.min.js:229
> >    0 request id 2.1 state changed to 2 converse.min.js:229
> >    0 request id 2.1 state changed to 3 converse.min.js:229
> >    0 request id 2.1 state changed to 4 converse.min.js:229
> >    0 removing request converse.min.js:229
> >    0 _throttledRequestHandler called with 0 requests converse.min.js:229
> >    0 request id 2 should now be removed converse.min.js:229
> >    0 request id 2.1 got 200 converse.min.js:229
> >    1 _dataRecv called converse.min.js:229
> >    <body xmlns:stream="http://[8]etherx.jabber.org/streams"
> >    xmlns="http://[9]jabber.org/protocol/httpbind"
> >    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1"></body> converse.min.js:229
> >    1 no requests during idle cycle, sending blank request
> converse.min.js:229
> >    0 request id 3.0 posting converse.min.js:229
> >    0 request id 3.0 state changed to 1 converse.min.js:229
> >    <body rid="6896357118"
> >    xmlns="http://[10]jabber.org/protocol/httpbind"
> >    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1"></body> converse.min.js:229
> >    0 request id 3.1 state changed to 2 converse.min.js:229
> >    0 request id 3.1 state changed to 3 converse.min.js:229
> >    0 request id 3.1 state changed to 4 converse.min.js:229
> >    0 removing request converse.min.js:229
> >    0 _throttledRequestHandler called with 0 requests converse.min.js:229
> >    0 request id 3 should now be removed converse.min.js:229
> >    0 request id 3.1 got 200 converse.min.js:229
> >    1 _dataRecv called converse.min.js:229
> >    <body xmlns:stream="http://[11]etherx.jabber.org/streams"
> >    xmlns="http://[12]jabber.org/protocol/httpbind"
> >    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1"></body>��
> converse.min.js:229
> >    1 no requests during idle cycle, sending blank request
> converse.min.js:229
> >    0 request id 4.0 posting converse.min.js:229
> >    0 request id 4.0 state changed to 1 converse.min.js:229
> >    <body rid="6896357119"
> >    xmlns="http://[13]jabber.org/protocol/httpbind"
> >    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1"></body> converse.min.js:229
> >    0 request id 4.1 state changed to 2 converse.min.js:229
> >    0 request id 4.1 state changed to 3 converse.min.js:229
> >    0 request id 4.1 state changed to 4 converse.min.js:229
> >    0 removing request converse.min.js:229
> >    0 _throttledRequestHandler called with 0 requests converse.min .js:229
> >    0 request id 4 should now be removed converse.min.js:229
> >    0 request id 4.1 got 200 converse.min.js:229
> >    1 _dataRecv called converse.min.js:229
> >    <body xmlns:stream="http://[14]etherx.jabber.org/streams"
> >    xmlns="http://[15]jabber.org/protocol/httpbind"
> >    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1"></body> converse.min.js:229
> >    1 no requests during idle cycle, sending blank request
> converse.min.js:229
> >    0 request id 5.0 posting converse.min.js:229
> >    0 request id 5.0 state changed to 1 converse.min.js:229
> >    <body rid="6896357120" xmlns="http://jabber.org/protocol/httpbind"
> >    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1"></body> converse.min.js:229
> >    0 request id 5.1 state changed to 2 converse.min.js:229
> >    0 request id 5.1 state changed to 3 converse.min.js:229
> >    0 request id 5.1 state changed to 4 converse.min.js:229
> >    0 removing request converse.min.js:229
> >    0 _throttledRequestHandler called with 0 requests converse.min.js:229
> >    0 request id 5 should now be removed converse.min.js:229
> >    0 request id 5.1 got 200 converse.min.js:229
> >    1 _dataRecv called converse.min.js:229
> >    <body xmlns:stream="http://[16]etherx.jabber.org/ streams"
> >    xmlns="http://[17]jabber.org/protocol/httpbind"
> >    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1"></body> converse.min.js:229
> >    1 no requests during idle cycle, sending blank request
> converse.min.js:229
> >    0 request id 6.0 posting converse.min.js:229
> >    0 request id 6.0 state changed to 1 converse.min.js:229
> >    <body rid="6896357121"
> >    xmlns="http://[18]jabber.org/protocol/httpbind"
> >    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1"></body> converse.min.js:229
> >    0 request id 6.1 state changed to 2 converse.min.js:229
> >    0 request id 6.1 state changed to 3 converse.min.js:229
> >    0 requ est id 6.1 state changed to 4 converse.min.js:229
> >    0 removing request converse.min.js:229
> >    0 _throttledRequestHandler called with 0 requests converse.min.js:229
> >    0 request id 6 should now be removed converse.min.js:229
> >    0 request id 6.1 got 200 converse.min.js:229
> >    1 _dataRecv called converse.min.js:229
> >    <body xmlns:stream="http://[19]etherx.jabber.org/streams"
> >    xmlns="http://[20]jabber.org/protocol/httpbind"
> >    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1"></body> converse.min.js:229
> >    1 no requests during idle cycle, sending blank request
> converse.min.js:229
> >    0 request id 7.0 posting converse.min.js:229
> >    0 request id 7.0 state changed to 1 converse.min.js:229
> >    <body rid="6896357122"
> >    xmlns="http://[21]jabber.org/protocol/httpbind"
> >    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1"></body> converse.min.js:229
> >    0 request id 7.1 state changed to 2 converse.min.js:229
> >    0 request id 7.1 state changed to 3 converse.min.js:229
> >    0 request id 7.1 state changed to 4 converse.min.js:229
> >    0 removing request converse.min.js:229
> >    0 _throttledRequestHandler called with 0 requests converse.min.js:229
> >    0 request id 7 should now be removed converse.min.js:229
> >    0 request id 7.1 got 200 converse.min.js:229
> >    1 _dataRecv called converse.min.js:229
> >    <body xmlns:stream="http://[22]etherx.jabber.org/streams"
> >    xmlns="http://[23]jabber.org/protocol/httpbind"
> >    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1"></body> converse.min.js:229
> >    1 no requests during idle cycle, sending blank request
> converse.min.js:229
> >    0 request id 8.0 posting converse.min.js:229
> >    0 request id 8.0 state changed to 1 converse.min.js:229
> >    <body rid="6896357123"
> >    xmlns="http://[24]jabber.org/protocol/httpbind"
> >    sid="ae1772fa-0dd9-41d5-9667-4f2c047007c1"></body>
> >    Here is my converse config:
> >
> >  $.getJSON('/api/v1/chat/prebind/', function (data) {
> >              require(['converse'], function (converse) {
> >                  console.log('chat prebinding initialized',data);
> >                  converse.initialize({
> >
> >                     prebind: true,
> >                      auto_list_rooms: true,
> >                      auto_subscribe: false,
> >                      bosh_service_url: '[25]
> http://localhost:5280/http-bind',
> >                      hide_muc_server: true,
> >                      i18n: locales.en, // Refer to ./locale/locales.js
> to see which locales are supported
> >                      show_controlbox_by_default: true,
> >                      roster_groups: false,
> >                      jid: data.jid,
> >                      sid: data.sid,
> >                      rid: data.rid,
> >                      message_carbons: true,
> >                      fullname: 'Simon',
> >                      debug: true,
> >                      keepalive: true,
> >                      allow_muc: false,
> >                      storage: 'local'
> >                  })
> >              })
> >
> >          }
> >  );
> >
> >    And here is my prebind function:
> >
> >  var XMPP = require('node-xmpp-client');
> >  var prebind = new XMPP({
> >      jid: 'test@localhost',
> >      password: 'xxxxx',
> >      preferred: 'PLAIN',
> >      wait: 10,
> >      bosh: {
> >          url: '[26]http://localhost:5280/http-bind/',
> >          prebind: function (error, data) {
> >              if (error) throw new Error(error);
> >              data.jid = 'test@localhost';
> >              console.log(data);
> >              return res.send(data);
> >          }
> >      },
> >      reconnect: true
> >  });
>