Closed alexsdi closed 3 years ago
Hi, @alexsdi. First of all, you can increase reply timeout just like this - QBChatService.setDefaultPacketReplyTimeout(15000); Also, before join do chatDialog.initForChat(QBChatService.getInstance()); And if you still get error, please attach log with creating dialog and joining to it.
Hi, @RomanPronin . I did both the tricks, setting 15000 as ReplyTimout and chatDialog.initForChat().
Basically I am using QBChatHelper.java from Qummicate source code. below I have mentioned the source code
public QBChatDialog createGroupChat(String name, List
QBChatDialog dialogToCreate = new QBChatDialog();
dialogToCreate.setName(name);
dialogToCreate.setType(QBDialogType.GROUP);
dialogToCreate.setOccupantsIds(occupantIdsList);
dialogToCreate.setPhoto(photoUrl);
QBChatDialog qbDialog = QBRestChatService.createChatDialog(dialogToCreate).perform();
DbUtils.saveDialogToCache(dataManager, qbDialog);
joinRoomChat(qbDialog);
sendSystemMessageAboutCreatingGroupChat(qbDialog, friendIdsList);
QBChatMessage chatMessage = ChatNotificationUtils.createGroupMessageAboutCreateGroupChat(context, qbDialog, photoUrl);
sendChatMessage(chatMessage, qbDialog);
return qbDialog;
}
=========================================================
=== REQUEST ==== 2542ecd6-8b35-4186-8766-4d7c51828ae1 ===
REQUEST
GET https://api.quickblox.com/chat/Message.json
HEADERS
QuickBlox-REST-API-Version=0.1.1
QB-SDK=Android 3.4
QB-Token=78c9b6c4892cb8ca8c72bc2cef6d96547900eeb0
PARAMETERS
date_sent[gt]=0
sort_asc=date_sent
mark_as_read=0
limit=50
chat_dialog_id=59dcc375a0eb470c82351b1b
INLINE
GET https://api.quickblox.com/chat/Message.json?date_sent[gt]=0&sort_asc=date_sent&mark_as_read=0&limit=50&chat_dialog_id=59dcc375a0eb470c82351b1b
10-11 15:40:23.946 25377-25656/com.spakkchat D/SMACK: RECV (0):
Most of the D/SMACK: SENT (0): and RECV are empty. Could you reproduce this issue on other device, cause it's hard to say anything about this error without full smack logs. And for logs, please use github gist.
Yes I have tested with multiple devices and still showing the same issue. But if remove app from background and open then it will join correctly. On every group creation I have to kill app and open to join into the group chat, hope this will help you to investigate
Thank's for details, but it will be very helpful if you post new logs with NOT empty D/SMACK: SENT (0) and D/SMACK:RECV lines.
Check the attached file for detailed log.. Github truncating the log so that I mentioned in text file
@Ashokkumar-iOS in your logs I can see re-join in group chat, try to add check
if (!dialog.isJoined()){
dialog.join(discussionHistory);
}
and call join only for not-joined dialogs.
Hello QuickBlox customer,
This is Nikolay from QuickBlox support.
The issue was closed as it is outdated.
Please check the relevant section of our documentation here: https://docs.quickblox.com/docs/android-chat-dialogs
Also, please update the SDK to the latest version: https://github.com/QuickBlox/quickblox-android-sdk-releases/releases/tag/3.9.11
Additionally, please check our new samples: https://docs.quickblox.com/docs/code-samples#chat-samples
If it is still relevant after reviewing the updated information, feel free to open a new issue.
Have a nice day.
Help avoid duplicate issue reports, check [existing issues](link to issues section of repo)
Environment details (Operating system, browser information, SDK version) I have tested in android 4.4 to 7.0
Did this work before? No
Expected behavior Create a new group should do auto join into that group
Actual behavior QBChatdialog for group chat created but getting "No response" exception and unable to join that group
Logs (please, use github gist)
SmackException$NoResponseException: No response received within reply timeout.
org.jivesoftware.smack.SmackException$NoResponseException: No response received within reply timeout. Timeout was 5000ms at org.jivesoftware.smack.PacketCollector.nextResultOrThrow(Unknown Source) at org.jivesoftware.smackx.muc.MultiUserChat.enter(Unknown Source) at org.jivesoftware.smackx.muc.MultiUserChat.join(Unknown Source) at com.quickblox.chat.QBGroupChat.join(Unknown Source) at com.quickblox.chat.model.QBChatDialog.join(Unknown Source) at com.spakkchat.quickblox.quickblox_core.qb.helpers.QBChatHelper.joinRoomChat(QBChatHelper.java:688) at com.spakkchat.quickblox.quickblox_core.qb.helpers.QBChatHelper.tryJoinRoomChat(QBChatHelper.java:671) at com.spakkchat.quickblox.quickblox_core.qb.helpers.QBChatHelper.initCurrentDialogForChatIfPossible(QBChatHelper.jav at com.spakkchat.quickblox.quickblox_core.qb.helpers.QBChatHelper.initCurrentChatDialog(QBChatHelper.java:131) at com.spakkchat.manager.SKQuickBloxManager.startGroupChatActivity(SKQuickBloxManager.java:1291) at com.spakkchat.activity.NewGroup$3$1$1.done(NewGroup.java:315) at com.spakkchat.activity.NewGroup$3$1$1.done(NewGroup.java:293) at com.parse.ParseTaskUtils$1.done(ParseTaskUtils.java:75) at com.parse.ParseTaskUtils$1.done(ParseTaskUtils.java:72) at com.parse.ParseTaskUtils$2$1.run(ParseTaskUtils.java:116) at android.os.Handler.handleCallback(Handler.java:733) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:146) at android.app.ActivityThread.main(ActivityThread.java:5602) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099) at dalvik.system.NativeStart.main(Native Method)
Steps to reproduce the behavior did following coding and getting exception QBChatDialog dialogToCreate = new QBChatDialog(); dialogToCreate.setName(name); dialogToCreate.setType(QBDialogType.GROUP); dialogToCreate.setOccupantsIds(occupantIdsList); dialogToCreate.setPhoto("");
Any others comments?