librelist archives

« back to archive

Issue related with MUC and prebind

Issue related with MUC and prebind

From:
Rubem Silva
Date:
2015-05-04 @ 09:18
Hi JC

I am having an issue with MUC between converse and tigase with prebind.
Without prebind everyting goes fine, i can create rooms easily and invite
other users.
When i set prebind true, i can login and chat with other users, but when i
try to create a room, the room window shows up without any user in the room
and without the room configure button.

To figure out whats wrong, i saved 2 requests/responses, one without
prebind and the other with.

- Without prebind, creating room -
request:
<body xmlns="http://jabber.org/protocol/httpbind" rid="2732681976"
sid="ea3b0a0f-4246-47a8-ab1c-7e4f9927845d">
   <presence xmlns="jabber:client" from="
luser@chat.server.com/converse.js-136806228" to="
testroom@muc.chat.server.com/luser">
      <x xmlns="http://jabber.org/protocol/muc" />
   </presence>
</body>

response:
<body xmlns="http://jabber.org/protocol/httpbind" xmlns:stream="
http://etherx.jabber.org/streams" xmlns:xmpp="urn:xmpp:xbosh" secure="true"
ack="2732681976" host="b2bdv-node" from="chat.server.com"
xmpp:version="1.0">
   <presence xmlns="jabber:client" to="
luser@chat.server.com/converse.js-136806228" from="
testroom@muc.chat.server.com/luser">
      <x xmlns="http://jabber.org/protocol/muc#user">
         <item nick="luser" jid="luser@chat.server.com/converse.js-136806228"
role="moderator" affiliation="owner" />
         <status code="110" />
      </x>
   </presence>
</body>



- With prebind, creating room -
request:
<body xmlns="http://jabber.org/protocol/httpbind" rid="5457883766"
sid="0be8ed4b-61f5-41ee-861f-a5adbf2d05fe">
   <presence xmlns="jabber:client" from="luser@chat.server.com" to="
gfsd@muc.chat.server.com/luser">
      <x xmlns="http://jabber.org/protocol/muc" />
   </presence>
</body>


response:
<body xmlns="http://jabber.org/protocol/httpbind" xmlns:stream="
http://etherx.jabber.org/streams" xmlns:xmpp="urn:xmpp:xbosh"
ack="5457883766" secure="true" host="b2bdv-node" from="chat.server.com"
xmpp:version="1.0">
   <message xmlns="jabber:client" from="gfsd@muc.chat.server.com" to="
luser@chat.server.com" type="groupchat">
      <body>Room is locked. Please configure.</body>
   </message>
</body>


From the converse side, the requests are a bit different. If you look at
the attribute "from":
Without prebind: from="luser@chat.server.com/converse.js-136806228"
With prebind: from="luser@chat.server.com"

Why converse is behaving differently between the two?

For this test i used 2 separate files, one with prebind and the other
witout.

Configuration without prebind:
converse.initialize({
            auto_list_rooms: false,
            auto_subscribe: false,
            bosh_service_url: 'http://chat.server.com/http-bind', // Please
use this connection manager only for testing purposes
            hide_muc_server: false,
            i18n: locales.en, // Refer to ./locale/locales.js to see which
locales are supported
            prebind: false,
            show_controlbox_by_default: true,
            roster_groups: true
        });

Configuration with prebind:

converse.initialize({
            bosh_service_url: 'http://chat.server.com/http-bind', // Please
use this connection manager only for testing purposes
            prebind: true,
            debug: false,
            jid: jid,
            sid: sid,
            rid: rid,
            i18n: locales['en'], // Refer to ./locale/locales.js to see
which locales are supported
            keepalive: false,
            message_carbons: true,
            play_sounds: true,
            roster_groups: true,
            show_controlbox_by_default: true,
            xhr_user_search: false
        });


Thank you for helping me on this

LC

Re: [conversejs] Issue related with MUC and prebind

