Smack version: 4.2.3 , Openfire: 4.2.1
I had implemented MultiuserChat in my project.
When I am joining a group for the first time it is working fine.
But an error is coming when I join rejoin the group after reconnection.
Code of join group:
Resourcepart mResourcepart = Resourcepart.from(XmppManager.getInstance().getNickName());
MucEnterConfiguration.Builder builder = muc.getEnterConfigurationBuilder(mResourcepart);
long latOnlineTime = SharedPref.getLong(LAST_ONLINE_TIME, 0);
if (latOnlineTime > 0) {
long diffMill = System.currentTimeMillis() - latOnlineTime;
JLog.e(MUC_TAG, "SECONDS:" + diffMill / 1000);
builder.requestHistorySince((int) (diffMill / 1000));
} else {
JLog.e(MUC_TAG, "No History INSIDE");
builder.requestNoHistory();
}
MucEnterConfiguration mucEnterConfiguration = builder.build();
muc.join(mucEnterConfiguration);
I am getting Error:
org.jivesoftware.smack.SmackException$NoResponseException: No response received within reply timeout.
Timeout was 10000ms (~10s). Waited for response using: AndFilter: (StanzaTypeFilter: Presence, OrFilter:
(AndFilter: (FromMatchesFilter (ignoreResourcepart): 9876543210@conference.ip-172-31-14-114.sa-east-1.compute.internal,
MUCUserStatusCodeFilter: status=110), AndFilter: (FromMatchesFilter (full):
9876543210@conference.ip-172-31-14-114.sa-east-1.compute.internal/9876543211, StanzaIdFilter: id=iAnSi-10, PresenceTypeFilter: type=error))).
at org.jivesoftware.smack.StanzaCollector.nextResultOrThrow(StanzaCollector.java:253)
at org.jivesoftware.smackx.muc.MultiUserChat.enter(MultiUserChat.java:346)
at org.jivesoftware.smackx.muc.MultiUserChat.join(MultiUserChat.java:702)
at com.myguei.xmpp.XmppService.getMultiUserChatConfig(XmppService.java:3069)
at com.myguei.xmpp.XmppService.getMultiUserChat(XmppService.java:2970)
at com.myguei.xmpp.XmppService.joinToGroup(XmppService.java:655)
at com.myguei.xmpp.XmppService.access$700(XmppService.java:165)
at com.myguei.xmpp.XmppService$6.run(XmppService.java:619)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.os.HandlerThread.run(HandlerThread.java:61)
Can you please help to solve this issue.