librelist archives

« back to archive

Presence offline after pre-bind and Roaster not poopulating

Presence offline after pre-bind and Roaster not poopulating

From:
Nayana Hettiarachchi
Date:
2014-10-16 @ 09:23
i am prebinding on the first page load and saving jid,rid,sid on a server
side session. I am also handling the rid by using window.unload. everything
appears normal after page reloads. however when i look at the session tab
in Openfire, after the page reload the session presence is shown as
"offline" by clicking the "i am online" on Converse and clicking "Online"
again shows presence "online" on openfire session tab.

I also noticed that sometimes after the initial pre-bind and first page
load the presence also shows as offline.

Is there a way to set the presence to online on every page load? or
maintain the last known presence? I am using punjab to manage HTTP-BIND
connection to prevent other timeout issues faced with HTTP-BIND in openfire.


Second problem is the roaster is not showing the online contacts.


i see this request being sent

   1.
   2. <body rid='8056717221' xmlns='http://jabber.org/protocol/httpbind'
   sid='9effc5fbf07bf0eb1e1ff3e6e7fed085d310bc4d'><iq type='get' id='1:roster'
   xmlns='jabber:client'><query xmlns='jabber:iq:roster'/></iq></body>


And the following response is received

<body xmlns='http://jabber.org/protocol/httpbind'><iq xmlns='jabber:client'
to='nick@xmpp.ikluck.com/converse.js' type='result' id='1:roster'><query
xmlns='jabber:iq:roster'><item jid='lsagent121@xmpp.ikluck.com'
name='lsagent121' subscription='both'><group>Agents</group></item><item
jid='lsagent125@xmpp.ikluck.com' name='lsagent125'
subscription='both'><group>Agents</group></item></query></iq></body>

however converse does not show any of the users online who are actually
online.


below is how i am initizling converse

converse.initialize({
        auto_list_rooms: true,
        allow_contact_requests: false,
        forward_messages: true,
        auto_subscribe: true,
        bosh_service_url: 'http://xmpp.ikluck.com:5280/http-bind/',
        hide_muc_server: false,
        i18n: locales.en,
        prebind: true,
        allow_muc: false,
        show_controlbox_by_default: false,
        show_only_online_users: true,
        roster_groups: true,
        keepalive: true,
        play_sounds: true,
        jid: data.jid,
        rid: data.rid,
        sid: data.sid
    }, function(){
                window.sitechat = this;
    });
            jQuery(window).unload(function(){
                jQuery.get("xmpp/rid.php?rid=" + sitechat.connection.rid);
            });
        });


After contact list failed to appear then every subsequent page load i get a
404 error from BOSH for the roaster request.


   1. <body rid='1413448747' xmlns='http://jabber.org/protocol/httpbind'
   sid='9effc5fbf07bf0eb1e1ff3e6e7fed085d310bc4d'><iq type='get' id='1:roster'
   xmlns='jabber:client'><query xmlns='jabber:iq:roster'/></iq></body>
   2.

i am guessing maybe incorrect rid or session? but session still shows on
Openfire Session tab and i have removed the timeout for idle connections
from openfire it self.

Also after the roaster failing to load the rid and sid values from converse
are undefined.

console.log('unload sid '+sitechat.connection.sid);
console.log('unload rid '+sitechat.connection.rid);

unload sid undefined
unload rid undefined

Re: [conversejs] Presence offline after pre-bind and Roaster not poopulating

From:
Jc Brand
Date:
2014-10-16 @ 09:34
On Thu, Oct 16, 2014 at 10:23:20AM +0100, Nayana Hettiarachchi wrote:
>    i am prebinding on the first page load and saving jid,rid,sid on a server
>    side session. I am also handling the rid by using window.unload.
>    everything appears normal after page reloads. however when i look at the
>    session tab in Openfire, after the page reload the session presence is
>    shown as "offline" by clicking the "i am online" on Converse and clicking
>    "Online" again shows presence "online" on openfire session tab.
> 
>    I also noticed that sometimes after the initial pre-bind and first page
>    load the presence als o shows as offline. 
> 
>    Is there a way to set the presence to online on every page load? or
>    maintain the last known presence? I am using punjab to manage HTTP-BIND
>    connection to prevent other timeout issues faced with HTTP-BIND in
>    openfire.
> 
>    Second problem is the roaster is not showing the online contacts. 
> 
>    i see this request being sent 
> 
>     1. 
> 
>     2. <body rid='[1]8056717221'
>        xmlns='[2]http://jabber.org/protocol/httpbind'
>        sid='9effc5fbf07bf0eb1e1ff3e6e7fed085d310bc4d'><iq type='get'
>        id='1:roster' xmlns='jabber:client'><query
>        xmlns='jabber:iq:roster'/></iq></body>
> 
>    And the following response is recei ved
>    <body xmlns='[3]http://jabber.org/protocol/httpbind'><iq
>    xmlns='jabber:client' to='[4]nick@xmpp.ikluck.com/converse.js'
>    type='result' id='1:roster'><query xmlns='jabber:iq:roster'><item
>    jid='[5]lsagent121@xmpp.ikluck.com' name='lsagent121'
>    subscription='both'><group>Agents</group></item><item
>    jid='[6]lsagent125@xmpp.ikluck.com' name='lsagent125'
>    subscription='both'><group>Agents</group></item></query></iq></body>
>    however converse does not show any of the users online who are actually
>    online.
>    below is how i am initizling converse
>    converse.initialize({
>            auto_list_rooms: true,
>            allow_contact_requests: false,
>            forward_messages: true,
>            auto_subscribe: true,
>            bosh_service_url: '[7]http://xmpp.ikluck.com:5280/http-bind/', 
>            hide_muc_server: false,
>            i18n: locales.en, 
>            prebind: true,
>            allow_muc: false,
>            show_controlbox_by_default: false,
>            show_only_online_users: true,
>            roster_groups: true,
>            keepalive: true,
>            play_sounds: true,
>            jid: data.jid,
>            rid: data.rid,
>            sid: data.sid
>        }, function(){
>                    window.sitechat = this;
>        });
>                jQuery(window).unload(function(){
>                    jQuery.get("xmpp/rid.php?rid=" + sitechat.connection.rid);
>                });
>            });
>    After contact list failed to appear then every subsequent page load i get
>    a 404 error from BOSH for the roaster request. 
> 
>     1. <body rid='1413448747' xmlns='[8]http://jabber.org/protocol/httpbind'
>        sid='9effc5fbf07bf0eb1e1ff3e6e7fed085d310bc4d'><iq type='get'
>        id='1:roster' xmlns='jabber:client'><query
>        xmlns='jabber:iq:roster'/></iq></body>
>     2. 
> 
>    i am guessing maybe incorrect rid or session? but session still shows on
>    Openfire Session tab and i have removed the timeout for idle connections
>    from openfire it self.
>    Also after the roaster failing to load the rid and sid values from
>    converse are undefined.
>    console.log('unload sid '+sitechat.connection.sid);
>    console.log('unload rid '+sitechat.connection.rid);
>    unload sid undefined
>    unload rid undefined 

What version of converse.js are you using?

It's difficult to know what exactly the problem is here. The fact that your sid
and rid values are undefined means you don't have a proper connection.

So yes, it's likely your rid value is incorrect.

Add "debug: true" to the converse.initialize call and carefully check all the
XML stanzas sent between converse.js and your XMPP server.

If you have the wrong rid value, then you should have received a stanza 
from the server
which terminates the session.

Are you aware of the "keepalive" option? It will cache the rid and sid values
for you, so you don't have to do it yourself. 

https://conversejs.org/docs/html/index.html#keepalive

Re: [conversejs] Presence offline after pre-bind and Roaster not poopulating

From:
Nayana Hettiarachchi
Date:
2014-10-16 @ 09:49
i am using  version 0.8.3 (2014-09-22)

if i am pre-binding and and page reloads. what should i do? set prebind to
false on the consecutive runs? so it will use the previous values?

