QuickBlox / quickblox-android-sdk

QuickBlox Android SDK includes code snippets with main use cases and framework JAR library.
BSD 3-Clause "New" or "Revised" License
417 stars 697 forks source link

Unable to create & join group chat : SmackException NoResponseException: No response received within reply timeout. #459

Closed alexsdi closed 3 years ago

alexsdi commented 7 years ago

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("");

    QBChatDialog qbDialog = QBRestChatService.createChatDialog(dialogToCreate).perform();
    DbUtils.saveDialogToCache(dataManager, qbDialog);

    try {
        joinRoomChat(qbDialog);
    }catch (Exception ex)
    {
        ex.printStackTrace();
    }

    sendSystemMessageAboutCreatingGroupChat(qbDialog, friendIdsList);

    QBChatMessage chatMessage = ChatNotificationUtils.createGroupMessageAboutCreateGroupChat(context, qbDialog, photoUrl);
    sendChatMessage(chatMessage, qbDialog);

Any others comments?

RomanPronin commented 7 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.

alexsdi commented 7 years ago

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 friendIdsList, String photoUrl) throws Exception { ArrayList occupantIdsList = (ArrayList) ChatUtils.getOccupantIdsWithUser(friendIdsList);

    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;
}
alexsdi commented 7 years ago

