Reputation: 123
I am using the below code to create Multi user group but getting Timeout error, even if my timeout error is 10sec.
public void createGroup() {
String roomId = "Group_test003" + "@icoveri.com";
String nick = "Grouptest";
try {
MultiUserChatManager manager = multiUserChatManager.getInstanceFor(connection);
MultiUserChat muc = manager.getMultiUserChat(roomId);
muc.create(nick);
Form form = muc.getConfigurationForm();
Form submitForm = form.createAnswerForm();
List<FormField> fields = form.getFields();
for (int i = 0; i < fields.size(); i++) {
FormField field = (FormField) fields.get(i);
if (!FormField.Type.hidden.equals(field.getType()) && field.getVariable() != null) {
submitForm.setDefaultAnswer(field.getVariable());
}
}
List owners = new ArrayList();
owners.add(user1234 + "@icoveri.com");
submitForm.setAnswer("muc#roomconfig_roomowners", owners);
muc.sendConfigurationForm(submitForm);
} catch (XMPPException e) {
e.printStackTrace();
} catch (SmackException.NoResponseException e) {
e.printStackTrace();
} catch (SmackException.NotConnectedException e) {
e.printStackTrace();
} catch (SmackException e) {
e.printStackTrace();
}
}
The error which I am getting is
org.jivesoftware.smack.SmackException$NoResponseException: No response received within reply timeout. Timeout was 10000ms (~10s). Used filter: AndFilter: (FromMatchesFilter (full): [email protected]/Grouptest, StanzaTypeFilter: org.jivesoftware.smack.packet.Presence).
at org.jivesoftware.smack.PacketCollector.nextResultOrThrow(PacketCollector.java:229) at org.jivesoftware.smackx.muc.MultiUserChat.enter(MultiUserChat.java:311) at org.jivesoftware.smackx.muc.MultiUserChat.createOrJoin(MultiUserChat.java:400) at org.jivesoftware.smackx.muc.MultiUserChat.createOrJoin(MultiUserChat.java:376)
Upvotes: 2
Views: 472
Reputation: 7230
I also have spent a couple hours trying to correct the same error; in my case, the problem happened when I used XMPPBOSHConnection
, but not when using XMPPTCPConnection
.
Upvotes: 0
Reputation: 123
I have got the solution. The problem was in my service i.e. iscoveri.com. I had to use different service name to create the group.
Upvotes: 1