i manage to get more details about the crash after enabling debug. it seems
the code is crashing along side with jquery. I am unable to select the
error text so i had to create a screenshot. http://imgur.com/xuIxVXd

is this a compatibility issue with jquery version we are using?

On Thu, Oct 16, 2014 at 10:34 AM, JC Brand <lists@opkode.com> wrote:

> On Thu, Oct 16, 2014 at 10:23:20AM +0100, Nayana Hettiarachchi wrote:
> >    i am prebinding on the first page load and saving jid,rid,sid on a
> server
> >    side session. I am also handling the rid by using window.unload.
> >    everything appears normal after page reloads. however when i look at
> the
> >    session tab in Openfire, after the page reload the session presence is
> >    shown as "offline" by clicking the "i am online" on Converse and
> clicking
> >    "Online" again shows presence "online" on openfire session tab.
> >
> >    I also noticed that sometimes after the initial pre-bind and first
> page
> >    load the presence als o shows as offline.
> >
> >    Is there a way to set the presence to online on every page load? or
> >    maintain the last known presence? I am using punjab to manage
> HTTP-BIND
> >    connection to prevent other timeout issues faced with HTTP-BIND in
> >    openfire.
> >
> >    Second problem is the roaster is not showing the online contacts.
> >
> >    i see this request being sent
> >
> >     1.
> >
> >     2. <body rid='[1]8056717221'
> >        xmlns='[2]http://jabber.org/protocol/httpbind'
> >        sid='9effc5fbf07bf0eb1e1ff3e6e7fed085d310bc4d'><iq type='get'
> >        id='1:roster' xmlns='jabber:client'><query
> >        xmlns='jabber:iq:roster'/></iq></body>
> >
> >    And the following response is recei ved
> >    <body xmlns='[3]http://jabber.org/protocol/httpbind'><iq
> >    xmlns='jabber:client' to='[4]nick@xmpp.ikluck.com/converse.js'
> >    type='result' id='1:roster'><query xmlns='jabber:iq:roster'><item
> >    jid='[5]lsagent121@xmpp.ikluck.com' name='lsagent121'
> >    subscription='both'><group>Agents</group></item><item
> >    jid='[6]lsagent125@xmpp.ikluck.com' name='lsagent125'
> >    subscription='both'><group>Agents</group></item></query></iq></body>
> >    however converse does not show any of the users online who are
> actually
> >    online.
> >    below is how i am initizling converse
> >    converse.initialize({
> >            auto_list_rooms: true,
> >            allow_contact_requests: false,
> >            forward_messages: true,
> >            auto_subscribe: true,
> >            bosh_service_url: '[7]http://xmpp.ikluck.com:5280/http-bind/
> ',
> >            hide_muc_server: false,
> >            i18n: locales.en,
> >            prebind: true,
> >            allow_muc: false,
> >            show_controlbox_by_default: false,
> >            show_only_online_users: true,
> >            roster_groups: true,
> >            keepalive: true,
> >            play_sounds: true,
> >            jid: data.jid,
> >            rid: data.rid,
> >            sid: data.sid
> >        }, function(){
> >                    window.sitechat = this;
> >        });
> >                jQuery(window).unload(function(){
> >                    jQuery.get("xmpp/rid.php?rid=" +
> sitechat.connection.rid);
> >                });
> >            });
> >    After contact list failed to appear then every subsequent page load i
> get
> >    a 404 error from BOSH for the roaster request.
> >
> >     1. <body rid='1413448747' xmlns='[8]
> http://jabber.org/protocol/httpbind'
> >        sid='9effc5fbf07bf0eb1e1ff3e6e7fed085d310bc4d'><iq type='get'
> >        id='1:roster' xmlns='jabber:client'><query
> >        xmlns='jabber:iq:roster'/></iq></body>
> >     2.
> >
> >    i am guessing maybe incorrect rid or session? but session still shows
> on
> >    Openfire Session tab and i have removed the timeout for idle
> connections
> >    from openfire it self.
> >    Also after the roaster failing to load the rid and sid values from
> >    converse are undefined.
> >    console.log('unload sid '+sitechat.connection.sid);
> >    console.log('unload rid '+sitechat.connection.rid);
> >    unload sid undefined
> >    unload rid undefined
>
> What version of converse.js are you using?
>
> It's difficult to know what exactly the problem is here. The fact that
> your sid
> and rid values are undefined means you don't have a proper connection.
>
> So yes, it's likely your rid value is incorrect.
>
> Add "debug: true" to the converse.initialize call and carefully check all
> the
> XML stanzas sent between converse.js and your XMPP server.
>
> If you have the wrong rid value, then you should have received a stanza
> from the server
> which terminates the session.
>
> Are you aware of the "keepalive" option? It will cache the rid and sid
> values
> for you, so you don't have to do it yourself.
>
> https://conversejs.org/docs/html/index.html#keepalive
>

Re: [conversejs] Presence offline after pre-bind and Roaster not poopulating

From:
Jc Brand
Date:
2014-10-16 @ 10:00
On Thu, Oct 16, 2014 at 10:49:58AM +0100, Nayana Hettiarachchi wrote:
>    i am using  version 0.8.3 (2014-09-22)
>    if i am pre-binding and and page reloads. what should i do? set prebind to
>    false on the consecutive runs? so it will use the previous values?
>    i manage to get more details about the crash after enabling debug. it
>    seems the code is crashing along side with jquery. I am unable to select
>    the error text so i had to create a
>    screenshot. [1]http://imgur.com/xuIxVXd
>    is this a compatibility issue with jquery version we are using? 

Unfortunately that traceback doesn't help much because the JS files are
minified.

You'll have to set up a development environment and use the unminified files to
really see what's going on:
https://conversejs.org/docs/html/index.html#development

In the relatively near future I'll create unminified builds but we don't have
those for now, so you'll have to follow the above steps.


