No presence or messages in groupchat

I’‘m writing a custom Jabber client connecting to a Messenger 2.1.2 server. I can authenticate and join a groupchat, but after that I never see messages or presence from other users in the room. The server shows that I’'m authenticated and in the room. Exodus clients in the same room can see my client and get messages I send from it and from each other. As a test, I tried the following in a raw terminal session:

  1. Send stream:stream to the server. I get back a stream element.

  2. Send an auth to the server. I get back a result and appear in the server session list.

  3. Send a to the groupchat server. I appear in the groupchat list for all the Exodus clients in the room.

After that, I get nothing. No presence messages arrive from other clients in the room. If I send a message from another client, it doesn’'t show up in the terminal session, even though it shows up in the other Exodus clients.

I must be missing something really obvious, but I’'m baffled.

mjmsmith,

It sounds like you’‘re forgetting to send a presence packet to the server to announce that you’'re available. This will officially create your session in the server. Once you send the presence, group chat should work correctly.

Do you see any error messages in the Jive Messenger logs? It sounds like we could at least clean up the logic a bit so that things fail in a better way than they currently do.

Regards,

Matt

Hi Matt, thanks for the reply. Although it wasn’‘t in the example session I posted, I’‘ve tried adding packets at various places, with no effect. Here’'s a real example copied from a Putty session:

<stream:stream xmlns:stream=“http://etherx.jabber.org/streams” xmlns=“jabber:client” to=“fdr”>

<?xml version=''1.0'' encoding=''UTF-8''?>

336XXXXX</quer y>

At this point, the user 336 is visible in the room “myconf” on other clients, but no activity in the room (group messages, other users entering, exiting, changing status) shows up in this session. There’'s nothing interesting in the logs that I can see. The audit logs show presence info being sent to other users from 336, but nothing sent to 336.

The packet should be directly after the iq auth. So, just reverse the order of the last two packets in your example and it should work.

Regards,

Matt

I got the same result with presence packets reversed, nothing comes into my Putty session.

I then sent a groupchat message from the Exodus client (username 416) and manually from my Putty session (username 336). The end of the audit log looks like this:

<packet xmlns=“http://www.jivesoftware.org” streamID=“808b9532”

status=“auth” timestamp=“Mon Apr 25 22:55:19 EDT 2005”>

<message xmlns="" id=“jcl_27” to=“sanfrancisco@conference.fdr”

type=“groupchat” from=“416@fdr/Exodus”>

jjj

<packet xmlns=“http://www.jivesoftware.org” streamID=“808b9532”

status=“auth” timestamp=“Mon Apr 25 22:55:19 EDT 2005”>

<message xmlns="" id=“jcl_27” to=“416@fdr/Exodus”

type=“groupchat” from=“sanfrancisco@conference.fdr/416”>

jjj

<packet xmlns=“http://www.jivesoftware.org” streamID=“b3272bd1” status=“auth”

timestamp=“Mon Apr 25 23:07:41 EDT 2005”>

<message xmlns="" to=“sanfrancisco@conference.fdr”

type=“groupchat” from=“336@fdr”>

abc

<packet xmlns=“http://www.jivesoftware.org” streamID=“808b9532” status=“auth”

timestamp=“Mon Apr 25 23:07:41 EDT 2005”>

<message xmlns="" to=“416@fdr/Exodus” type=“groupchat”

from=“sanfrancisco@conference.fdr/336”>

abc

I read this as both clients sending a groupchat message to the server, but the message only being sent back out to the Exodus client (416). Very strange…

Exodus has a feature that lets you see all traffic going back and forth. My recommendation would be to turn that feature on and carefully compare what you’‘re sending to the server vs. Exodus (try just signing into Exodus and then immediately joining a group chat). I’‘m not seeing the issue at the moment, but I’'m sure it will be obvious when you spot it. I hope that helps.

Regards,

Matt

In case anyone else runs into this, the problem turned out to be that I didn’‘t specify a resource in the iq auth packet. If there’‘s no resource, it appears that you can login, enter a room and send messages, but you won’'t get anything sent back to you.

Hey mjmsmith,

Have you tried using Messenger 2.1.3? The bug that you described was present in Messenger 2.1.2. Using the latest release you should get a not_acceptable error if no resource was defined.

Regards,

– Gato