I have updated SMACK to 4.2.2 and I got the same error.
val nickName: Resourcepart = Resourcepart.from(“JohnDoe”)
muc.join(nickName) -> here I have Exception
at org.jivesoftware.smack.StanzaCollector.nextResultOrThrow(StanzaCollector.java:253) at org.jivesoftware.smackx.muc.MultiUserChat.enter(MultiUserChat.java:355) at org.jivesoftware.smackx.muc.MultiUserChat.join(MultiUserChat.java:711)
val serverAdress = "XXX.XXX.XXX,XXX"
val conf = XMPPTCPConnectionConfiguration.builder()
conf.setHostAddress(InetAddress.getByName(serverAdress))
conf.setXmppDomain(JidCreate.domainBareFrom(serverAdress))
conf.setHost(serverAdress)
conf.setPort(5222)
conf.setSecurityMode(SecurityMode.disabled)
conf.setDebuggerEnabled(true)
conf.setSendPresence(true)
val connection = XMPPTCPConnection(conf.build())
connection.connect()
connection.login(“userName”, “password”)
val mucm = MultiUserChatManager.getInstanceFor(connection)
val services = mucm.xmppServiceDomains
if (services.isEmpty()) {
throw Exception(“No MUC services found”)
}
val service = services[0]
val room = JidCreate.entityBareFrom(“room@” + service)
val muc = mucm.getMultiUserChat(room)
val nickname: Resourcepart = Resourcepart.from(“nickname”)
muc.join(nickname) <-here is the Exception metioned before
muc.sendMessage(“Hello”)
Thread.sleep(1000)
muc.leave()
connection.disconnect()