librelist archives

« back to archive

Null Resource in XMPP Server using converse.js 0.9.4 without prebind

Null Resource in XMPP Server using converse.js 0.9.4 without prebind

From:
Lamtei W
Date:
2015-07-31 @ 12:13
Hi,
    I've been using converse js 0.9.3 previously and switched to the new
version 0.9.4.
I'm using openfire server without prebind. Using the previous version, it
works fine except for the bugs, but im getting some problem when I switched
to the new version.

I've set auto login to true since I have the jid + password available so I
can pass these parameters directly during initialization. This way I can
have multiple tabs with a resource id for each tab/window in the browser.
But when I switched to 0.9.4, I'm getting null resource in the server for
each instance and cannot have multiple tabs using the same jid. Can you
help me figure this out. Below is my configuration:

       converse.initialize({
            bosh_service_url: 'http://192.168.6.23:7070/http-bind/',
            keepalive: true,
            message_carbons: true,
            play_sounds: true,
            roster_groups: true,
            show_controlbox_by_default: true,
            xhr_user_search: false,
authentication: 'login',
auto_login:true,
jid:'test@themaverick',
password:'demo',
auto_reconnect: true,
allow_registration: false,
auto_list_rooms:false,
allow_logout:true,
allow_muc:false,
debug: true
        });

Thanks,
Lamtei W

Re: [conversejs] Null Resource in XMPP Server using converse.js 0.9.4 without prebind

From:
Jc Brand
Date:
2015-07-31 @ 14:46
Maybe someone else on the mailing list can help you. I'm going on holiday
tomorrow and won't be available for about a week and a half.

In any case, your report is quite vague. Try to find error output in
your browser console or in the XMPP server's logs and provide that.

On Fri, Jul 31, 2015 at 05:43:16PM +0530, Lamtei W wrote:
>    Hi,
>        I've been using converse js 0.9.3 previously and switched to the new
>    version 0.9.4.
>    I'm using openfire server without prebind. Using the previous version, it
>    works fine except for the bugs, but im getting some problem when I
>    switched to the new version.
>    I've set auto login to true since I have the jid + password available so I
>    can pass these parameters directly during initialization. This way I can
>    have multiple tabs with a resource id for each tab/window in the browser.
>    But when I switched to 0.9.4, I'm getting null resource in the server for
>    each instance and cannot have multiple tabs using the same jid. Can you
>    help me figure this out. Below is my configuration:
>           converse.initialize({
>                bosh_service_url: '[1]http://192.168.6.23:7070/http-bind/',
>                keepalive: true,
>                message_carbons: true,
>                play_sounds: true,
>                roster_groups: true,
>                show_controlbox_by_default: true,
>                xhr_user_search: false,
>                                                    authentication: 'login',
>                                                    auto_login:true,
>                                                    jid:'test@themaverick',
>                                                    password:'demo',
>                                                    auto_reconnect: true,
>                                                    allow_registration: false,
>                                                    auto_list_rooms:false,
>                                                    allow_logout:true,
>                                                    allow_muc:false,
>                                                    debug: true
>            });
>    Thanks,
>    Lamtei W
> 
> References
> 
>    Visible links
>    1. http://192.168.6.23:7070/http-bind/

Re: [conversejs] Null Resource in XMPP Server using converse.js 0.9.4 without prebind

From:
Lamtei W
Date:
2015-08-04 @ 09:30
Hi JC,

    Here I have the screenshots to make it clear. There are two scenarios,
first using converse 0.9.3, second using converse 0.9.4

When I try to load two tabs simultaneously in the first case, the resource
id gets generated automatically and i can see them in the openfire server
console as below:

Scenario 1- screenshot 1 :
http://ibin.co/2AxUCqy75W7W

Scenario 1- screenshot 2 :
http://ibin.co/2AxoXHGvEfAK

Scenario 1- screenshot 3 :
http://ibin.co/2Axp4NAXH2CD


I tried the same in the second scenario but i get a null resource value and
I'm unable to load multiple tabs,

Scenario 2- screenshot 1 :
http://ibin.co/2Axpq8rxVz8B

Scenario 2- screenshot 2 :
http://ibin.co/2AxqCJFkyTmJ

Scenario 2- screenshot 3 :
http://ibin.co/2AxqUjLYo6yr

Is there a solution to this without having to use prebind single session,
using converse 0.9.4?

On Fri, Jul 31, 2015 at 8:16 PM, JC Brand <lists@opkode.com> wrote:

> Maybe someone else on the mailing list can help you. I'm going on holiday
> tomorrow and won't be available for about a week and a half.
>
> In any case, your report is quite vague. Try to find error output in
> your browser console or in the XMPP server's logs and provide that.
>
> On Fri, Jul 31, 2015 at 05:43:16PM +0530, Lamtei W wrote:
> >    Hi,
> >        I've been using converse js 0.9.3 previously and switched to the
> new
> >    version 0.9.4.
> >    I'm using openfire server without prebind. Using the previous
> version, it
> >    works fine except for the bugs, but im getting some problem when I
> >    switched to the new version.
> >    I've set auto login to true since I have the jid + password available
> so I
> >    can pass these parameters directly during initialization. This way I
> can
> >    have multiple tabs with a resource id for each tab/window in the
> browser.
> >    But when I switched to 0.9.4, I'm getting null resource in the server
> for
> >    each instance and cannot have multiple tabs using the same jid. Can
> you
> >    help me figure this out. Below is my configuration:
> >           converse.initialize({
> >                bosh_service_url: '[1]http://192.168.6.23:7070/http-bind/
> ',
> >                keepalive: true,
> >                message_carbons: true,
> >                play_sounds: true,
> >                roster_groups: true,
> >                show_controlbox_by_default: true,
> >                xhr_user_search: false,
> >                                                    authentication:
> 'login',
> >                                                    auto_login:true,
> >                                                    jid:'test@themaverick
> ',
> >                                                    password:'demo',
> >                                                    auto_reconnect: true,
> >                                                    allow_registration:
> false,
> >                                                    auto_list_rooms:false,
> >                                                    allow_logout:true,
> >                                                    allow_muc:false,
> >                                                    debug: true
> >            });
> >    Thanks,
> >    Lamtei W
> >
> > References
> >
> >    Visible links
> >    1. http://192.168.6.23:7070/http-bind/
>

Re: [conversejs] Null Resource in XMPP Server using converse.js 0.9.4 without prebind

From:
Jc Brand
Date:
2015-08-10 @ 16:37
On Tue, Aug 04, 2015 at 03:00:45PM +0530, Lamtei W wrote:
>    Hi JC,
>        
>        Here I have the screenshots to make it clear. There are two scenarios,
>    first using converse 0.9.3, second using converse 0.9.4
>    When I try to load two tabs simultaneously in the first case, the resource
>    id gets generated automatically and i can see them in the openfire server
>    console as below:
>    Scenario 1- screenshot 1 : 
>    [1]http://ibin.co/2AxUCqy75W7W
>    Scenario 1- screenshot 2 : 
>    [2]http://ibin.co/2AxoXHGvEfAK
>    Scenario 1- screenshot 3 : 
>    [3]http://ibin.co/2Axp4NAXH2CD
>    I tried the same in the second scenario but i get a null resource value
>    and I'm unable to load multiple tabs,
>    Scenario 2- screenshot 1 : 
>    http://ibin.co/2Axpq8rxVz8B
>    Scenario 2- screenshot 2 : 
>    [4]http://ibin.co/2AxqCJFkyTmJ
>    Scenario 2- screenshot 3 : 
>    [5]http://ibin.co/2AxqUjLYo6yr
>    Is there a solution to this without having to use prebind single session,
>    using converse 0.9.4?

I asked you to provide debug logs. Screenshots of the chat client itself are
useless because they don't provide any context or information on where the
problem might be.

Set debug=true when calling converse.initialize and then check the output in
your browser's developer console. Those are the debug logs I'm talking about.

Check if you see any errors or anything interesting at all and then paste it
here.

If you don't do that, then I can't help you.

Re: [conversejs] Null Resource in XMPP Server using converse.js 0.9.4 without prebind

From:
Lamtei W
Date:
2015-08-25 @ 15:39
Hi JC,

    Thanks for your response and sorry for the late reply. I took the
latest update today (0.9.5) and here's what I figured out.
When using *authentication* with *login* and *auto_login* set to *true*
with valid jid and password, it gets authenticated but generates a null
resource.
    When debugging, I found at line 6034,
this.jid =

Strophe.getBareJidFromJid(this.jid).toLowerCase()+'/'+Strophe.getResourceFromJid(this.jid),

the code Strophe.getResourceFromJid(this.jid) gives a null value, So I
replaced with the following, which did the work for me,
if(Strophe.getResourceFromJid(this.jid) === null){
  this.jid =
Strophe.getBareJidFromJid(this.jid).toLowerCase()+'/converse.js-' +
Math.floor(Math.random()*139749825).toString();;
}else{
  this.jid =

Strophe.getBareJidFromJid(this.jid).toLowerCase()+'/'+Strophe.getResourceFromJid(this.jid);
}

I'm not sure whether its a bug but I thought I'll let you know.

Thanks






On Mon, Aug 10, 2015 at 10:07 PM, JC Brand <lists@opkode.com> wrote:

> On Tue, Aug 04, 2015 at 03:00:45PM +0530, Lamtei W wrote:
> >    Hi JC,
> >
> >        Here I have the screenshots to make it clear. There are two
> scenarios,
> >    first using converse 0.9.3, second using converse 0.9.4
> >    When I try to load two tabs simultaneously in the first case, the
> resource
> >    id gets generated automatically and i can see them in the openfire
> server
> >    console as below:
> >    Scenario 1- screenshot 1 :
> >    [1]http://ibin.co/2AxUCqy75W7W
> >    Scenario 1- screenshot 2 :
> >    [2]http://ibin.co/2AxoXHGvEfAK
> >    Scenario 1- screenshot 3 :
> >    [3]http://ibin.co/2Axp4NAXH2CD
> >    I tried the same in the second scenario but i get a null resource
> value
> >    and I'm unable to load multiple tabs,
> >    Scenario 2- screenshot 1 :
> >    http://ibin.co/2Axpq8rxVz8B
> >    Scenario 2- screenshot 2 :
> >    [4]http://ibin.co/2AxqCJFkyTmJ
> >    Scenario 2- screenshot 3 :
> >    [5]http://ibin.co/2AxqUjLYo6yr
> >    Is there a solution to this without having to use prebind single
> session,
> >    using converse 0.9.4?
>
> I asked you to provide debug logs. Screenshots of the chat client itself
> are
> useless because they don't provide any context or information on where the
> problem might be.
>
> Set debug=true when calling converse.initialize and then check the output
> in
> your browser's developer console. Those are the debug logs I'm talking
> about.
>
> Check if you see any errors or anything interesting at all and then paste
> it
> here.
>
> If you don't do that, then I can't help you.
>

Re: [conversejs] Null Resource in XMPP Server using converse.js 0.9.4 without prebind

From:
Jc Brand
Date:
2015-09-22 @ 08:46
Thanks Lamtei

I'll have to investigate this once I have some more time again.

JC

On Tue, Aug 25, 2015 at 09:09:39PM +0530, Lamtei W wrote:
>    Hi JC,
>        Thanks for your response and sorry for the late reply. I took the
>    latest update today (0.9.5) and here's what I figured out.
>    When using authentication with login and auto_login set to true with valid
>    jid and password, it gets authenticated but generates a null resource. 
>        When debugging, I found at line 6034,
>            this.jid =
>    
Strophe.getBareJidFromJid(this.jid).toLowerCase()+'/'+Strophe.getResourceFromJid(this.jid),
>    the code Strophe.getResourceFromJid(this.jid) gives a null value, So I
>    replaced with the following, which did the work for me,
>    if(Strophe.getResourceFromJid(this.jid) === null){
>        this.jid =
>    Strophe.getBareJidFromJid(this.jid).toLowerCase()+'/converse.js-' +
>    Math.floor(Math.random()*139749825).toString() ;;
>    }else{
>        this.jid =
>    
Strophe.getBareJidFromJid(this.jid).toLowerCase()+'/'+Strophe.getResourceFromJid(this.jid);
>    }
>    I'm not sure whether its a bug but I thought I'll let you know.
>    Thanks
>    On Mon, Aug 10, 2015 at 10:07 PM, JC Brand <[1]lists@opkode.com> wrote:
> 
>      On Tue, Aug 04, 2015 at 03:00:45PM +0530, Lamtei W wrote:
>      >    Hi JC,
>      >        
>      >        Here I have the screenshots to make it clear. There are two
>      scenarios,
>      >    first using converse 0.9.3, second using converse 0.9.4
>      >    When I try to load two tabs simultaneously in the first case, the
>      resource
>      >    id gets generated automatically and i can see them in the openfire
>      server
>      >    console as below:
>      >    Scenario 1- screenshot 1 : 
>      >    [1][2]http://ibin.co/2AxUCqy75W7W
>      >    Scenario 1- screenshot 2 : 
>      >    [2][3]http://ibin.co/2AxoXHGvEfAK
>      >    Scenario 1- screenshot 3 : 
>      >    [3][4]http://ibin.co/2Axp4NAXH2CD
>      >    I tried the same in the second scenario but i get a null resource
>      value
>      >    and I'm unable to load multiple tabs,
>      >    Scenario 2- screenshot 1 : 
>      >    [5]http://ibin.co/2Axpq8rxVz8B
>      >    Scenario 2- screenshot 2 : 
>      >    [4][6]http://ibin.co/2AxqCJFkyTmJ
>      >    Scenario 2- screenshot 3 : 
>      >    [5][7]http://ibin.co/2AxqUjLYo6yr
>      >    Is there a solution to this without having to use prebind single
>      session,
>      >    using converse 0.9.4?
> 
>      I asked you to provide debug logs. Screenshots of the chat client itself
>      are
>      useless because they don't provide any context or information on where
>      the
>      problem might be.
> 
>      Set debug=true when calling converse.initialize and then check the
>      output in
>      your browser's developer console. Those are the debug logs I'm talking
>      about.
> 
>      Check if you see any errors or anything interesting at all and then
>      paste it
>      here.
> 
>      If you don't do that, then I can't help you.
> 
> References
> 
>    Visible links
>    1. mailto:lists@opkode.com
>    2. http://ibin.co/2AxUCqy75W7W
>    3. http://ibin.co/2AxoXHGvEfAK
>    4. http://ibin.co/2Axp4NAXH2CD
>    5. http://ibin.co/2Axpq8rxVz8B
>    6. http://ibin.co/2AxqCJFkyTmJ
>    7. http://ibin.co/2AxqUjLYo6yr