========================================================= === 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): 10-11 15:40:24.703 25377-25377/com.spakkchat D/QBASDK: onActivityPaused 10-11 15:40:24.704 25377-25484/com.spakkchat V/FA: Recording user engagement, ms: 39316 10-11 15:40:24.704 25377-25484/com.spakkchat V/FA: Using measurement service 10-11 15:40:24.704 25377-25484/com.spakkchat V/FA: Connecting to remote service 10-11 15:40:24.708 25377-25484/com.spakkchat V/FA: Activity paused, time: 2432534837 10-11 15:40:24.712 25377-25484/com.spakkchat D/FA: Logging event (FE): user_engagement(_e), Bundle[{firebase_event_origin(_o)=auto, engagement_time_msec(_et)=39316, firebase_screen_class(_sc)=Home, firebase_screen_id(_si)=6254430874106461366}] 10-11 15:40:24.731 25377-25484/com.spakkchat V/FA: Using measurement service 10-11 15:40:24.731 25377-25484/com.spakkchat V/FA: Connection attempt already in progress 10-11 15:40:24.742 25377-25377/com.spakkchat V/FA: onActivityCreated 10-11 15:40:24.742 25377-25377/com.spakkchat D/ActivityLifecycleHandler: onActivityCreated NewChat 10-11 15:40:24.884 25377-25377/com.spakkchat D/ActivityLifecycleHandler: onActivityStarted NewChat 10-11 15:40:24.884 25377-25377/com.spakkchat D/ActivityLifecycleHandler: onActivityStarted , chatDestroyed=false, numberOfActivitiesInForeground= 1 10-11 15:40:24.884 25377-25377/com.spakkchat D/ActivityLifecycle: ++numberOfActivitiesInForeground 10-11 15:40:24.888 25377-25377/com.spakkchat I/com.spakkchat.manager.Foreground: still foreground 10-11 15:40:24.888 25377-25484/com.spakkchat V/FA: Using measurement service 10-11 15:40:24.888 25377-25377/com.spakkchat D/ActivityLifecycleHandler: onActivityResumed NewChat count of activities = 2 10-11 15:40:24.888 25377-25484/com.spakkchat V/FA: Connection attempt already in progress 10-11 15:40:24.888 25377-25484/com.spakkchat V/FA: Activity resumed, time: 2432535022 10-11 15:40:24.892 25377-25484/com.spakkchat D/FA: Logging event (FE): screen_view(_vs), Bundle[{firebase_event_origin(_o)=auto, firebase_previous_class(_pc)=Home, firebase_previous_id(_pi)=6254430874106461366, firebase_screen_class(_sc)=NewChat, firebase_screen_id(_si)=6254430874106461367}] 10-11 15:40:24.900 25377-25484/com.spakkchat V/FA: Using measurement service 10-11 15:40:24.900 25377-25484/com.spakkchat V/FA: Connection attempt already in progress 10-11 15:40:24.901 25377-25484/com.spakkchat D/FA: Connected to remote service 10-11 15:40:24.901 25377-25484/com.spakkchat V/FA: Processing queued up service tasks: 4 10-11 15:40:24.916 25377-25703/com.spakkchat I/ExifInterface_JNI: Raw image not detected 10-11 15:40:24.923 25377-25703/com.spakkchat I/ExifInterface_JNI: Raw image not detected 10-11 15:40:24.929 25377-25703/com.spakkchat I/ExifInterface_JNI: Raw image not detected 10-11 15:40:24.934 25377-25703/com.spakkchat I/ExifInterface_JNI: Raw image not detected 10-11 15:40:24.942 25377-25758/com.spakkchat I/ExifInterface_JNI: Raw image not detected 10-11 15:40:24.947 25377-25758/com.spakkchat I/ExifInterface_JNI: Raw image not detected 10-11 15:40:24.952 25377-25758/com.spakkchat I/ExifInterface_JNI: Raw image not detected 10-11 15:40:24.957 25377-25758/com.spakkchat I/ExifInterface_JNI: Raw image not detected 10-11 15:40:24.975 25377-25760/com.spakkchat I/ExifInterface_JNI: Raw image not detected 10-11 15:40:24.981 25377-25759/com.spakkchat I/ExifInterface_JNI: Raw image not detected 10-11 15:40:25.010 25377-25703/com.spakkchat I/ExifInterface_JNI: Raw image not detected 10-11 15:40:25.014 25377-25703/com.spakkchat I/ExifInterface_JNI: Raw image not detected 10-11 15:40:25.033 25377-25703/com.spakkchat I/ExifInterface_JNI: Raw image not detected 10-11 15:40:25.039 25377-25703/com.spakkchat I/ExifInterface_JNI: Raw image not detected 10-11 15:40:25.145 25377-25377/com.spakkchat D/ActivityLifecycle: --numberOfActivitiesInForeground 10-11 15:40:25.145 25377-25377/com.spakkchat D/QBASDK: onActivityStopped1 10-11 15:40:25.175 25377-26475/com.spakkchat D/QBASDK: *** * RESPONSE 2542ecd6-8b35-4186-8766-4d7c51828ae1 STATUS : 200 HEADERS X-Runtime=0.047836 Cache-Control=max-age=0, private, must-revalidate QuickBlox-REST-API-Version=0.1.1 X-Android-Selected-Protocol=http/1.1 Set-Cookie=_mkra_ctxt=2516dc808e4c8cf8e3c9cd7915496f4a--200; path=/; max-age=5; HttpOnly; secure QB-Token-ExpirationDate=2017-10-11 12:09:43 +0000 Status=200 OK X-Request-Id=df763256-855c-4fed-bca7-28eaacfa9627 X-Android-Response-Source=NETWORK 200 Connection=Close X-Android-Sent-Millis=1507716624834 Content-Type=application/json; charset=utf-8 Date=Wed, 11 Oct 2017 10:10:22 GMT X-Content-Type-Options=nosniff Content-Length=11215 ETag=W/"4ce66812c1843cb6bc46420ac44ab743" Server=openresty/1.9.15.1 Strict-Transport-Security=max-age=31536000max-age=15768000; X-XSS-Protection=1; mode=block X-Frame-Options=SAMEORIGIN X-Android-Received-Millis=1507716625170 Access-Control-Allow-Origin=* BODY '{"skip":0,"limit":50,"items":[{"_id":"59dcc37d4f66e8a98485c23d","added_occupant_ids":"33382641,33463262,33571743,33573513,33735258,34280933,34281569","attachments":[],"chat_dialog_id":"59dcc375a0eb470c82351b1b","created_at":"2017-10-10T12:56:30Z","current_occupant_ids":"33382641,33463262,33571743,33573513,33735258,34280933,34281569","date_sent":1507640190,"delivered_ids":[33382641,33463262],"dialog_update_info":"3","message":"Notification message","notification_type":"2","read_ids":[33382641],"recipient_id":null,"room_photo":null,"room_updated_date":"1507596981000","sender_id":33382641,"updated_at":"2017-10-10T15:07:39Z","read":0},{"_id":"59dcc4a54f66e8a98485c241","attachments":[],"chat_dialog_id":"59dcc375a0eb470c82351b1b","created_at":"2017-10-10T13:01:24Z","date_sent":1507640485,"delivered_ids":[33382641,33463262],"message":"Test message","messageDict":"{\"code\":\"0\",\"message_text\":\"Test message\",\"fromid\":\"OVCGKGATTU\",\"toid\":\"K2dUd0qqF5\",\"isFromMe\":true,\"msg_id\":\"aaa53f26-09fc-4dfc-bc73-c03f59377eb0\",\"fromno\":\"+91 9500748354\",\"is_forwarded\":false,\"is_group\":true,\"msg_date\":1507640481118,\"msg_status\":21,\"msg_type\":1,\"is_read\":true,\"roomID\":\"K2dUd0qqF5\",\"action\":31,\"groupName\":\"Group1\",\"fromUserId\":\"Qs0JnfjuLi\",\"fromName\":\"Alex\",\"duration\":0,\"fileSize\":\"1KB\",\"qBloxId\":33382641,\"toqbid\":-1,\"dialogid\":\"59dcc375a0eb470c82351b1b\"}","read_ids":[33382641],"recipient_id":null,"sender_id":33382641,"updated_at":"2017-10-10T15:07:39Z","read":0},{"_id":"59dcc5034f663b2c4e550a1a","attachments":[],"chat_dialog_id":"59dcc375a0eb470c82351b1b","created_at":"2017-10-10T13:02:57Z","date_sent":1507640579,"delivered_ids":[33382641,33463262],"message":"Common","messageDict":"{\"code\":\"0\",\"message_text\":\"Common\",\"fromid\":\"OVCGKGATTU\",\"toid\":\"K2dUd0qqF5\",\"isFromMe\":true,\"msg_id\":\"8c0d3aa7-53c4-41dd-864f-537e45f6f8fd\",\"fromno\":\"+91 9500748354\",\"is_forwarded\":false,\"is_group\":true,\"msg_date\":1507640579511,\"msg_status\":21,\"msg_type\":1,\"is_read\":true,\"roomID\":\"K2dUd0qqF5\",\"action\":31,\"groupName\":\"Group1\",\"fromUserId\":\"Qs0JnfjuLi\",\"fromName\":\"Alex\",\"duration\":0,\"fileSize\":\"1KB\",\"qBloxId\":33382641,\"toqbid\":-1,\"dialogid\":\"59dcc375a0eb470c82351b1b\"}","read_ids":[33382641],"recipient_id":null,"sender_id":33382641,"updated_at":"2017-10-10T15:07:39Z","read":0},{"_id":"59dcc53809484ba9d5172b1a","attachments":[],"chat_dialog_id":"59dcc375a0eb470c82351b1b","created_at":"2017-10-10T13:03:54Z","date_sent":1507640632,"delivered_ids":[33463262,33382641],"message":"Yes","messageDict":"{\"code\":\"0\",\"message_text\":\"Yes\",\"fromid\":\"BUHZUHzgHA\",\"toid\":\"K2dUd0qqF5\",\"isFromMe\":true,\"msg_id\":\"13bd7a33-8f52-4b97-83c5-89db4e5894f1\",\"fromno\":\"+91 8248010263\",\"is_forwarded\":false,\"is_group\":true,\"msg_date\":1507640632782,\"msg_status\":21,\"msg_type\":1,\"is_read\":true,\"roomID\":\"K2dUd0qqF5\",\"action\":31,\"groupName\":\"Gro 10-11 15:40:26.645 25377-25758/com.spakkchat I/ExifInterface_JNI: Raw image not detected 10-11 15:40:26.650 25377-25758/com.spakkchat I/ExifInterface_JNI: Raw image not detected 10-11 15:40:26.655 25377-25758/com.spakkchat I/ExifInterface_JNI: Raw image not detected 10-11 15:40:26.670 25377-25758/com.spakkchat I/ExifInterface_JNI: Raw image not detected 10-11 15:40:26.680 25377-25758/com.spakkchat I/ExifInterface_JNI: Raw image not detected 10-11 15:40:26.685 25377-25758/com.spakkchat I/ExifInterface_JNI: Raw image not detected 10-11 15:40:28.420 25377-25703/com.spakkchat I/ExifInterface_JNI: Raw image not detected 10-11 15:40:28.427 25377-25703/com.spakkchat I/ExifInterface_JNI: Raw image not detected 10-11 15:40:28.434 25377-25703/com.spakkchat I/ExifInterface_JNI: Raw image not detected 10-11 15:40:28.446 25377-25703/com.spakkchat I/ExifInterface_JNI: Raw image not detected 10-11 15:40:28.452 25377-25703/com.spakkchat I/ExifInterface_JNI: Raw image not detected 10-11 15:40:28.457 25377-25703/com.spakkchat I/ExifInterface_JNI: Raw image not detected 10-11 15:40:28.804 25377-25758/com.spakkchat I/ExifInterface_JNI: Raw image not detected 10-11 15:40:28.811 25377-25758/com.spakkchat I/ExifInterface_JNI: Raw image not detected 10-11 15:40:28.818 25377-25758/com.spakkchat I/ExifInterface_JNI: Raw image not detected 10-11 15:40:28.836 25377-25758/com.spakkchat I/ExifInterface_JNI: Raw image not detected 10-11 15:40:28.843 25377-25758/com.spakkchat I/ExifInterface_JNI: Raw image not detected 10-11 15:40:28.850 25377-25758/com.spakkchat I/ExifInterface_JNI: Raw image not detected 10-11 15:40:29.134 25377-25656/com.spakkchat D/SMACK: RECV (0): 10-11 15:40:29.204 25377-25568/com.spakkchat D/QBASDK: StanzaSender run 10-11 15:40:29.205 25377-25655/com.spakkchat D/SMACK: SENT (0): 10-11 15:40:29.926 25377-25484/com.spakkchat V/FA: Inactivity, disconnecting from the service 10-11 15:40:30.056 25377-25377/com.spakkchat D/QBASDK: onActivityPaused 10-11 15:40:30.056 25377-25484/com.spakkchat V/FA: Recording user engagement, ms: 5168 10-11 15:40:30.056 25377-25484/com.spakkchat V/FA: Using measurement service 10-11 15:40:30.057 25377-25484/com.spakkchat V/FA: Connecting to remote service 10-11 15:40:30.060 25377-25484/com.spakkchat V/FA: Activity paused, time: 2432540190 10-11 15:40:30.064 25377-25484/com.spakkchat D/FA: Logging event (FE): user_engagement(_e), Bundle[{firebase_event_origin(_o)=auto, engagement_time_msec(_et)=5168, firebase_screen_class(_sc)=NewChat, firebase_screen_id(_si)=6254430874106461367}] 10-11 15:40:30.084 25377-25377/com.spakkchat V/FA: onActivityCreated 10-11 15:40:30.085 25377-25377/com.spakkchat D/ActivityLifecycleHandler: onActivityCreated NewGroup 10-11 15:40:30.091 25377-25484/com.spakkchat V/FA: Using measurement service 10-11 15:40:30.091 25377-25484/com.spakkchat V/FA: Connection attempt already in progress 10-11 15:40:30.120 25377-25377/com.spakkchat D/ActivityLifecycleHandler: onActivityStarted NewGroup 10-11 15:40:30.120 25377-25377/com.spakkchat D/ActivityLifecycleHandler: onActivityStarted , chatDestroyed=false, numberOfActivitiesInForeground= 1 10-11 15:40:30.120 25377-25377/com.spakkchat D/ActivityLifecycle: ++numberOfActivitiesInForeground 10-11 15:40:30.124 25377-25377/com.spakkchat I/com.spakkchat.manager.Foreground: still foreground 10-11 15:40:30.124 25377-25484/com.spakkchat V/FA: Using measurement service 10-11 15:40:30.125 25377-25377/com.spakkchat D/ActivityLifecycleHandler: onActivityResumed NewGroup count of activities = 2 10-11 15:40:30.125 25377-25484/com.spakkchat V/FA: Connection attempt already in progress 10-11 15:40:30.125 25377-25484/com.spakkchat V/FA: Activity resumed, time: 2432540258 10-11 15:40:30.128 25377-25484/com.spakkchat D/FA: Logging event (FE): screen_view(_vs), Bundle[{firebase_event_origin(_o)=auto, firebase_previous_class(_pc)=NewChat, firebase_previous_id(_pi)=6254430874106461367, firebase_screen_class(_sc)=NewGroup, firebase_screen_id(_si)=6254430874106461368}] 10-11 15:40:30.132 25377-25656/com.spakkchat D/SMACK: RECV (0): 10-11 15:40:30.137 25377-25484/com.spakkchat V/FA: Using measurement service 10-11 15:40:30.137 25377-25484/com.spakkchat V/FA: Connection attempt already in progress 10-11 15:40:30.138 25377-25484/com.spakkchat D/FA: Connected to remote service 10-11 15:40:30.138 25377-25484/com.spakkchat V/FA: Processing queued up service tasks: 4 10-11 15:40:30.568 25377-25377/com.spakkchat D/ActivityLifecycle: --numberOfActivitiesInForeground 10-11 15:40:30.568 25377-25377/com.spakkchat D/QBASDK: onActivityStopped1 10-11 15:40:31.484 25377-25656/com.spakkchat D/SMACK: RECV (0): 10-11 15:40:32.814 25377-25656/com.spakkchat D/SMACK: RECV (0): 10-11 15:40:33.193 25377-25760/com.spakkchat D/QBASDK: ========================================================= === REQUEST ==== 2cffa0ff-9777-4431-8c5e-60ccf7d27c12 === REQUEST POST https://api.quickblox.com/chat/Dialog.json HEADERS QuickBlox-REST-API-Version=0.1.1 QB-SDK=Android 3.4 QB-Token=78c9b6c4892cb8ca8c72bc2cef6d96547900eeb0 PARAMETERS name=Gh photo=http://www.spakchat.com/rr.jpg type=2 occupants_ids=34280933,33463262,33382641 INLINE POST https://api.quickblox.com/chat/Dialog.json?name=Gh&photo=http%3A%2F%2Fwww.spakchat.com%2Frr.jpg&type=2&occupants_ids=34280933%2C33463262%2C33382641 10-11 15:40:35.093 25377-25760/com.spakkchat D/QBASDK: *** * RESPONSE 2cffa0ff-9777-4431-8c5e-60ccf7d27c12 STATUS : 201 HEADERS X-Runtime=0.065703 Cache-Control=max-age=0, private, must-revalidate QuickBlox-REST-API-Version=0.1.1 X-Android-Selected-Protocol=http/1.1 Set-Cookie=_mkra_ctxt=922c3c59e78a65fcf7ef7c76ce3bfc15--201; path=/; max-age=5; HttpOnly; secure QB-Token-ExpirationDate=2017-10-11 12:09:43 +0000 Status=201 Created X-Request-Id=f4aebedc-ffcf-4477-92c5-5a682c7345dc X-Android-Response-Source=NETWORK 201 Connection=Close X-Android-Sent-Millis=1507716634316 Content-Type=application/json; charset=utf-8 Date=Wed, 11 Oct 2017 10:10:32 GMT X-Content-Type-Options=nosniff Content-Length=408 ETag=W/"eb77450f86d535363c3cd11e73c285d2" Server=openresty/1.9.15.1 Strict-Transport-Security=max-age=31536000max-age=15768000; X-XSS-Protection=1; mode=block X-Frame-Options=SAMEORIGIN X-Android-Received-Millis=1507716635088 Access-Control-Allow-Origin=* BODY '{"_id":"59ddee18a28f9a232e0c627a","created_at":"2017-10-11T10:10:32Z","last_message":null,"last_message_date_sent":null,"last_message_user_id":null,"name":"Gh","occupants_ids":[33382641,33463262,34280933],"photo":"http://www.spakchat.com/rr.jpg","type":2,"updated_at":"2017-10-11T10:10:32Z","user_id":33382641,"xmpp_room_jid":"61104_59ddee18a28f9a232e0c627a@muc.chat.quickblox.com","unread_messages_count":0}' 10-11 15:40:35.110 25377-25760/com.spakkchat I/QBChatDialog: join to QBChatDialog{id=59ddee18a28f9a232e0c627a, created_at=2017-11-10 15:40:32, updated_at=2017-11-10 15:40:32, last_msg_user_id=null, occupants_ids=[33382641, 33463262, 34280933], last_message=null, last_message_date_sent=0, type=GROUP, name=Gh, room_jid=61104_59ddee18a28f9a232e0c627a@muc.chat.quickblox.com, user_id=33382641, photo=http://www.spakchat.com/rr.jpg, unread_message_count=0, customData=null} 10-11 15:40:35.119 25377-25655/com.spakkchat D/SMACK: SENT (0): 10-11 15:40:35.170 25377-25484/com.spakkchat V/FA: Inactivity, disconnecting from the service 10-11 15:40:35.558 25377-25656/com.spakkchat D/SMACK: RECV (0): 10-11 15:40:35.564 25377-25655/com.spakkchat D/SMACK: SENT (0): 10-11 15:40:35.569 25377-25655/com.spakkchat D/SMACK: SENT (0): 10-11 15:40:35.985 25377-25656/com.spakkchat D/SMACK: RECV (0): 10-11 15:40:36.004 25377-25655/com.spakkchat D/SMACK: SENT (0): Notification message59ddee18a28f9a232e0c627a33382641,33463262,34280933SystemNotificationsGh150771663200015077166351http://www.spakchat.com/rr.jpg2 10-11 15:40:36.007 25377-25760/com.spakkchat D/QBASDK: ========================================================= === REQUEST ==== f0ae6a94-a30c-4ac5-98f2-f8b95ad2fbd4 === 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_desc=date_sent mark_as_read=0 limit=50 chat_dialog_id=59ddee18a28f9a232e0c627a INLINE GET https://api.quickblox.com/chat/Message.json?date_sent[gt]=0&sort_desc=date_sent&mark_as_read=0&limit=50&chat_dialog_id=59ddee18a28f9a232e0c627a 10-11 15:40:36.014 25377-25655/com.spakkchat D/SMACK: SENT (0): Notification message59ddee18a28f9a232e0c627a33382641,33463262,34280933SystemNotificationsGh150771663200015077166351http://www.spakchat.com/rr.jpg2 10-11 15:40:36.022 25377-25655/com.spakkchat D/SMACK: SENT (0): Notification message59ddee18a28f9a232e0c627a33382641,33463262,3428093315077166320003233382641,33463262,342809331 10-11 15:40:36.505 25377-25656/com.spakkchat D/SMACK: RECV (0): 10-11 15:40:36.894 25377-25656/com.spakkchat D/SMACK: RECV (0): Notification message59ddee18a28f9a232e0c627a33382641,33463262,3428093315077166320003233382641,33463262,34280933159ddee1c4f66f64168e0d35c1507716634 10-11 15:40:37.468 25377-25656/com.spakkchat D/SMACK: RECV (0): 10-11 15:40:37.729 25377-25760/com.spakkchat D/QBASDK: *** * RESPONSE f0ae6a94-a30c-4ac5-98f2-f8b95ad2fbd4 STATUS : 200 HEADERS X-Runtime=0.018682 Cache-Control=max-age=0, private, must-revalidate QuickBlox-REST-API-Version=0.1.1 X-Android-Selected-Protocol=http/1.1 Set-Cookie=_mkra_ctxt=36119547842437428bb2bb27daa2efa1--200; path=/; max-age=5; HttpOnly; secure QB-Token-ExpirationDate=2017-10-11 12:09:43 +0000 Status=200 OK X-Request-Id=21496723-04d0-4296-89c7-492cebc49e65 X-Android-Response-Source=NETWORK 200 Connection=Close X-Android-Sent-Millis=1507716636896 Content-Type=application/json; charset=utf-8 Date=Wed, 11 Oct 2017 10:10:35 GMT X-Content-Type-Options=nosniff Content-Length=559 ETag=W/"8486a7cbac6d690bd0fbecf4ffc01a18" Server=openresty/1.9.15.1 Strict-Transport-Security=max-age=31536000max-age=15768000; X-XSS-Protection=1; mode=block X-Frame-Options=SAMEORIGIN X-Android-Received-Millis=1507716637725 Access-Control-Allow-Origin=* BODY '{"skip":0,"limit":50,"items":[{"_id":"59ddee1c4f66f64168e0d35c","added_occupant_ids":"33382641,33463262,34280933","attachments":[],"chat_dialog_id":"59ddee18a28f9a232e0c627a","created_at":"2017-10-11T10:10:34Z","current_occupant_ids":"33382641,33463262,34280933","date_sent":1507716634,"delivered_ids":[33382641],"dialog_update_info":"3","message":"Notification message","notification_type":"2","read_ids":[33382641],"recipient_id":null,"room_photo":null,"room_updated_date":"1507716632000","sender_id":33382641,"updated_at":"2017-10-11T10:10:34Z","read":0}]}' 10-11 15:40:39.001 25377-25656/com.spakkchat D/SMACK: RECV (0): 10-11 15:40:39.762 25377-25377/com.spakkchat V/QBChatHelper: init() 10-11 15:40:39.765 25377-25655/com.spakkchat D/SMACK: SENT (0): 10-11 15:40:39.768 25377-25655/com.spakkchat D/SMACK: SENT (0): 10-11 15:40:40.062 25377-25656/com.spakkchat D/SMACK: RECV (0): 10-11 15:40:40.399 25377-25656/com.spakkchat D/SMACK: RECV (0): 10-11 15:40:40.722 25377-25656/com.spakkchat D/SMACK: RECV (0): 10-11 15:40:44.187 25377-25656/com.spakkchat D/SMACK: RECV (0): 10-11 15:40:44.204 25377-25568/com.spakkchat D/QBASDK: StanzaSender run 10-11 15:40:44.205 25377-25655/com.spakkchat D/SMACK: SENT (0): 10-11 15:40:44.487 25377-25656/com.spakkchat D/SMACK: RECV (0): 10-11 15:40:44.769 25377-25377/com.spakkchat W/System.err: org.jivesoftware.smack.SmackException$NoResponseException: No response received within reply timeout. Timeout was 5000ms (~5s). Used filter: AndFilter: (FromMatchesFilter (full): 61104_59ddee18a28f9a232e0c627a@muc.chat.quickblox.com/33382641, StanzaTypeFilter: Presence). 10-11 15:40:44.769 25377-25377/com.spakkchat W/System.err: at org.jivesoftware.smack.PacketCollector.nextResultOrThrow(Unknown Source) 10-11 15:40:44.769 25377-25377/com.spakkchat W/System.err: at org.jivesoftware.smackx.muc.MultiUserChat.enter(Unknown Source) 10-11 15:40:44.769 25377-25377/com.spakkchat W/System.err: at org.jivesoftware.smackx.muc.MultiUserChat.join(Unknown Source) 10-11 15:40:44.769 25377-25377/com.spakkchat W/System.err: at com.quickblox.chat.QBGroupChat.join(Unknown Source) 10-11 15:40:44.769 25377-25377/com.spakkchat W/System.err: at com.quickblox.chat.model.QBChatDialog.join(Unknown Source) 10-11 15:40:44.770 25377-25377/com.spakkchat W/System.err: at com.spakkchat.quickblox.quickblox_core.qb.helpers.QBChatHelper.joinRoomChat(QBChatHelper.java:689) 10-11 15:40:44.770 25377-25377/com.spakkchat W/System.err: at com.spakkchat.quickblox.quickblox_core.qb.helpers.QBChatHelper.tryJoinRoomChat(QBChatHelper.java:672) 10-11 15:40:44.770 25377-25377/com.spakkchat W/System.err: at com.spakkchat.quickblox.quickblox_core.qb.helpers.QBChatHelper.initCurrentDialogForChatIfPossible(QBChatHelper.java:144) 10-11 15:40:44.770 25377-25377/com.spakkchat W/System.err: at com.spakkchat.quickblox.quickblox_core.qb.helpers.QBChatHelper.init(QBChatHelper.java:199) 10-11 15:40:44.770 25377-25377/com.spakkchat W/System.err: at com.spakkchat.manager.SKQuickBloxManager.startGroupChatActivity(SKQuickBloxManager.java:1451) 10-11 15:40:44.770 25377-25377/com.spakkchat W/System.err: at com.spakkchat.activity.NewGroup$3$1$1.done(NewGroup.java:318) 10-11 15:40:44.770 25377-25377/com.spakkchat W/System.err: at com.spakkchat.activity.NewGroup$3$1$1.done(NewGroup.java:296) 10-11 15:40:44.770 25377-25377/com.spakkchat W/System.err: at com.parse.ParseTaskUtils$1.done(ParseTaskUtils.java:75) 10-11 15:40:44.770 25377-25377/com.spakkchat W/System.err: at com.parse.ParseTaskUtils$1.done(ParseTaskUtils.java:72) 10-11 15:40:44.770 25377-25377/com.spakkchat W/System.err: at com.parse.ParseTaskUtils$2$1.run(ParseTaskUtils.java:116) 10-11 15:40:44.770 25377-25377/com.spakkchat W/System.err: at android.os.Handler.handleCallback(Handler.java:751) 10-11 15:40:44.771 25377-25377/com.spakkchat W/System.err: at android.os.Handler.dispatchMessage(Handler.java:95) 10-11 15:40:44.771 25377-25377/com.spakkchat W/System.err: at android.os.Looper.loop(Looper.java:154) 10-11 15:40:44.771 25377-25377/com.spakkchat W/System.err: at android.app.ActivityThread.main(ActivityThread.java:6123) 10-11 15:40:44.771 25377-25377/com.spakkchat W/System.err: at java.lang.reflect.Method.invoke(Native Method) 10-11 15:40:44.771 25377-25377/com.spakkchat W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867) 10-11 15:40:44.771 25377-25377/com.spakkchat W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:757) 10-11 15:40:44.771 25377-25377/com.spakkchat V/QBChatHelper: init() 10-11 15:40:44.777 25377-25655/com.spakkchat D/SMACK: SENT (0): 10-11 15:40:45.108 25377-25656/com.spakkchat D/SMACK: RECV (0): 10-11 15:40:45.389 25377-25656/com.spakkchat D/SMACK: RECV (0): 10-11 15:40:46.441 25377-25656/com.spakkchat D/SMACK: RECV (0): 10-11 15:40:47.668 25377-25656/com.spakkchat D/SMACK: RECV (0): 10-11 15:40:49.776 25377-25377/com.spakkchat W/System.err: org.jivesoftware.smack.SmackException$NoResponseException: No response received within reply timeout. Timeout was 5000ms (~5s). Used filter: AndFilter: (FromMatchesFilter (full): 61104_59ddee18a28f9a232e0c627a@muc.chat.quickblox.com/33382641, StanzaTypeFilter: Presence). 10-11 15:40:49.777 25377-25377/com.spakkchat W/System.err: at org.jivesoftware.smack.PacketCollector.nextResultOrThrow(Unknown Source) 10-11 15:40:49.777 25377-25377/com.spakkchat W/System.err: at org.jivesoftware.smackx.muc.MultiUserChat.enter(Unknown Source) 10-11 15:40:49.777 25377-25377/com.spakkchat W/System.err: at org.jivesoftware.smackx.muc.MultiUserChat.join(Unknown Source) 10-11 15:40:49.777 25377-25377/com.spakkchat W/System.err: at com.quickblox.chat.QBGroupChat.join(Unknown Source) 10-11 15:40:49.777 25377-25377/com.spakkchat W/System.err: at com.quickblox.chat.model.QBChatDialog.join(Unknown Source) 10-11 15:40:49.777 25377-25377/com.spakkchat W/System.err: at com.spakkchat.quickblox.quickblox_core.qb.helpers.QBChatHelper.joinRoomChat(QBChatHelper.java:689) 10-11 15:40:49.777 25377-25377/com.spakkchat W/System.err: at com.spakkchat.quickblox.quickblox_core.qb.helpers.QBChatHelper.tryJoinRoomChat(QBChatHelper.java:672) 10-11 15:40:49.778 25377-25377/com.spakkchat W/System.err: at com.spakkchat.quickblox.quickblox_core.qb.helpers.QBChatHelper.initCurrentDialogForChatIfPossible(QBChatHelper.java:144) 10-11 15:40:49.778 25377-25377/com.spakkchat W/System.err: at com.spakkchat.quickblox.quickblox_core.qb.helpers.QBChatHelper.initCurrentChatDialog(QBChatHelper.java:131) 10-11 15:40:49.778 25377-25377/com.spakkchat W/System.err: at com.spakkchat.manager.SKQuickBloxManager.startGroupChatActivity(SKQuickBloxManager.java:1452) 10-11 15:40:49.778 25377-25377/com.spakkchat W/System.err: at com.spakkchat.activity.NewGroup$3$1$1.done(NewGroup.java:318) 10-11 15:40:49.778 25377-25377/com.spakkchat W/System.err: at com.spakkchat.activity.NewGroup$3$1$1.done(NewGroup.java:296) 10-11 15:40:49.778 25377-25377/com.spakkchat W/System.err: at com.parse.ParseTaskUtils$1.done(ParseTaskUtils.java:75) 10-11 15:40:49.778 25377-25377/com.spakkchat W/System.err: at com.parse.ParseTaskUtils$1.done(ParseTaskUtils.java:72) 10-11 15:40:49.778 25377-25377/com.spakkchat W/System.err: at com.parse.ParseTaskUtils$2$1.run(ParseTaskUtils.java:116) 10-11 15:40:49.778 25377-25377/com.spakkchat W/System.err: at android.os.Handler.handleCallback(Handler.java:751) 10-11 15:40:49.778 25377-25377/com.spakkchat W/System.err: at android.os.Handler.dispatchMessage(Handler.java:95) 10-11 15:40:49.778 25377-25377/com.spakkchat W/System.err: at android.os.Looper.loop(Looper.java:154) 10-11 15:40:49.778 25377-25377/com.spakkchat W/System.err: at android.app.ActivityThread.main(ActivityThread.java:6123) 10-11 15:40:49.778 25377-25377/com.spakkchat W/System.err: at java.lang.reflect.Method.invoke(Native Method) 10-11 15:40:49.779 25377-25377/com.spakkchat W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867) 10-11 15:40:49.779 25377-25377/com.spakkchat W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:757) 10-11 15:40:49.799 25377-25377/com.spakkchat I/Choreographer: Skipped 604 frames! The application may be doing too much work on its main thread. 10-11 15:40:49.816 25377-25377/com.spakkchat E/ Chat : =====created ====

RomanPronin commented 7 years ago

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.

alexsdi commented 7 years ago

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

RomanPronin commented 7 years ago

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.

Ashokkumar-iOS commented 7 years ago

Check the attached file for detailed log.. Github truncating the log so that I mentioned in text file

group-chat-log.txt

tatanka987 commented 7 years ago

@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.

ghost commented 3 years ago

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.