From:
Jc Brand
Date:
2015-05-05 @ 08:45
On Mon, May 04, 2015 at 10:18:57AM +0100, Rubem Silva wrote:
>    I am having an issue with MUC between converse and tigase with prebind.
>    Without prebind everyting goes fine, i can create rooms easily and invite
>    other users.
>    When i set prebind true, i can login and chat with other users, but when i
>    try to create a room, the room window shows up without any user in the
>    room and without the room configure button.

What version of converse.js are you using?

>    To figure out whats wrong, i saved 2 requests/responses, one without
>    prebind and the other with.
> 
>    - Without prebind, creating room -
>    request:
>    <body xmlns="[1]http://jabber.org/protocol/httpbind" rid="2732681976"
>    sid="ea3b0a0f-4246-47a8-ab1c-7e4f9927845d">
>       <presence xmlns="jabber:client"
>    from="[2]luser@chat.server.com/converse.js-136806228"
>    to="[3]testroom@muc.chat.server.com/luser">
>          <x xmlns="[4]http://jabber.org/protocol/muc" />
>       </presence>
>    </body>
> 
>    response:
>    <body xmlns="[5]http://jabber.org/protocol/httpbind"
>    xmlns:stream="[6]http://etherx.jabber.org/streams"
>    xmlns:xmpp="urn:xmpp:xbosh" secure="true" ack="2732681976"
>    host="b2bdv-node" from="[7]chat.server.com" xmpp:version="1.0">
>       <presence xmlns="jabber:client"
>    to="[8]luser@chat.server.com/converse.js-136806228"
>    from="[9]testroom@muc.chat.server.com/luser">
>          <x xmlns="http://jabber.org/protocol/muc#user">
>             <item nick="luser"
>    jid="[10]luser@chat.server.com/converse.js-136806228" role="moderator"
>    affiliation="owner" />
>             <status code="110" />
>          </x>
>       </presence>
>    </body>
> 
>    - With prebind, creating room -
>    request:
>    <body xmlns="http://jabber.org/protocol/httpbind" rid="5457883766"
>    sid="0be8ed4b-61f5-41ee-861f-a5adbf2d05fe">
>       <presence xmlns="jabber:client" from="luser@chat.server.com"
>    to="gfsd@muc.chat.server.com/luser">
>          <x xmlns="http://jabber.org/protocol/muc" />
>       </presence>
>    </body>
> 
>    response:
>    <body xmlns="http://jabber.org/protocol/httpbind"
>    xmlns:stream="http://etherx.jabber.org/streams"
>    xmlns:xmpp="urn:xmpp:xbosh" ack="5457883766" secure="true"
>    host="b2bdv-node" from="chat.server.com" xmpp:version="1.0">
>       <message xmlns="jabber:client" from="gfsd@muc.chat.server.com"
>    to="luser@chat.server.com" type="groupchat">
>          <body>Room is locked. Please configure.</body>
>       </message>
>    </body>

This room is locked. I'm not sure what that means. What happens when you try to
connect to testroom@muc.chat.server.com with prebind=true?

>    From the converse side, the reque sts are a bit different. If you look at
>    the attribute "from":
>    Without prebind: from="[20]luser@chat.server.com/converse.js-136806228"
>    With prebind: from="luser@chat.server.com"
> 
>    Why converse is behaving differently between the two?

I think because you're not including a resource in the JID that you pass in to
converse.initialize.

Ideally converse.js should then just generate a resource for you but looks like
this is not happening currently.

JC

Re: [conversejs] Issue related with MUC and prebind

From:
Rubem Silva
Date:
2015-05-07 @ 10:34
Well i'm using xmpp prebind [[
https://github.com/candy-chat/xmpp-prebind-php/blob/master/lib/XmppPrebind.php]],
and there seems to be a problem with resource bind.

In fact that php script is sending resource bind request, however isnt
concatenating the resource ID generated from tigase server to the JID. So
when i gives JID to converse in order to attach to session, it not contains
the resource id, so when trying to use muc, tigase seems to not handle it
right.
Also, that script tries to authenticate with complete JID, including the
resource identifier. Im not xmpp expert but i think that its wrong.

Thanks for your help

