candy-chat / candy

JavaScript-based multi-user chat client for XMPP.
http://candy-chat.github.io/candy
MIT License
1.32k stars 370 forks source link

Users disappear in userlist #431

Closed naanlizard closed 8 years ago

naanlizard commented 8 years ago

Hello

I'm trying to use candy for a web chat on my website. Everything works fine as long as everyone only opens one window. The problem is, if people join the chat a second time, they get removed from the user list, despite definitely being in the chat room.

If anyone has any thoughts, I can try implementing a fix fairly quickly.

Let me know if you need server config or anything too.

Garrett B

benlangfeld commented 8 years ago

What server are you using? Not all servers permit multiple connections to the same room with the same nickname. You should review this with your server implementer, since Candy cannot do anything except avoid this situation (which is indeed done at the point at which you select the nickname you will use).

naanlizard commented 8 years ago

I'm using openfire, but I am able to connect multiple other clients without issue - the only place I have trouble is in candy. For example, I can connect Psi multiple times, Pidgin, converse.js clients, etc without issue.

Candy is the only client that fails to accurately list users in a room in these circumstances, so I am pretty sure it is candy, not openfire.

Happy to be wrong though if you can tell me what is wrong with openfire.

benlangfeld commented 8 years ago

In that case please post comparative wire logs to show what those clients do differently. Perhaps you can identify the differences yourself.

naanlizard commented 8 years ago

I would love to, but I'm not sure where to start even getting wire logs. Could you point me in the right direction?

benlangfeld commented 8 years ago

In Psi you right-click the account and the menu item should be obvious. I don't remember off the top of my head what it's called and don't have access to a computer to check right now.

naanlizard commented 8 years ago

Here's psi joining - http://pastebin.com/raw.php?i=YeeJb7xP

Here's candy joining the room that psi is in - http://pastebin.com/raw.php?i=fbTmpFST

After this testing, it seems that candy just hides the username of anyone connected with multiple clients, no matter what they are.

Here's psi joining after candy is connected (and causing the name in the user list to disappear) - http://pastebin.com/raw.php?i=gd6MjP2A

Nothing looks obviously wrong to me, but I am not familiar with this stuff at all. I'll keep looking but you might be able to see something I miss.

naanlizard commented 8 years ago

And more possibly useful info, when leaving the room with psi, candy does not re-add my username to the user list.

naanlizard commented 8 years ago

[Strophe][FATAL]: error: Got answer to IQ from wrong jid:username@conference.domain.tv Expected jid: UserName@conference.domain.tv undefined

Found this in chrome, maybe it relates? Trying to figure out but it's slow going.