>    On Thu, Oct 16, 2014 at 10:34 AM, JC Brand <[2]lists@opkode.com> wrote:
> 
>      On Thu, Oct 16, 2014 at 10:23:20AM +0100, Nayana Hettiarachchi wrote:
>      >    i am prebinding on the first page load and saving jid,rid,sid on a
>      server
>      >    side session. I am also handling the rid by using window.unload.
>      >    everything appears normal after page reloads. however when i look
>      at the
>      >    session tab in Openfire, after the page reload the session presence
>      is
>      >    shown as "offline" by clicking the "i am online" on Converse and
>      clicking
>      >    "Online" again shows presence "online" on openfire session tab.
>      >
>      >    I also noticed that sometimes after the initial pre-bind and first
>      page
>      >    load the presence als o shows as offline. 
>      >
>      >    Is there a way to set the presence to online on every page load? or
>      >    maintain the last known presence? I am using punjab to manage
>      HTTP-BIND
>      >    connection to prevent other timeout issues faced with HTTP-BIND in
>      >    openfire.
>      >
>      >    Second problem is the roaster is not showing the online contacts. 
>      >
>      >    i see this request being sent 
>      >
>      >     1. 
>      >
>      >     2. <body rid='[3][1]8056717221'
>      >        xmlns='[2][4]http://jabber.org/protocol/httpbind'
>      >        sid='9effc5fbf07bf0eb1e1ff3e6e7fed085d310bc4d'><iq type='get'
>      >        id='1:roster' xmlns='jabber:client'><query
>      >        xmlns='jabber:iq:roster'/></iq></body>
>      >
>      >    And the following response is recei ved
>      >    <body xmlns='[3][5]http://jabber.org/protocol/httpbind'><iq
>      >    xmlns='jabber:client' to='[4][6]nick@xmpp.ikluck.com/converse.js'
>      >    type='result' id='1:roster'><query xmlns='jabber:iq:roster'><item
>      >    jid='[5][7]lsagent121@xmpp.ikluck.com' name='lsagent121'
>      >    subscription='both'><group>Agents</group></item><item
>      >    jid='[6][8]lsagent125@xmpp.ikluck.com' name='lsagent125'
>      >   
>      subscription='both'><group>Agents</group></item></query></iq></body>
>      >    however converse does not show any of the users online who are
>      actually
>      >    online.
>      >    below is how i am initizling converse
>      >    converse.initialize({
>      >            auto_list_rooms: true,
>      >            allow_contact_requests: false,
>      >            forward_messages: true,
>      >            auto_subscribe: true,
>      >            bosh_service_url:
>      '[7][9]http://xmpp.ikluck.com:5280/http-bind/', 
>      >            hide_muc_server: false,
>      >            i18n: locales.en, 
>      >            prebind: true,
>      >            allow_muc: false,
>      >            show_controlbox_by_default: false,
>      >            show_only_online_users: true,
>      >            roster_groups: true,
>      >            keepalive: true,
>      >            play_sounds: true,
>      >            jid: data.jid,
>      >            rid: data.rid,
>      >            sid: data.sid
>      >        }, function(){
>      >                    window.sitechat = this;
>      >        });
>      >                jQuery(window).unload(function(){
>      >                    jQuery.get("xmpp/rid.php?rid=" +
>      sitechat.connection.rid);
>      >                });
>      >            });
>      >    After contact list failed to appear then every subsequent page load
>      i get
>      >    a 404 error from BOSH for the roaster request. 
>      >
>      >     1. <body rid='1413448747'
>      xmlns='[8][10]http://jabber.org/protocol/httpbind'
>      >        sid='9effc5fbf07bf0eb1e1ff3e6e7fed085d310bc4d'><iq type='get'
>      >        id='1:roster' xmlns='jabber:client'><query
>      >        xmlns='jabber:iq:roster'/></iq></body>
>      >     2. 
>      >
>      >    i am guessing maybe incorrect rid or session? but session still
>      shows on
>      >    Openfire Session tab and i have removed the timeout for idle
>      connections
>      >    from openfire it self.
>      >    Also after the roaster failing to load the rid and sid values from
>      >    converse are undefined.
>      >    console.log('unload sid '+sitechat.connection.sid);
>      >    console.log('unload rid '+sitechat.connection.rid);
>      >    unload sid undefined
>      >    unload rid undefined 
> 
>      What version of converse.js are you using?
> 
>      It's difficult to know what exactly the problem is here. The fact that
>      your sid
>      and rid values are undefined means you don't have a proper connection.
> 
>      So yes, it's likely your rid value is incorrect.
> 
>      Add "debug: true" to the converse.initialize call and carefully check
>      all the
>      XML stanzas sent between converse.js and your XMPP server.
> 
>      If you have the wrong rid value, then you should have received a stanza
>      from the server
>      which terminates the session.
> 
>      Are you aware of the "keepalive" option? It will cache the rid and sid
>      values
>      for you, so you don't have to do it yourself.
> 
>      [11]https://conversejs.org/docs/html/index.html#keepalive
> 
> References
> 
>    Visible links
>    1. http://imgur.com/xuIxVXd
>    2. mailto:lists@opkode.com
>    3. file:///tmp/tel:%5B1%5D8056717221
>    4. http://jabber.org/protocol/httpbind
>    5. http://jabber.org/protocol/httpbind
>    6. http://nick@xmpp.ikluck.com/converse.js
>    7. mailto:lsagent121@xmpp.ikluck.com
>    8. mailto:lsagent125@xmpp.ikluck.com
>    9. http://xmpp.ikluck.com:5280/http-bind/
>   10. http://jabber.org/protocol/httpbind
>   11. https://conversejs.org/docs/html/index.html#keepalive

Re: [conversejs] Presence offline after pre-bind and Roaster not poopulating

From:
Nayana Hettiarachchi
Date:
2014-10-16 @ 10:02
OK let me do that and find more info and let you know.
On 16 Oct, 2014 5:00 pm, "JC Brand" <lists@opkode.com> wrote:

> On Thu, Oct 16, 2014 at 10:49:58AM +0100, Nayana Hettiarachchi wrote:
> >    i am using  version 0.8.3 (2014-09-22)
> >    if i am pre-binding and and page reloads. what should i do? set
> prebind to
> >    false on the consecutive runs? so it will use the previous values?
> >    i manage to get more details about the crash after enabling debug. it
> >    seems the code is crashing along side with jquery. I am unable to
> select
> >    the error text so i had to create a
> >    screenshot. [1]http://imgur.com/xuIxVXd
> >    is this a compatibility issue with jquery version we are using?
>
> Unfortunately that traceback doesn't help much because the JS files are
> minified.
>
> You'll have to set up a development environment and use the unminified
> files to
> really see what's going on:
> https://conversejs.org/docs/html/index.html#development
>
> In the relatively near future I'll create unminified builds but we don't
> have
> those for now, so you'll have to follow the above steps.
>
>
> >    On Thu, Oct 16, 2014 at 10:34 AM, JC Brand <[2]lists@opkode.com>
> wrote:
> >
> >      On Thu, Oct 16, 2014 at 10:23:20AM +0100, Nayana Hettiarachchi
> wrote:
> >      >    i am prebinding on the first page load and saving jid,rid,sid
> on a
> >      server
> >      >    side session. I am also handling the rid by using
> window.unload.
> >      >    everything appears normal after page reloads. however when i
> look
> >      at the
> >      >    session tab in Openfire, after the page reload the session
> presence
> >      is
> >      >    shown as "offline" by clicking the "i am online" on Converse
> and
> >      clicking
> >      >    "Online" again shows presence "online" on openfire session tab.
> >      >
> >      >    I also noticed that sometimes after the initial pre-bind and
> first
> >      page
> >      >    load the presence als o shows as offline.
> >      >
> >      >    Is there a way to set the presence to online on every page
> load? or
> >      >    maintain the last known presence? I am using punjab to manage
> >      HTTP-BIND
> >      >    connection to prevent other timeout issues faced with
> HTTP-BIND in
> >      >    openfire.
> >      >
> >      >    Second problem is the roaster is not showing the online
> contacts.
> >      >
> >      >    i see this request being sent
> >      >
> >      >     1.
> >      >
> >      >     2. <body rid='[3][1]8056717221'
> >      >        xmlns='[2][4]http://jabber.org/protocol/httpbind'
> >      >        sid='9effc5fbf07bf0eb1e1ff3e6e7fed085d310bc4d'><iq
> type='get'
> >      >        id='1:roster' xmlns='jabber:client'><query
> >      >        xmlns='jabber:iq:roster'/></iq></body>
> >      >
> >      >    And the following response is recei ved
> >      >    <body xmlns='[3][5]http://jabber.org/protocol/httpbind'><iq
> >      >    xmlns='jabber:client' to='[4][6]
> nick@xmpp.ikluck.com/converse.js'
> >      >    type='result' id='1:roster'><query
> xmlns='jabber:iq:roster'><item
> >      >    jid='[5][7]lsagent121@xmpp.ikluck.com' name='lsagent121'
> >      >    subscription='both'><group>Agents</group></item><item
> >      >    jid='[6][8]lsagent125@xmpp.ikluck.com' name='lsagent125'
> >      >
> >      subscription='both'><group>Agents</group></item></query></iq></body>
> >      >    however converse does not show any of the users online who are
> >      actually
> >      >    online.
> >      >    below is how i am initizling converse
> >      >    converse.initialize({
> >      >            auto_list_rooms: true,
> >      >            allow_contact_requests: false,
> >      >            forward_messages: true,
> >      >            auto_subscribe: true,
> >      >            bosh_service_url:
> >      '[7][9]http://xmpp.ikluck.com:5280/http-bind/',
> >      >            hide_muc_server: false,
> >      >            i18n: locales.en,
> >      >            prebind: true,
> >      >            allow_muc: false,
> >      >            show_controlbox_by_default: false,
> >      >            show_only_online_users: true,
> >      >            roster_groups: true,
> >      >            keepalive: true,
> >      >            play_sounds: true,
> >      >            jid: data.jid,
> >      >            rid: data.rid,
> >      >            sid: data.sid
> >      >        }, function(){
> >      >                    window.sitechat = this;
> >      >        });
> >      >                jQuery(window).unload(function(){
> >      >                    jQuery.get("xmpp/rid.php?rid=" +
> >      sitechat.connection.rid);
> >      >                });
> >      >            });
> >      >    After contact list failed to appear then every subsequent page
> load
> >      i get
> >      >    a 404 error from BOSH for the roaster request.
> >      >
> >      >     1. <body rid='1413448747'
> >      xmlns='[8][10]http://jabber.org/protocol/httpbind'
> >      >        sid='9effc5fbf07bf0eb1e1ff3e6e7fed085d310bc4d'><iq
> type='get'
> >      >        id='1:roster' xmlns='jabber:client'><query
> >      >        xmlns='jabber:iq:roster'/></iq></body>
> >      >     2.
> >      >
> >      >    i am guessing maybe incorrect rid or session? but session still
> >      shows on
> >      >    Openfire Session tab and i have removed the timeout for idle
> >      connections
> >      >    from openfire it self.
> >      >    Also after the roaster failing to load the rid and sid values
> from
> >      >    converse are undefined.
> >      >    console.log('unload sid '+sitechat.connection.sid);
> >      >    console.log('unload rid '+sitechat.connection.rid);
> >      >    unload sid undefined
> >      >    unload rid undefined
> >
> >      What version of converse.js are you using?
> >
> >      It's difficult to know what exactly the problem is here. The fact
> that
> >      your sid
> >      and rid values are undefined means you don't have a proper
> connection.
> >
> >      So yes, it's likely your rid value is incorrect.
> >
> >      Add "debug: true" to the converse.initialize call and carefully
> check
> >      all the
> >      XML stanzas sent between converse.js and your XMPP server.
> >
> >      If you have the wrong rid value, then you should have received a
> stanza
> >      from the server
> >      which terminates the session.
> >
> >      Are you aware of the "keepalive" option? It will cache the rid and
> sid
> >      values
> >      for you, so you don't have to do it yourself.
> >
> >      [11]https://conversejs.org/docs/html/index.html#keepalive
> >
> > References
> >
> >    Visible links
> >    1. http://imgur.com/xuIxVXd
> >    2. mailto:lists@opkode.com
> >    3. file:///tmp/tel:%5B1%5D8056717221
> >    4. http://jabber.org/protocol/httpbind
> >    5. http://jabber.org/protocol/httpbind
> >    6. http://nick@xmpp.ikluck.com/converse.js
> >    7. mailto:lsagent121@xmpp.ikluck.com
> >    8. mailto:lsagent125@xmpp.ikluck.com
> >    9. http://xmpp.ikluck.com:5280/http-bind/
> >   10. http://jabber.org/protocol/httpbind
> >   11. https://conversejs.org/docs/html/index.html#keepalive
>