On 5 May 2015 at 09:45, JC Brand <lists@opkode.com> wrote:

> On Mon, May 04, 2015 at 10:18:57AM +0100, Rubem Silva wrote:
> >    I am having an issue with MUC between converse and tigase with
> prebind.
> >    Without prebind everyting goes fine, i can create rooms easily and
> invite
> >    other users.
> >    When i set prebind true, i can login and chat with other users, but
> when i
> >    try to create a room, the room window shows up without any user in the
> >    room and without the room configure button.
>
> What version of converse.js are you using?
>
> >    To figure out whats wrong, i saved 2 requests/responses, one without
> >    prebind and the other with.
> >
> >    - Without prebind, creating room -
> >    request:
> >    <body xmlns="[1]http://jabber.org/protocol/httpbind" rid="2732681976"
> >    sid="ea3b0a0f-4246-47a8-ab1c-7e4f9927845d">
> >       <presence xmlns="jabber:client"
> >    from="[2]luser@chat.server.com/converse.js-136806228"
> >    to="[3]testroom@muc.chat.server.com/luser">
> >          <x xmlns="[4]http://jabber.org/protocol/muc" />
> >       </presence>
> >    </body>
> >
> >    response:
> >    <body xmlns="[5]http://jabber.org/protocol/httpbind"
> >    xmlns:stream="[6]http://etherx.jabber.org/streams"
> >    xmlns:xmpp="urn:xmpp:xbosh" secure="true" ack="2732681976"
> >    host="b2bdv-node" from="[7]chat.server.com" xmpp:version="1.0">
> >       <presence xmlns="jabber:client"
> >    to="[8]luser@chat.server.com/converse.js-136806228"
> >    from="[9]testroom@muc.chat.server.com/luser">
> >          <x xmlns="http://jabber.org/protocol/muc#user">
> >             <item nick="luser"
> >    jid="[10]luser@chat.server.com/converse.js-136806228"
> role="moderator"
> >    affiliation="owner" />
> >             <status code="110" />
> >          </x>
> >       </presence>
> >    </body>
> >
> >    - With prebind, creating room -
> >    request:
> >    <body xmlns="http://jabber.org/protocol/httpbind" rid="5457883766"
> >    sid="0be8ed4b-61f5-41ee-861f-a5adbf2d05fe">
> >       <presence xmlns="jabber:client" from="luser@chat.server.com"
> >    to="gfsd@muc.chat.server.com/luser">
> >          <x xmlns="http://jabber.org/protocol/muc" />
> >       </presence>
> >    </body>
> >
> >    response:
> >    <body xmlns="http://jabber.org/protocol/httpbind"
> >    xmlns:stream="http://etherx.jabber.org/streams"
> >    xmlns:xmpp="urn:xmpp:xbosh" ack="5457883766" secure="true"
> >    host="b2bdv-node" from="chat.server.com" xmpp:version="1.0">
> >       <message xmlns="jabber:client" from="gfsd@muc.chat.server.com"
> >    to="luser@chat.server.com" type="groupchat">
> >          <body>Room is locked. Please configure.</body>
> >       </message>
> >    </body>
>
> This room is locked. I'm not sure what that means. What happens when you
> try to
> connect to testroom@muc.chat.server.com with prebind=true?
>
> >    From the converse side, the reque sts are a bit different. If you
> look at
> >    the attribute "from":
> >    Without prebind: from="[20]
> luser@chat.server.com/converse.js-136806228"
> >    With prebind: from="luser@chat.server.com"
> >
> >    Why converse is behaving differently between the two?
>
> I think because you're not including a resource in the JID that you pass
> in to
> converse.initialize.
>
> Ideally converse.js should then just generate a resource for you but looks
> like
> this is not happening currently.
>
> JC
>

Re: [conversejs] Issue related with MUC and prebind

From:
Rubem Silva
Date:
2015-05-06 @ 08:10
On 5 May 2015 at 09:45, JC Brand <lists@opkode.com> wrote:

