librelist archives

« back to archive

TypeError: converse.rosterview is undefined, and not getting JID, RID and SID.

TypeError: converse.rosterview is undefined, and not getting JID, RID and SID.

From:
Rodolfo Gonzalez
Date:
2014-03-13 @ 10:43
Ok, after several nights fighting with these pieces of code:

converse (0.7.3) + XmppPrebind -> lighttpd proxy -> punjab -> jabberd2

I'm finally prebinding my users. Then, I use this code at the top of every
page:

jQuery.getJSON('{$urlBosh}', function(data) {
   converse.initialize({
      allow_otr: false,
      auto_list_rooms: false,
      auto_subscribe: false,
      show_controlbox_by_default: false,
      hide_muc_server: true,
      xhr_user_search: false,
      debug: true,
      i18n: locales['{$lang}'],
      prebind: true,
      bosh_service_url: data.bosh_service_url,
      jid: data.jid,
      sid: data.sid,
      rid: data.rid
   });
});

where $urlBosh has the URL which calls the script which pre-binds the
session, using XmppPhp.

But now I have 2 problems with converse.js:

Problem 1: whenever I click the "toggle chat" button I get:

TypeError: converse.rosterview is undefined

this.$el.append(converse.rosterview.$el);


Problem 2: whenever I load a page, I get this debug message in firebug:

If you set prebind=true, you MUST supply JID, RID and SID values

which is absurd, since the script at urlBosh returns the right JSON, for
instance, which is supposed to pass in data:

{"bosh_service_url":"http:\/\/example.com:80
\/http-bind","sid":"","jid":"jsmith@example.com\/DEMO","rid":4834208330}


Any hint or help is appreciated. Thanks.


Regards,

Rodolfo.

TypeError: converse.rosterview is undefined, and not getting JID, RID and SID.

From:
Rodolfo Gonzalez
Date:
2014-03-13 @ 18:37
Hi there, I'm sending this again. I don't remember if this is a moderated
list, if it is, please forgive the duplicated message.

Ok, after several nights fighting with these pieces of code:

converse (0.7.3) + XmppPrebind -> lighttpd proxy -> punjab -> jabberd2

I'm finally prebinding my users. Then, I use this code at the top of every
page:

jQuery.getJSON('{$urlBosh}', function(data) {
   converse.initialize({
      allow_otr: false,
      auto_list_rooms: false,
      auto_subscribe: false,
      show_controlbox_by_default: false,
      hide_muc_server: true,
      xhr_user_search: false,
      debug: true,
      i18n: locales['{$lang}'],
      prebind: true,
      bosh_service_url: data.bosh_service_url,
      jid: data.jid,
      sid: data.sid,
      rid: data.rid
   });
});

where $urlBosh has the URL which calls the script which pre-binds the
session, using XmppPhp.

But now I have 2 problems with converse.js:

Problem 1: whenever I click the "toggle chat" button I get:

TypeError: converse.rosterview is undefined

this.$el.append(converse.rosterview.$el);


Problem 2: whenever I load a page, I get this debug message in firebug:

If you set prebind=true, you MUST supply JID, RID and SID values

which is absurd, since the script at urlBosh returns the right JSON, for
instance, which is supposed to pass in data:

{"bosh_service_url":"http:\/\/example.com:80
\/http-bind","sid":"","jid":"jsmith@example.com\/DEMO","rid":4834208330}


Any hint or help is appreciated. Thanks.


Regards,

Rodolfo.

Re: [conversejs] TypeError: converse.rosterview is undefined, and not getting JID, RID and SID.

From:
Jc Brand
Date:
2014-03-14 @ 19:04
On Thu, Mar 13, 2014 at 12:37:29PM -0600, Rodolfo Gonzalez wrote:

<snip>

>    where $urlBosh has the URL which calls the script which pre-binds the
>    session, using XmppPhp. 
>    But now I have 2 problems with converse.js:
>    Problem 1: whenever I click the "toggle chat" button I get:
>    TypeError: converse.rosterview is undefined
> 
>     this.$el.append(converse.rosterview.$el);
>

This happens due to your problem below.
> 
>    Problem 2: whenever I load a page, I get this debug message in firebug:
>    If you set prebind=true, you MUST supply JID, RID and SID values
>    which is absurd, since the script at urlBosh returns the right JSON, for
>    instance, which is supposed to pass in data:
>    
{"bosh_service_url":"http:\/\/[1]example.com:80\/http-bind","sid":"","jid":"jsmith@example.com\/DEMO","rid":4834208330}

It's not absurd. You don't provide a SID value. which is why it fails.