Re: [conversejs] Presence offline after pre-bind and Roaster not poopulating

From:
Nayana Hettiarachchi
Date:
2014-10-16 @ 10:48
make dev or the other method both failing at bower.

shall i try the latest from repo instead?

On Thu, Oct 16, 2014 at 11:02 AM, Nayana Hettiarachchi <nayana@corp-gems.com
> wrote:

> OK let me do that and find more info and let you know.
> On 16 Oct, 2014 5:00 pm, "JC Brand" <lists@opkode.com> wrote:
>
>> On Thu, Oct 16, 2014 at 10:49:58AM +0100, Nayana Hettiarachchi wrote:
>> >    i am using  version 0.8.3 (2014-09-22)
>> >    if i am pre-binding and and page reloads. what should i do? set
>> prebind to
>> >    false on the consecutive runs? so it will use the previous values?
>> >    i manage to get more details about the crash after enabling debug. it
>> >    seems the code is crashing along side with jquery. I am unable to
>> select
>> >    the error text so i had to create a
>> >    screenshot. [1]http://imgur.com/xuIxVXd
>> >    is this a compatibility issue with jquery version we are using?
>>
>> Unfortunately that traceback doesn't help much because the JS files are
>> minified.
>>
>> You'll have to set up a development environment and use the unminified
>> files to
>> really see what's going on:
>> https://conversejs.org/docs/html/index.html#development
>>
>> In the relatively near future I'll create unminified builds but we don't
>> have
>> those for now, so you'll have to follow the above steps.
>>
>>
>> >    On Thu, Oct 16, 2014 at 10:34 AM, JC Brand <[2]lists@opkode.com>
>> wrote:
>> >
>> >      On Thu, Oct 16, 2014 at 10:23:20AM +0100, Nayana Hettiarachchi
>> wrote:
>> >      >    i am prebinding on the first page load and saving jid,rid,sid
>> on a
>> >      server
>> >      >    side session. I am also handling the rid by using
>> window.unload.
>> >      >    everything appears normal after page reloads. however when i
>> look
>> >      at the
>> >      >    session tab in Openfire, after the page reload the session
>> presence
>> >      is
>> >      >    shown as "offline" by clicking the "i am online" on Converse
>> and
>> >      clicking
>> >      >    "Online" again shows presence "online" on openfire session
>> tab.
>> >      >
>> >      >    I also noticed that sometimes after the initial pre-bind and
>> first
>> >      page
>> >      >    load the presence als o shows as offline.
>> >      >
>> >      >    Is there a way to set the presence to online on every page
>> load? or
>> >      >    maintain the last known presence? I am using punjab to manage
>> >      HTTP-BIND
>> >      >    connection to prevent other timeout issues faced with
>> HTTP-BIND in
>> >      >    openfire.
>> >      >
>> >      >    Second problem is the roaster is not showing the online
>> contacts.
>> >      >
>> >      >    i see this request being sent
>> >      >
>> >      >     1.
>> >      >
>> >      >     2. <body rid='[3][1]8056717221'
>> >      >        xmlns='[2][4]http://jabber.org/protocol/httpbind'
>> >      >        sid='9effc5fbf07bf0eb1e1ff3e6e7fed085d310bc4d'><iq
>> type='get'
>> >      >        id='1:roster' xmlns='jabber:client'><query
>> >      >        xmlns='jabber:iq:roster'/></iq></body>
>> >      >
>> >      >    And the following response is recei ved
>> >      >    <body xmlns='[3][5]http://jabber.org/protocol/httpbind'><iq
>> >      >    xmlns='jabber:client' to='[4][6]
>> nick@xmpp.ikluck.com/converse.js'
>> >      >    type='result' id='1:roster'><query
>> xmlns='jabber:iq:roster'><item
>> >      >    jid='[5][7]lsagent121@xmpp.ikluck.com' name='lsagent121'
>> >      >    subscription='both'><group>Agents</group></item><item
>> >      >    jid='[6][8]lsagent125@xmpp.ikluck.com' name='lsagent125'
>> >      >
>> >
>> subscription='both'><group>Agents</group></item></query></iq></body>
>> >      >    however converse does not show any of the users online who are
>> >      actually
>> >      >    online.
>> >      >    below is how i am initizling converse
>> >      >    converse.initialize({
>> >      >            auto_list_rooms: true,
>> >      >            allow_contact_requests: false,
>> >      >            forward_messages: true,
>> >      >            auto_subscribe: true,
>> >      >            bosh_service_url:
>> >      '[7][9]http://xmpp.ikluck.com:5280/http-bind/',
>> >      >            hide_muc_server: false,
>> >      >            i18n: locales.en,
>> >      >            prebind: true,
>> >      >            allow_muc: false,
>> >      >            show_controlbox_by_default: false,
>> >      >            show_only_online_users: true,
>> >      >            roster_groups: true,
>> >      >            keepalive: true,
>> >      >            play_sounds: true,
>> >      >            jid: data.jid,
>> >      >            rid: data.rid,
>> >      >            sid: data.sid
>> >      >        }, function(){
>> >      >                    window.sitechat = this;
>> >      >        });
>> >      >                jQuery(window).unload(function(){
>> >      >                    jQuery.get("xmpp/rid.php?rid=" +
>> >      sitechat.connection.rid);
>> >      >                });
>> >      >            });
>> >      >    After contact list failed to appear then every subsequent
>> page load
>> >      i get
>> >      >    a 404 error from BOSH for the roaster request.
>> >      >
>> >      >     1. <body rid='1413448747'
>> >      xmlns='[8][10]http://jabber.org/protocol/httpbind'
>> >      >        sid='9effc5fbf07bf0eb1e1ff3e6e7fed085d310bc4d'><iq
>> type='get'
>> >      >        id='1:roster' xmlns='jabber:client'><query
>> >      >        xmlns='jabber:iq:roster'/></iq></body>
>> >      >     2.
>> >      >
>> >      >    i am guessing maybe incorrect rid or session? but session
>> still
>> >      shows on
>> >      >    Openfire Session tab and i have removed the timeout for idle
>> >      connections
>> >      >    from openfire it self.
>> >      >    Also after the roaster failing to load the rid and sid values
>> from
>> >      >    converse are undefined.
>> >      >    console.log('unload sid '+sitechat.connection.sid);
>> >      >    console.log('unload rid '+sitechat.connection.rid);
>> >      >    unload sid undefined
>> >      >    unload rid undefined
>> >
>> >      What version of converse.js are you using?
>> >
>> >      It's difficult to know what exactly the problem is here. The fact
>> that
>> >      your sid
>> >      and rid values are undefined means you don't have a proper
>> connection.
>> >
>> >      So yes, it's likely your rid value is incorrect.
>> >
>> >      Add "debug: true" to the converse.initialize call and carefully
>> check
>> >      all the
>> >      XML stanzas sent between converse.js and your XMPP server.
>> >
>> >      If you have the wrong rid value, then you should have received a
>> stanza
>> >      from the server
>> >      which terminates the session.
>> >
>> >      Are you aware of the "keepalive" option? It will cache the rid and
>> sid
>> >      values
>> >      for you, so you don't have to do it yourself.
>> >
>> >      [11]https://conversejs.org/docs/html/index.html#keepalive
>> >
>> > References
>> >
>> >    Visible links
>> >    1. http://imgur.com/xuIxVXd
>> >    2. mailto:lists@opkode.com
>> >    3. file:///tmp/tel:%5B1%5D8056717221
>> >    4. http://jabber.org/protocol/httpbind
>> >    5. http://jabber.org/protocol/httpbind
>> >    6. http://nick@xmpp.ikluck.com/converse.js
>> >    7. mailto:lsagent121@xmpp.ikluck.com
>> >    8. mailto:lsagent125@xmpp.ikluck.com
>> >    9. http://xmpp.ikluck.com:5280/http-bind/
>> >   10. http://jabber.org/protocol/httpbind
>> >   11. https://conversejs.org/docs/html/index.html#keepalive
>>
>