> On Mon, May 04, 2015 at 10:18:57AM +0100, Rubem Silva wrote:
> >    I am having an issue with MUC between converse and tigase with
> prebind.
> >    Without prebind everyting goes fine, i can create rooms easily and
> invite
> >    other users.
> >    When i set prebind true, i can login and chat with other users, but
> when i
> >    try to create a room, the room window shows up without any user in the
> >    room and without the room configure button.
>
> What version of converse.js are you using?


I was using version 0.9.0, but i can see now that there is version 0.9.3
available


>
> >    To figure out whats wrong, i saved 2 requests/responses, one without
> >    prebind and the other with.
> >
> >    - Without prebind, creating room -
> >    request:
> >    <body xmlns="[1]http://jabber.org/protocol/httpbind" rid="2732681976"
> >    sid="ea3b0a0f-4246-47a8-ab1c-7e4f9927845d">
> >       <presence xmlns="jabber:client"
> >    from="[2]luser@chat.server.com/converse.js-136806228"
> >    to="[3]testroom@muc.chat.server.com/luser">
> >          <x xmlns="[4]http://jabber.org/protocol/muc" />
> >       </presence>
> >    </body>
> >
> >    response:
> >    <body xmlns="[5]http://jabber.org/protocol/httpbind"
> >    xmlns:stream="[6]http://etherx.jabber.org/streams"
> >    xmlns:xmpp="urn:xmpp:xbosh" secure="true" ack="2732681976"
> >    host="b2bdv-node" from="[7]chat.server.com" xmpp:version="1.0">
> >       <presence xmlns="jabber:client"
> >    to="[8]luser@chat.server.com/converse.js-136806228"
> >    from="[9]testroom@muc.chat.server.com/luser">
> >          <x xmlns="http://jabber.org/protocol/muc#user">
> >             <item nick="luser"
> >    jid="[10]luser@chat.server.com/converse.js-136806228"
> role="moderator"
> >    affiliation="owner" />
> >             <status code="110" />
> >          </x>
> >       </presence>
> >    </body>
> >
> >    - With prebind, creating room -
> >    request:
> >    <body xmlns="http://jabber.org/protocol/httpbind" rid="5457883766"
> >    sid="0be8ed4b-61f5-41ee-861f-a5adbf2d05fe">
> >       <presence xmlns="jabber:client" from="luser@chat.server.com"
> >    to="gfsd@muc.chat.server.com/luser">
> >          <x xmlns="http://jabber.org/protocol/muc" />
> >       </presence>
> >    </body>
> >
> >    response:
> >    <body xmlns="http://jabber.org/protocol/httpbind"
> >    xmlns:stream="http://etherx.jabber.org/streams"
> >    xmlns:xmpp="urn:xmpp:xbosh" ack="5457883766" secure="true"
> >    host="b2bdv-node" from="chat.server.com" xmpp:version="1.0">
> >       <message xmlns="jabber:client" from="gfsd@muc.chat.server.com"
> >    to="luser@chat.server.com" type="groupchat">
> >          <body>Room is locked. Please configure.</body>
> >       </message>
> >    </body>
>
> This room is locked. I'm not sure what that means. What happens when you
> try to
> connect to testroom@muc.chat.server.com with prebind=true?
>

If i login on another browser instance with another user, i can see the
testroom room available but when i try to join that room it opens a room
window with empty user list.

>
> >    From the converse side, the reque sts are a bit different. If you
> look at
> >    the attribute "from":
> >    Without prebind: from="[20]
> luser@chat.server.com/converse.js-136806228"
> >    With prebind: from="luser@chat.server.com"
> >
> >    Why converse is behaving differently between the two?
>
> I think because you're not including a resource in the JID that you pass
> in to
> converse.initialize.
>
> Ideally converse.js should then just generate a resource for you but looks
> like
> this is not happening currently.
>

From the XEP0045, there seems to be a resource in the JID in the client
request when a room is created.
I will try to pass a resource ID and see if that solves the problem within
tigase server. Also i will update converse version to 0.9.3, i think that
some configurations had changed on that version, prebind for example doesnt
exist anymore right?

Thanks

>
> JC
>