I’ve encountered an issue with Openfire 4.1.1. When I join a MUC room, the presence stanza for “myself” does not include a status code of 110, as required by XEP-0045. This is supposed to have been implemented in Openfire 3.9.x, and I did indeed locate the source code responsible for setting that status code element. However, for whatever reason, it’s not actually setting it. At first glance, this issue appears to be the same as https://issues.igniterealtime.org/browse/OF-860, but that was fixed several years ago in 3.10.0. There’s also this topic from over a year ago with no replies: Openfire doesn't return status 110 when joining MUC
I actually noticed this issue when upgrading my client application from Smack 4.1 to 4.3, since the latter waits specifically for a stanza with that status code and ends up timing out. To verify this while removing my own code from the equation, I tested this using the Swift 4.0.2 XMPP client.
The MUC room is a persistent room with the following settings. (personal info redacted)
In this scenario, the MUC room contains one existing user, who is an owner of the room. My client joins afterwards and is a member. The Permissions for the room have been set accordingly and both users are able to join:
I was able to reproduce this on Openfire 4.2.3. The scenario is the same as described above: my client application is joining a MUC room which is already occupied by the owner of the room. Here are the stanzas related to the MUC room (tonytestmuc8):
org.jivesoftware.smack.SmackException$NoResponseException: No response received within reply timeout. Timeout was 15000ms (~15s). Waited for response using: AndFilter: (StanzaTypeFilter: Presence, OrFilter: (AndFilter: (FromMatchesFilter (ignoreResourcepart): tonytestmuc8@conference.MYXMPPDOMAIN.com, MUCUserStatusCodeFilter: status=110), AndFilter: (FromMatchesFilter (full): tonytestmuc8@conference.MYXMPPDOMAIN.com/MYUSERNAME, StanzaIdFilter: id=uPfQY-235, PresenceTypeFilter: type=error))).
at org.jivesoftware.smack.SmackException$NoResponseException.newWith(SmackException.java:111)
at org.jivesoftware.smack.SmackException$NoResponseException.newWith(SmackException.java:98)
at org.jivesoftware.smack.StanzaCollector.nextResultOrThrow(StanzaCollector.java:265)
at org.jivesoftware.smackx.muc.MultiUserChat.enter(MultiUserChat.java:376)
at org.jivesoftware.smackx.muc.MultiUserChat.join(MultiUserChat.java:740)
(stack frames from my client app and from ScheduledThreadPoolExecutor)
at java.lang.Thread.run(Unknown Source)
This is from my client application which is using Smack 4.3.0. The second “received” stanza is the “self-presence” stanza for the client itself joining the room, so according to XEP-0045 it should have a <status code=‘110’/> element, but it does not.