Re: [conversejs] Presence offline after pre-bind and Roaster not poopulating

From:
Jc Brand
Date:
2014-10-16 @ 11:21
On Thu, Oct 16, 2014 at 11:48:36AM +0100, Nayana Hettiarachchi wrote:
>    make dev or the other method both failing at bower. 
>    shall i try the latest from repo instead? 

Always give debug output such as the traceback. Otherwise you're wasting
people's time by having to ask you for it.


>    On Thu, Oct 16, 2014 at 11:02 AM, Nayana Hettiarachchi
>    <[1]nayana@corp-gems.com> wrote:
> 
>      OK let me do that and find more info and let you know.
> 
>      On 16 Oct, 2014 5:00 pm, "JC Brand" <[2]lists@opkode.com> wrote:
> 
>        On Thu, Oct 16, 2014 at 10:49:58AM +0100, Nayana Hettiarachchi wrote:
>        >    i am using  version 0.8.3 (2014-09-22)
>        >    if i am pre-binding and and page reloads. what should i do? set
>        prebind to
>        >    false on the consecutive runs? so it will use the previous
>        values?
>        >    i manage to get more details about the crash after enabling
>        debug. it
>        >    seems the code is crashing along side with jquery. I am unable to
>        select
>        >    the error text so i had to create a
>        >    screenshot. [1][3]http://imgur.com/xuIxVXd
>        >    is this a compatibility issue with jquery version we are using? 
> 
>        Unfortunately that traceback doesn't help much because the JS files
>        are
>        minified.
> 
>        You'll have to set up a development environment and use the unminified
>        files to
>        really see what's going on:
>        [4]https://conversejs.org/docs/html/index.html#development
> 
>        In the relatively near future I'll create unminified builds but we
>        don't have
>        those for now, so you'll have to follow the above steps.
> 
>        >    On Thu, Oct 16, 2014 at 10:34 AM, JC Brand
>        <[2][5]lists@opkode.com> wrote:
>        >
>        >      On Thu, Oct 16, 2014 at 10:23:20AM +0100, Nayana Hettiarachchi
>        wrote:
>        >      >    i am prebinding on the first page load and saving
>        jid,rid,sid on a
>        >      server
>        >      >    side session. I am also handling the rid by using
>        window.unload.
>        >      >    everything appears normal after page reloads. however when
>        i look
>        >      at the
>        >      >    session tab in Openfire, after the page reload the session
>        presence
>        >      is
>        >      >    shown as "offline" by clicking the "i am online" on
>        Converse and
>        >      clicking
>        >      >    "Online" again shows presence "online" on openfire session
>        tab.
>        >      >
>        >      >    I also noticed that sometimes after the initial pre-bind
>        and first
>        >      page
>        >      >    load the presence als o shows as offline. 
>        >      >
>        >      >    Is there a way to set the presence to online on every page
>        load? or
>        >      >    maintain the last known presence? I am using punjab to
>        manage
>        >      HTTP-BIND
>        >      >    connection to prevent other timeout issues faced with
>        HTTP-BIND in
>        >      >    openfire.
>        >      >
>        >      >    Second problem is the roaster is not showing the online
>        contacts. 
>        >      >
>        >      >    i see this request being sent 
>        >      >
>        >      >     1. 
>        >      >
>        >      >     2. <body rid='[3][1]8056717221'
>        >      >        xmlns='[2][4][6]http://jabber.org/protocol/httpbind'
>        >      >        sid='9effc5fbf07bf0eb1e1ff3e6e7fed085d310bc4d'><iq
>        type='get'
>        >      >        id='1:roster' xmlns='jabber:client'><query
>        >      >        xmlns='jabber:iq:roster'/></iq></body>
>        >      >
>        >      >    And the following response is recei ved
>        >      >    <body
>        xmlns='[3][5][7]http://jabber.org/protocol/httpbind'><iq
>        >      >    xmlns='jabber:client'
>        to='[4][6][8]nick@xmpp.ikluck.com/converse.js'
>        >      >    type='result' id='1:roster'><query
>        xmlns='jabber:iq:roster'><item
>        >      >    jid='[5][7][9]lsagent121@xmpp.ikluck.com'
>        name='lsagent121'
>        >      >    subscription='both'><group>Agents</group></item><item
>        >      >    jid='[6][8][10]lsagent125@xmpp.ikluck.com'
>        name='lsagent125'
>        >      >   
>        >     
>        subscription='both'><group>Agents</group></item></query></iq></body>
>        >      >    however converse does not show any of the users online who
>        are
>        >      actually
>        >      >    online.
>        >      >    below is how i am initizling converse
>        >      >    converse.initialize({
>        >      >            auto_list_rooms: true,
>        >      >            allow_contact_requests: false,
>        >      >            forward_messages: true,
>        >      >            auto_subscribe: true,
>        >      >            bosh_service_url:
>        >      '[7][9][11]http://xmpp.ikluck.com:5280/http-bind/', 
>        >      >            hide_muc_server: false,
>        >      >            i18n: locales.en, 
>        >      >            prebind: true,
>        >      >            allow_muc: false,
>        >      >            show_controlbox_by_default: false,
>        >      >            show_only_online_users: true,
>        >      >            roster_groups: true,
>        >      >            keepalive: true,
>        >      >            play_sounds: true,
>        >      >            jid: data.jid,
>        >      >            rid: data.rid,
>        >      >            sid: data.sid
>        >      >        }, function(){
>        >      >                    window.sitechat = this;
>        >      >        });
>        >      >                jQuery(window).unload(function(){
>        >      >                    jQuery.get("xmpp/rid.php?rid=" +
>        >      sitechat.connection.rid);
>        >      >                });
>        >      >            });
>        >      >    After contact list failed to appear then every subsequent
>        page load
>        >      i get
>        >      >    a 404 error from BOSH for the roaster request. 
>        >      >
>        >      >     1. <body rid='1413448747'
>        >      xmlns='[8][10][12]http://jabber.org/protocol/httpbind'
>        >      >        sid='9effc5fbf07bf0eb1e1ff3e6e7fed085d310bc4d'><iq
>        type='get'
>        >      >        id='1:roster' xmlns='jabber:client'><query
>        >      >        xmlns='jabber:iq:roster'/></iq></body>
>        >      >     2. 
>        >      >
>        >      >    i am guessing maybe incorrect rid or session? but session
>        still
>        >      shows on
>        >      >    Openfire Session tab and i have removed the timeout for
>        idle
>        >      connections
>        >      >    from openfire it self.
>        >      >    Also after the roaster failing to load the rid and sid
>        values from
>        >      >    converse are undefined.
>        >      >    console.log('unload sid '+sitechat.connection.sid);
>        >      >    console.log('unload rid '+sitechat.connection.rid);
>        >      >    unload sid undefined
>        >      >    unload rid undefined 
>        >
>        >      What version of converse.js are you using?
>        >
>        >      It's difficult to know what exactly the problem is here. The
>        fact that
>        >      your sid
>        >      and rid values are undefined means you don't have a proper
>        connection.
>        >
>        >      So yes, it's likely your rid value is incorrect.
>        >
>        >      Add "debug: true" to the converse.initialize call and carefully
>        check
>        >      all the
>        >      XML stanzas sent between converse.js and your XMPP server.
>        >
>        >      If you have the wrong rid value, then you should have received
>        a stanza
>        >      from the server
>        >      which terminates the session.
>        >
>        >      Are you aware of the "keepalive" option? It will cache the rid
>        and sid
>        >      values
>        >      for you, so you don't have to do it yourself.
>        >
>        >      [11][13]https://conversejs.org/docs/html/index.html#keepalive
>        >
>        > References
>        >
>        >    Visible links
>        >    1. [14]http://imgur.com/xuIxVXd
>        >    2. mailto:[15]lists@opkode.com
>        >    3. file:///tmp/tel:%5B1%5D8056717221
>        >    4. [16]http://jabber.org/protocol/httpbind
>        >    5. [17]http://jabber.org/protocol/httpbind
>        >    6. [18]http://nick@xmpp.ikluck.com/converse.js
>        >    7. mailto:[19]lsagent121@xmpp.ikluck.com
>        >    8. mailto:[20]lsagent125@xmpp.ikluck.com
>        >    9. [21]http://xmpp.ikluck.com:5280/http-bind/
>        >   10. [22]http://jabber.org/protocol/httpbind
>        >   11. [23]https://conversejs.org/docs/html/index.html#keepalive
> 
> References
> 
>    Visible links
>    1. mailto:nayana@corp-gems.com
>    2. mailto:lists@opkode.com
>    3. http://imgur.com/xuIxVXd
>    4. https://conversejs.org/docs/html/index.html#development
>    5. mailto:lists@opkode.com
>    6. http://jabber.org/protocol/httpbind
>    7. http://jabber.org/protocol/httpbind
>    8. http://nick@xmpp.ikluck.com/converse.js
>    9. mailto:lsagent121@xmpp.ikluck.com
>   10. mailto:lsagent125@xmpp.ikluck.com
>   11. http://xmpp.ikluck.com:5280/http-bind/
>   12. http://jabber.org/protocol/httpbind
>   13. https://conversejs.org/docs/html/index.html#keepalive
>   14. http://imgur.com/xuIxVXd
>   15. mailto:lists@opkode.com
>   16. http://jabber.org/protocol/httpbind
>   17. http://jabber.org/protocol/httpbind
>   18. http://nick@xmpp.ikluck.com/converse.js
>   19. mailto:lsagent121@xmpp.ikluck.com
>   20. mailto:lsagent125@xmpp.ikluck.com
>   21. http://xmpp.ikluck.com:5280/http-bind/
>   22. http://jabber.org/protocol/httpbind
>   23. https://conversejs.org/docs/html/index.html#keepalive

