Roster problem after page reload using prebind

From:

shdk shdk

Date:

2014-05-27 @ 09:34

The first time I load the page and initialize converse everything works as
expected but after reloading the page and initializing converse again the
contact list gets loaded but all contacts are shown as offline.
I'm passing the right jid, sid and rid params. So I don't know what can be
causing this problem.
Any ideas?

Re: [conversejs] Roster problem after page reload using prebind

From:

Jc Brand

Date:

2014-05-27 @ 12:44

On Tue, May 27, 2014 at 11:34:58AM +0200, shdk shdk wrote:
> The first time I load the page and initialize converse everything works as> expected but after reloading the page and initializing converse again the> contact list gets loaded but all contacts are shown as offline.> > I'm passing the right jid, sid and rid params. So I don't know what can be> causing this problem.
Are you sure that you are still logged in? Can you chat with other users, have
you checked your XMPP server's logs?

Re: [conversejs] Roster problem after page reload using prebind

From:

Alexandre Coloma

Date:

2014-05-27 @ 14:48

¿Are you stopping connection and attaching them after reload page?
I have the same problem , the only solution tha i see is reload contact
list,
I think this bug is a important problem because chache connection in
reload page is important for good user experience.
Could be solved in converse.js project?
Thaks in advance for your patience
​

Re: [conversejs] Roster problem after page reload using prebind

From:

Jc Brand

Date:

2014-05-28 @ 09:21

On Tue, May 27, 2014 at 05:05:02PM +0200, shdk shdk wrote:
> yeah. I'm still logged in. I'm logging in as "admin" and there's already a> user called "user1" logged in I can see in the roster.
Can you send messages to "user1"?
> But if I reload the page (as "admin"), "user1 is shown as offline". If> "user1" changes the status to offline a then back to online, "admin"
I'm struggling to understand your sentence above. You reload the page and your
roster contact "user1" is shown as offline. Then you change that user's status
to offline and online again. And then what happens? Does the status in the
roster change to online or does it stay offline?
> These are the requests that are being sent to openfire:> > This is the debug trace for the first time the page is loaded (everything> works right):
<snip>
> And this is de debug trace after the page is reloaded (roster contacts are> shown as "offline"):
Below is an IQ roster request stanza and a presence stanza. In other words, your
admin user has asked for his roster and has also advertised that he is online.
> <body rid="6693775200586894"> xmlns="[10]http://jabber.org/protocol/httpbind" sid="a2ec3ae8">> <iq type="get" id="1852:roster" xmlns="jabber:client">> <query xmlns="jabber:iq:roster"></query>> </iq>> <presence xmlns="jabber:client"></presence>> </body>
Then the XMPP server responds with your roster. I see that there is a user with
jid "user1".
This is an invalid JID. Is that perhaps why you have a "user1" showing as
offline in your roster?
> <body xmlns="[11]http://jabber.org/protocol/httpbind">> <iq xmlns="jabber:client" type="result" id="1852:roster"> to="admin@desarrollo24/a2ec3ae8">> <query xmlns="jabber:iq:roster">> <item jid="user2@desarrollo24" name="Usuario2 Apellidos> Usuario2" subscription="both">> <group>Grupo</group>> </item>> <item jid="user1" name="user1" ask="subscribe"> subscription="none"></item>> <item jid="user1@desarrollo24" name="Usuario1 Apellidos> Usuario1" subscription="both">> <group>Grupo</group>> </item>> </query>> </iq>> </body>
Here the XMPP server informs you of your own presence broadcast that you made a
while ago:
> <body xmlns="[13]http://jabber.org/protocol/httpbind">> <presence xmlns="jabber:client" from="admin@desarrollo24/a2ec3ae8"> to="admin@desarrollo24/a2ec3ae8"></presence>> </body>
Here you broadcast your presence again:
> <body rid="6693775200586897"> xmlns="[15]http://jabber.org/protocol/httpbind" sid="a2ec3ae8">> <presence xmlns="jabber:client"></presence>> </body>
And here the XMPP server informs you of your own presence broadcast:
> <body xmlns="[17]http://jabber.org/protocol/httpbind">> <presence xmlns="jabber:client" from="admin@desarrollo24/a2ec3ae8"> to="admin@desarrollo24/a2ec3ae8"></presence>> </body>
Everything looks fine to me except for the fact that after you broadcast your
presence, you don't receive presence notifications from your roster contacts.
Generally, when you broadcast your presence, you should immediately get
presence notifications from your roster contacts, telling you what their chat
statuses are.
If you don't receive presence notifications from your contacts, then they must
be offline.
So either your roster contacts are really offline and you are mistaken to
believe they must be shown otherwise, or there is a subtle bug somewhere that I
am not aware of.
JC

Re: [conversejs] Roster problem after page reload using prebind

From:

Jc Brand

Date:

2014-05-28 @ 10:08

On Wed, May 28, 2014 at 11:21:51AM +0200, JC Brand wrote:
<snip>
> Below is an IQ roster request stanza and a presence stanza. In other words, your> admin user has asked for his roster and has also advertised that he is online.> > > <body rid="6693775200586894"> > xmlns="[10]http://jabber.org/protocol/httpbind" sid="a2ec3ae8">> > <iq type="get" id="1852:roster" xmlns="jabber:client">> > <query xmlns="jabber:iq:roster"></query>> > </iq>> > <presence xmlns="jabber:client"></presence>> > </body>
Looking at this again, I remember a bug fixed in October last year where the
presence stanza was sent out too early.
https://github.com/jcbrand/converse.js/releases/tag/v0.6.6
What version of Converse.js are you using?