Finally, I have found the root cause.
aTalk has implemented XEP-0084: User Avatar; if the option is enabled, then the vcard-temp:x:update" (XEP-0153) will be sent as
.in all the stanza including the muc join room stanza i.e. without element.
However reply from server will be in short-form, and looks like smack does not like to see a single element without the attribute. This results to a reply timeout exception thrown by smack.
// ============ aTalk with XEP-0084 option enabled ==============
08-17 06:43:45.790 D/SMACK: SENT (0):
08-17 06:43:45.880 D/SMACK: RECV (0):
================== //
If I enabled the full vcard-temp:x:update" (XEP-0153) together with elements in stanza when joining room, then smack works correctly as captured in the log below.
On seeing muc with hash, aTalk tries to retrieve the avatar from MUC. However smack throws an exception again as shown in the log below.
Setting vCards / Avatars for MUC rooms | ejabberd Docs
aTalk has implemented catch, bus seems it is not captured???
try {
mVCard = vCardMgr.loadVCard((EntityBareJid) userId);
}
catch (SmackException.NoResponseException | XMPPException.XMPPErrorException
| SmackException.NotConnectedException | InterruptedException e) {
LOGGER.log(Level.WARNING, “Error while downloading VCard for: '” + userId
- "’. Exception: " + e.getMessage());
}
============= aTalk muc setup ================
08-17 17:35:51.418 D/SMACK: SENT (0): 186f39da130310dbc59002608c56d1bd26abd72d</ph oto>
08-17 17:35:51.468 D/SMACK: RECV (0): 186f39da130310dbc59002608c56d1bd26abd72d</ph oto>
08-17 17:35:51.468 D/SMACK: RECV (0):
08-17 17:35:51.478 D/SMACK: SENT (0):
08-17 17:35:51.478 D/SMACK: SENT (0):
08-17 17:35:51.488 D/SMACK: SENT (0): Group Chat
08-17 17:35:51.908 D/SMACK: RECV (0):
08-17 17:35:51.938 D/SMACK: RECV (0):
08-17 17:35:51.958 D/SMACK: RECV (0): Group Chat
08-17 17:35:52.008 E/αTalk: [15] util.UtilActivator.uncaughtException().95 An uncaught exception occurred in thread=Thread[Smack-Cached Executor 1 (0),5,main] and message was: XMPP error reply received from chatroom1234@conference.icrypto.com: XMPPError: item-not-found - cancel
org.jivesoftware.smack.XMPPException$XMPPErrorException: XMPP error reply received from chatroom1234@conference.icrypto.com: XMPPError: item-not-found - cancel
at org.jivesoftware.smack.StanzaCollector.nextResultOrThrow(StanzaCollector.java:2 56)
at org.jivesoftware.smack.StanzaCollector.nextResultOrThrow(StanzaCollector.java:2 08)
at org.jivesoftware.smackx.vcardtemp.VCardManager.loadVCard(VCardManager.java:133)
at org.jivesoftware.smackx.avatar.vcardavatar.VCardAvatarManager.downloadVCard(VCa rdAvatarManager.java:186)
at org.jivesoftware.smackx.avatar.vcardavatar.VCardAvatarManager.parseContactPhoto Presence(VCardAvatarManager.java:294)
at org.jivesoftware.smackx.avatar.vcardavatar.VCardAvatarManager.access$300(VCardA vatarManager.java:45)
at org.jivesoftware.smackx.avatar.vcardavatar.VCardAvatarManager$3.processStanza(V CardAvatarManager.java:163)
at org.jivesoftware.smack.AbstractXMPPConnection$4.run(AbstractXMPPConnection.java :1202)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1120)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:820)
08-17 17:35:52.028 E/αTalk: [16] util.UtilActivator.uncaughtException().95 An uncaught exception occurred in thread=Thread[Smack-Single Threaded Executor 0 (0),5,main] and message was: Attempt to invoke interface method ‘boolean java.util.Iterator.hasNext()’ on a null object reference
java.lang.NullPointerException: Attempt to invoke interface method ‘boolean java.util.Iterator.hasNext()’ on a null object reference
at org.jivesoftware.smackx.muc.MultiUserChat$3.processStanza(MultiUserChat.java:25 2)
at org.jivesoftware.smack.AbstractXMPPConnection$5.run(AbstractXMPPConnection.java :1228)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1120)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:820)