Re: [conversejs] Presence offline after pre-bind and Roaster not poopulating

From:
Guillaume Deberdt
Date:
2014-10-16 @ 13:26
About your problems :
Indeed there is some comptability issues with some jQuery versions (for 
example 1.8.2), I've noticed that the $.event.trigger function has been 
modify at some point. I had a similar traceback so there is my patch for 
jQuery can't told you exaclty what I have done (don't remember exaclty, 
but I think I just copy paste the event.trigger function of a more recent 
version of jQuery).

Concerning development tools, from my experience :
First of all, don't try to use development tools on Windows. Not working.
Then, if you are behind a proxy, you need to configure git proxy AND node 
proxy AND bower proxy.


----- Mail original -----
De: "Nayana Hettiarachchi" <nayana@corp-gems.com>
À: conversejs@librelist.com
Envoyé: Jeudi 16 Octobre 2014 12:48:36
Objet: Re: [conversejs] Presence offline after pre-bind and Roaster not 
poopulating

make dev or the other method both failing at bower.

shall i try the latest from repo instead?

On Thu, Oct 16, 2014 at 11:02 AM, Nayana Hettiarachchi <nayana@corp-gems.com
> wrote:

> OK let me do that and find more info and let you know.
> On 16 Oct, 2014 5:00 pm, "JC Brand" <lists@opkode.com> wrote:
>
>> On Thu, Oct 16, 2014 at 10:49:58AM +0100, Nayana Hettiarachchi wrote:
>> >    i am using  version 0.8.3 (2014-09-22)
>> >    if i am pre-binding and and page reloads. what should i do? set
>> prebind to
>> >    false on the consecutive runs? so it will use the previous values?
>> >    i manage to get more details about the crash after enabling debug. it
>> >    seems the code is crashing along side with jquery. I am unable to
>> select
>> >    the error text so i had to create a
>> >    screenshot. [1]http://imgur.com/xuIxVXd
>> >    is this a compatibility issue with jquery version we are using?
>>
>> Unfortunately that traceback doesn't help much because the JS files are
>> minified.
>>
>> You'll have to set up a development environment and use the unminified
>> files to
>> really see what's going on:
>> https://conversejs.org/docs/html/index.html#development
>>
>> In the relatively near future I'll create unminified builds but we don't
>> have
>> those for now, so you'll have to follow the above steps.
>>
>>
>> >    On Thu, Oct 16, 2014 at 10:34 AM, JC Brand <[2]lists@opkode.com>
>> wrote:
>> >
>> >      On Thu, Oct 16, 2014 at 10:23:20AM +0100, Nayana Hettiarachchi
>> wrote:
>> >      >    i am prebinding on the first page load and saving jid,rid,sid
>> on a
>> >      server
>> >      >    side session. I am also handling the rid by using
>> window.unload.
>> >      >    everything appears normal after page reloads. however when i
>> look
>> >      at the
>> >      >    session tab in Openfire, after the page reload the session
>> presence
>> >      is
>> >      >    shown as "offline" by clicking the "i am online" on Converse
>> and
>> >      clicking
>> >      >    "Online" again shows presence "online" on openfire session
>> tab.
>> >      >
>> >      >    I also noticed that sometimes after the initial pre-bind and
>> first
>> >      page
>> >      >    load the presence als o shows as offline.
>> >      >
>> >      >    Is there a way to set the presence to online on every page
>> load? or
>> >      >    maintain the last known presence? I am using punjab to manage
>> >      HTTP-BIND
>> >      >    connection to prevent other timeout issues faced with
>> HTTP-BIND in
>> >      >    openfire.
>> >      >
>> >      >    Second problem is the roaster is not showing the online
>> contacts.
>> >      >
>> >      >    i see this request being sent
>> >      >
>> >      >     1.
>> >      >
>> >      >     2. <body rid='[3][1]8056717221'
>> >      >        xmlns='[2][4]http://jabber.org/protocol/httpbind'
>> >      >        sid='9effc5fbf07bf0eb1e1ff3e6e7fed085d310bc4d'><iq
>> type='get'
>> >      >        id='1:roster' xmlns='jabber:client'><query
>> >      >        xmlns='jabber:iq:roster'/></iq></body>
>> >      >
>> >      >    And the following response is recei ved
>> >      >    <body xmlns='[3][5]http://jabber.org/protocol/httpbind'><iq
>> >      >    xmlns='jabber:client' to='[4][6]
>> nick@xmpp.ikluck.com/converse.js'
>> >      >    type='result' id='1:roster'><query
>> xmlns='jabber:iq:roster'><item
>> >      >    jid='[5][7]lsagent121@xmpp.ikluck.com' name='lsagent121'
>> >      >    subscription='both'><group>Agents</group></item><item
>> >      >    jid='[6][8]lsagent125@xmpp.ikluck.com' name='lsagent125'
>> >      >
>> >
>> subscription='both'><group>Agents</group></item></query></iq></body>
>> >      >    however converse does not show any of the users online who are
>> >      actually
>> >      >    online.
>> >      >    below is how i am initizling converse
>> >      >    converse.initialize({
>> >      >            auto_list_rooms: true,
>> >      >            allow_contact_requests: false,
>> >      >            forward_messages: true,
>> >      >            auto_subscribe: true,
>> >      >            bosh_service_url:
>> >      '[7][9]http://xmpp.ikluck.com:5280/http-bind/',
>> >      >            hide_muc_server: false,
>> >      >            i18n: locales.en,
>> >      >            prebind: true,
>> >      >            allow_muc: false,
>> >      >            show_controlbox_by_default: false,
>> >      >            show_only_online_users: true,
>> >      >            roster_groups: true,
>> >      >            keepalive: true,
>> >      >            play_sounds: true,
>> >      >            jid: data.jid,
>> >      >            rid: data.rid,
>> >      >            sid: data.sid
>> >      >        }, function(){
>> >      >                    window.sitechat = this;
>> >      >        });
>> >      >                jQuery(window).unload(function(){
>> >      >                    jQuery.get("xmpp/rid.php?rid=" +
>> >      sitechat.connection.rid);
>> >      >                });
>> >      >            });
>> >      >    After contact list failed to appear then every subsequent
>> page load
>> >      i get
>> >      >    a 404 error from BOSH for the roaster request.
>> >      >
>> >      >     1. <body rid='1413448747'
>> >      xmlns='[8][10]http://jabber.org/protocol/httpbind'
>> >      >        sid='9effc5fbf07bf0eb1e1ff3e6e7fed085d310bc4d'><iq
>> type='get'
>> >      >        id='1:roster' xmlns='jabber:client'><query
>> >      >        xmlns='jabber:iq:roster'/></iq></body>
>> >      >     2.
>> >      >
>> >      >    i am guessing maybe incorrect rid or session? but session
>> still
>> >      shows on
>> >      >    Openfire Session tab and i have removed the timeout for idle
>> >      connections
>> >      >    from openfire it self.
>> >      >    Also after the roaster failing to load the rid and sid values
>> from
>> >      >    converse are undefined.
>> >      >    console.log('unload sid '+sitechat.connection.sid);
>> >      >    console.log('unload rid '+sitechat.connection.rid);
>> >      >    unload sid undefined
>> >      >    unload rid undefined
>> >
>> >      What version of converse.js are you using?
>> >
>> >      It's difficult to know what exactly the problem is here. The fact
>> that
>> >      your sid
>> >      and rid values are undefined means you don't have a proper
>> connection.
>> >
>> >      So yes, it's likely your rid value is incorrect.
>> >
>> >      Add "debug: true" to the converse.initialize call and carefully
>> check
>> >      all the
>> >      XML stanzas sent between converse.js and your XMPP server.
>> >
>> >      If you have the wrong rid value, then you should have received a
>> stanza
>> >      from the server
>> >      which terminates the session.
>> >
>> >      Are you aware of the "keepalive" option? It will cache the rid and
>> sid
>> >      values
>> >      for you, so you don't have to do it yourself.
>> >
>> >      [11]https://conversejs.org/docs/html/index.html#keepalive
>> >
>> > References
>> >
>> >    Visible links
>> >    1. http://imgur.com/xuIxVXd
>> >    2. mailto:lists@opkode.com
>> >    3. file:///tmp/tel:%5B1%5D8056717221
>> >    4. http://jabber.org/protocol/httpbind
>> >    5. http://jabber.org/protocol/httpbind
>> >    6. http://nick@xmpp.ikluck.com/converse.js
>> >    7. mailto:lsagent121@xmpp.ikluck.com
>> >    8. mailto:lsagent125@xmpp.ikluck.com
>> >    9. http://xmpp.ikluck.com:5280/http-bind/
>> >   10. http://jabber.org/protocol/httpbind
>> >   11. https://conversejs.org/docs/html/index.html#keepalive
>>
>

Re: [conversejs] Presence offline after pre-bind and Roaster not poopulating

From:
Nayana Hettiarachchi
Date:
2014-10-16 @ 13:42
Thanks Guillaume, my workstation is ubuntu. But based on the error first it
seems there was an issue installing phanton-js (or similar package that was
listed in package.json) because it was trying to use node command instead
of nodejs and i kept getting an error   so i remove that dependency from
package.json and then i was faced with an error that bower update didn't
produce any output.
So i thought maybe it's just best i try with the latest version from the
repo. Because all these dev tool errors seems to be out of bound to waste
people's time about.

I will try your suggestion.

Thanks.

On Thu, Oct 16, 2014 at 8:26 PM, Guillaume Deberdt <
guillaume.deberdt@telecom-paristech.fr> wrote:

> About your problems :
> Indeed there is some comptability issues with some jQuery versions (for
> example 1.8.2), I've noticed that the $.event.trigger function has been
> modify at some point. I had a similar traceback so there is my patch for
> jQuery can't told you exaclty what I have done (don't remember exaclty, but
> I think I just copy paste the event.trigger function of a more recent
> version of jQuery).
>
> Concerning development tools, from my experience :
> First of all, don't try to use development tools on Windows. Not working.
> Then, if you are behind a proxy, you need to configure git proxy AND node
> proxy AND bower proxy.
>
>
> ----- Mail original -----
> De: "Nayana Hettiarachchi" <nayana@corp-gems.com>
> À: conversejs@librelist.com
> Envoyé: Jeudi 16 Octobre 2014 12:48:36
> Objet: Re: [conversejs] Presence offline after pre-bind and Roaster not
> poopulating
>
> make dev or the other method both failing at bower.
>
> shall i try the latest from repo instead?
>
> On Thu, Oct 16, 2014 at 11:02 AM, Nayana Hettiarachchi <
> nayana@corp-gems.com
> > wrote:
>
> > OK let me do that and find more info and let you know.
> > On 16 Oct, 2014 5:00 pm, "JC Brand" <lists@opkode.com> wrote:
> >
> >> On Thu, Oct 16, 2014 at 10:49:58AM +0100, Nayana Hettiarachchi wrote:
> >> >    i am using  version 0.8.3 (2014-09-22)
> >> >    if i am pre-binding and and page reloads. what should i do? set
> >> prebind to
> >> >    false on the consecutive runs? so it will use the previous values?
> >> >    i manage to get more details about the crash after enabling debug.
> it
> >> >    seems the code is crashing along side with jquery. I am unable to
> >> select
> >> >    the error text so i had to create a
> >> >    screenshot. [1]http://imgur.com/xuIxVXd
> >> >    is this a compatibility issue with jquery version we are using?
> >>
> >> Unfortunately that traceback doesn't help much because the JS files are
> >> minified.
> >>
> >> You'll have to set up a development environment and use the unminified
> >> files to
> >> really see what's going on:
> >> https://conversejs.org/docs/html/index.html#development
> >>
> >> In the relatively near future I'll create unminified builds but we don't
> >> have
> >> those for now, so you'll have to follow the above steps.
> >>
> >>
> >> >    On Thu, Oct 16, 2014 at 10:34 AM, JC Brand <[2]lists@opkode.com>
> >> wrote:
> >> >
> >> >      On Thu, Oct 16, 2014 at 10:23:20AM +0100, Nayana Hettiarachchi
> >> wrote:
> >> >      >    i am prebinding on the first page load and saving
> jid,rid,sid
> >> on a
> >> >      server
> >> >      >    side session. I am also handling the rid by using
> >> window.unload.
> >> >      >    everything appears normal after page reloads. however when i
> >> look
> >> >      at the
> >> >      >    session tab in Openfire, after the page reload the session
> >> presence
> >> >      is
> >> >      >    shown as "offline" by clicking the "i am online" on Converse
> >> and
> >> >      clicking
> >> >      >    "Online" again shows presence "online" on openfire session
> >> tab.
> >> >      >
> >> >      >    I also noticed that sometimes after the initial pre-bind and
> >> first
> >> >      page
> >> >      >    load the presence als o shows as offline.
> >> >      >
> >> >      >    Is there a way to set the presence to online on every page
> >> load? or
> >> >      >    maintain the last known presence? I am using punjab to
> manage
> >> >      HTTP-BIND
> >> >      >    connection to prevent other timeout issues faced with
> >> HTTP-BIND in
> >> >      >    openfire.
> >> >      >
> >> >      >    Second problem is the roaster is not showing the online
> >> contacts.
> >> >      >
> >> >      >    i see this request being sent
> >> >      >
> >> >      >     1.
> >> >      >
> >> >      >     2. <body rid='[3][1]8056717221'
> >> >      >        xmlns='[2][4]http://jabber.org/protocol/httpbind'
> >> >      >        sid='9effc5fbf07bf0eb1e1ff3e6e7fed085d310bc4d'><iq
> >> type='get'
> >> >      >        id='1:roster' xmlns='jabber:client'><query
> >> >      >        xmlns='jabber:iq:roster'/></iq></body>
> >> >      >
> >> >      >    And the following response is recei ved
> >> >      >    <body xmlns='[3][5]http://jabber.org/protocol/httpbind'><iq
> >> >      >    xmlns='jabber:client' to='[4][6]
> >> nick@xmpp.ikluck.com/converse.js'
> >> >      >    type='result' id='1:roster'><query
> >> xmlns='jabber:iq:roster'><item
> >> >      >    jid='[5][7]lsagent121@xmpp.ikluck.com' name='lsagent121'
> >> >      >    subscription='both'><group>Agents</group></item><item
> >> >      >    jid='[6][8]lsagent125@xmpp.ikluck.com' name='lsagent125'
> >> >      >
> >> >
> >> subscription='both'><group>Agents</group></item></query></iq></body>
> >> >      >    however converse does not show any of the users online who
> are
> >> >      actually
> >> >      >    online.
> >> >      >    below is how i am initizling converse
> >> >      >    converse.initialize({
> >> >      >            auto_list_rooms: true,
> >> >      >            allow_contact_requests: false,
> >> >      >            forward_messages: true,
> >> >      >            auto_subscribe: true,
> >> >      >            bosh_service_url:
> >> >      '[7][9]http://xmpp.ikluck.com:5280/http-bind/',
> >> >      >            hide_muc_server: false,
> >> >      >            i18n: locales.en,
> >> >      >            prebind: true,
> >> >      >            allow_muc: false,
> >> >      >            show_controlbox_by_default: false,
> >> >      >            show_only_online_users: true,
> >> >      >            roster_groups: true,
> >> >      >            keepalive: true,
> >> >      >            play_sounds: true,
> >> >      >            jid: data.jid,
> >> >      >            rid: data.rid,
> >> >      >            sid: data.sid
> >> >      >        }, function(){
> >> >      >                    window.sitechat = this;
> >> >      >        });
> >> >      >                jQuery(window).unload(function(){
> >> >      >                    jQuery.get("xmpp/rid.php?rid=" +
> >> >      sitechat.connection.rid);
> >> >      >                });
> >> >      >            });
> >> >      >    After contact list failed to appear then every subsequent
> >> page load
> >> >      i get
> >> >      >    a 404 error from BOSH for the roaster request.
> >> >      >
> >> >      >     1. <body rid='1413448747'
> >> >      xmlns='[8][10]http://jabber.org/protocol/httpbind'
> >> >      >        sid='9effc5fbf07bf0eb1e1ff3e6e7fed085d310bc4d'><iq
> >> type='get'
> >> >      >        id='1:roster' xmlns='jabber:client'><query
> >> >      >        xmlns='jabber:iq:roster'/></iq></body>
> >> >      >     2.
> >> >      >
> >> >      >    i am guessing maybe incorrect rid or session? but session
> >> still
> >> >      shows on
> >> >      >    Openfire Session tab and i have removed the timeout for idle
> >> >      connections
> >> >      >    from openfire it self.
> >> >      >    Also after the roaster failing to load the rid and sid
> values
> >> from
> >> >      >    converse are undefined.
> >> >      >    console.log('unload sid '+sitechat.connection.sid);
> >> >      >    console.log('unload rid '+sitechat.connection.rid);
> >> >      >    unload sid undefined
> >> >      >    unload rid undefined
> >> >
> >> >      What version of converse.js are you using?
> >> >
> >> >      It's difficult to know what exactly the problem is here. The fact
> >> that
> >> >      your sid
> >> >      and rid values are undefined means you don't have a proper
> >> connection.
> >> >
> >> >      So yes, it's likely your rid value is incorrect.
> >> >
> >> >      Add "debug: true" to the converse.initialize call and carefully
> >> check
> >> >      all the
> >> >      XML stanzas sent between converse.js and your XMPP server.
> >> >
> >> >      If you have the wrong rid value, then you should have received a
> >> stanza
> >> >      from the server
> >> >      which terminates the session.
> >> >
> >> >      Are you aware of the "keepalive" option? It will cache the rid
> and
> >> sid
> >> >      values
> >> >      for you, so you don't have to do it yourself.
> >> >
> >> >      [11]https://conversejs.org/docs/html/index.html#keepalive
> >> >
> >> > References
> >> >
> >> >    Visible links
> >> >    1. http://imgur.com/xuIxVXd
> >> >    2. mailto:lists@opkode.com
> >> >    3. file:///tmp/tel:%5B1%5D8056717221
> >> >    4. http://jabber.org/protocol/httpbind
> >> >    5. http://jabber.org/protocol/httpbind
> >> >    6. http://nick@xmpp.ikluck.com/converse.js
> >> >    7. mailto:lsagent121@xmpp.ikluck.com
> >> >    8. mailto:lsagent125@xmpp.ikluck.com
> >> >    9. http://xmpp.ikluck.com:5280/http-bind/
> >> >   10. http://jabber.org/protocol/httpbind
> >> >   11. https://conversejs.org/docs/html/index.html#keepalive
> >>
> >
>