Open shirne opened 1 year ago
I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.
[X] internal/util/post.go
✅ Commit 63a64f7
• In the `ApiPost` function, add a check for context cancellation before making the HTTP request. If the context is cancelled, return an appropriate error message.
• In the deferred function that logs the API call, add a check for context cancellation. If the context is cancelled, log a message indicating that the API call was aborted.
[X] msgtest/module/manager.go
✅ Commit f8a3f3d
• In the `apiPost` function, add a check for context cancellation before making the HTTP request. If the context is cancelled, return an appropriate error message.
• In the `postWithCtx` function, add a check for context cancellation before calling the `apiPost` function. If the context is cancelled, return an appropriate error message.
[X] pkg/network/http_client.go
✅ Commit 22dec58
• In the `Post2Api` and `Post2ApiForRead` functions, add a check for context cancellation before making the HTTP request. If the context is cancelled, return an appropriate error message.
• In the `retry` function, add a check for context cancellation before retrying the HTTP request. If the context is cancelled, return an appropriate error message.
[X] internal/group/sync.go
✅ Commit 96ca38a
• In the `SyncAllAdminGroupApplication`, `SyncAdminGroupApplications`, `GetServerJoinGroup`, `GetServerAdminGroupApplicationList`, `GetServerSelfGroupApplication`, `GetServerGroupMembers`, `GetDesignatedGroupMembers`, and `GetGroupAbstractInfo` functions, add a check for context cancellation before making the API request. If the context is cancelled, return an appropriate error message.
[X] test/account.go
✅ Commit 0675969
• In the `register`, `getToken`, `RunGetToken`, `RegisterReliabilityUser`, `WorkGroupRegisterReliabilityUser`, `RegisterPressUser`, and `GetGroupMemberNum` functions, add a check for context cancellation before making the API request. If the context is cancelled, return an appropriate error message.
I have finished reviewing the code for completeness. I did not find errors for sweep/fix-context-cancellation
.
.
💡 To recreate the pull request edit the issue title or description. To tweak the pull request, leave a comment on the pull request. Join Our Discord
hi, you can provide more detail informations about this panic? like your app version and core version etc we can find the reason with your help.
flutter 3.13.7 flutter_openim_sdk 3.1.0
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
flutter 3.13.7 flutter_openim_sdk 3.1.0
Flutter 3.13.8 flutter_openim_sdk 3.3.0 连接不稳定的时候还是会重现这个崩溃
[flutter_openim_sdk] ** Flutter Handler : connectListener {type: onConnectSuccess}
[log] [OpenIM] onConnectSuccess
[flutter_openim_sdk] ** Flutter Handler : connectListener {type: onConnecting}
[log] [OpenIM] onConnecting
[flutter_openim_sdk] ** Flutter Handler : conversationListener {type: onSyncServerFailed}
[flutter_openim_sdk] ** Flutter Handler : conversationListener {type: onSyncServerStart}
2
I/F-OpenIMSDK(native call flutter)(28736): method: 【 getSelfUserInfo 】, onSuccess: {"userID":"85","nickname":"","faceURL":"","createTime":1698032101988,"ex":"","attachedInfo":"","globalRecvMsgOpt":0}
I/F-OpenIMSDK(native call flutter)(28736): { method:connectListener, type:onConnectSuccess }
I/F-OpenIMSDK(native call flutter)(28736): { method:conversationListener, type:onSyncServerStart }
I/F-OpenIMSDK(native call flutter)(28736): { method:connectListener, type:onKickedOffline }
I/GoLog (28736): 2023-10-23 06:30:49.443 WARN [PID:28736] [interaction/long_conn_mgr.go:166] readPump closed {"operationID": "1698042651290839990", "error": "client kicked offline"}
I/GoLog (28736): 2023-10-23 06:30:49.444 WARN [PID:28736] [interaction/long_conn_mgr.go:275] heartbeat closed {"operationID": "1698042651290839990", "heartbeat": "heartbeat done sdk logout....."}
I/GoLog (28736): 2023-10-23 06:30:49.444 ERROR [PID:28736] [interaction/msg_sync.go:196] get max seq error {"operationID": "1698042648333", "error": "10003 CtxDeadlineExceededError"}
I/GoLog (28736): 2023-10-23 06:30:49.445 WARN [PID:28736] [interaction/long_conn_mgr.go:275] heartbeat closed {"operationID": "1698042651290839990", "heartbeat": "heartbeat done sdk logout....."}
I/GoLog (28736): 2023-10-23 06:30:49.445 ERROR [PID:28736] [util/post.go:77] ApiRequest {"operationID": "1698042648332", "type": "network error", "error": "Post \"http://172.105.107.69:9005/msg/get_conversations_has_read_and_max_seq\": context canceled"}
I/GoLog (28736): 2023-10-23 06:30:49.445 ERROR [PID:28736] [util/post.go:55] CallApi {"operationID": "1698042648332", "api": "/msg/get_conversations_has_read_and_max_seq", "state": "failed", "cost time": 516, "error": "ApiPost http.Client.Do failed Post \"http://172.105.107.69:9005/msg/get_conversations_has_read_and_max_seq\": context canceled: 10000 NetworkError"}
I/GoLog (28736): 2023-10-23 06:30:49.445 ERROR [PID:28736] [conversation_msg/conversation.go:78] getServerHasReadAndMaxSeqs err {"operationID": "1698042648332", "error": "ApiPost http.Client.Do failed Post \"http://172.105.107.69:9005/msg/get_conversations_has_read_and_max_seq\": context canceled: 10000 NetworkError"}
I/F-OpenIMSDK(native call flutter)(28736): { method:connectListener, type:onConnecting }
[flutter_openim_sdk] ** Flutter Handler : connectListener {type: onConnectSuccess}
[log] [OpenIM] onConnectSuccess
[flutter_openim_sdk] ** Flutter Handler : conversationListener {type: onSyncServerStart}
I/GoLog (28736): 2023-10-23 06:30:49.445 ERROR [PID:28736] [conversation_msg/conversation_notification.go:640] SyncConversationHashReadSeqs err {"operationID": "1698042648332", "error": "ApiPost http.Client.Do failed Post \"http://172.105.107.69:9005/msg/get_conversations_has_read_and_max_seq\": context canceled: 10000 NetworkError"}
I/GoLog (28736): 2023-10-23 06:30:49.445 WARN [PID:28736] [interaction/long_conn_mgr.go:409] conn closed {"operationID": "1698042651290839990", "error": "context canceled"}
I/GoLog (28736): 2023-10-23 06:30:49.446 ERROR [PID:28736] [interaction/long_conn_mgr.go:191] readMessage err {"operationID": "1698042651290839990", "goroutine ID:": 135, "error": "read tcp 10.255.0.1:48463->172.105.107.69:9003: use of closed network connection"}
I/GoLog (28736): 2023-10-23 06:30:49.447 ERROR [PID:28736] [util/post.go:77] ApiRequest {"operationID": "1698042648332", "type": "network error", "error": "Post \"http://172.105.107.69:9005/group/get_user_req_group_applicationList\": context canceled"}
I/GoLog (28736): 2023-10-23 06:30:49.447 ERROR [PID:28736] [util/post.go:77] ApiRequest {"operationID": "1698042648332", "type": "network error", "error": "Post \"http://172.105.107.69:9005/user/get_users_info\": context canceled"}
I/GoLog (28736): 2023-10-23 06:30:49.448 ERROR [PID:28736] [util/post.go:55] CallApi {"operationID": "1698042648332", "api": "/user/get_users_info", "state": "failed", "cost time": 0, "error": "ApiPost http.Client.Do failed Post \"http://172.105.107.69:9005/user/get_users_info\": context canceled: 10000 NetworkError"}
I/GoLog (28736): 2023-10-23 06:30:49.448 ERROR [PID:28736] [util/post.go:55] CallApi {"operationID": "1698042648332", "api": "/group/get_user_req_group_applicationList", "state": "failed", "cost time": 2, "error": "ApiPost http.Client.Do failed Post \"http://172.105.107.69:9005/group/get_user_req_group_applicationList\": context canceled: 10000 NetworkError"}
I/GoLog (28736): 2023-10-23 06:30:49.445 ERROR [PID:28736] [util/post.go:77] ApiRequest {"operationID": "1698042648333", "type": "network error", "error": "Post \"http://172.105.107.69:9005/msg/get_conversations_has_read_and_max_seq\": context canceled"}
I/GoLog (28736): 2023-10-23 06:30:49.448 ERROR [PID:28736] [util/post.go:55] CallApi {"operationID": "1698042648333", "api": "/msg/get_conversations_has_read_and_max_seq", "state": "failed", "cost time": 12, "error": "ApiPost http.Client.Do failed Post \"http://172.105.107.69:9005/msg/get_conversations_has_read_and_max_seq\": context canceled: 10000 NetworkError"}
I/GoLog (28736): 2023-10-23 06:30:49.448 ERROR [PID:28736] [conversation_msg/conversation.go:78] getServerHasReadAndMaxSeqs err {"operationID": "1698042648333", "error": "ApiPost http.Client.Do failed Post \"http://172.105.107.69:9005/msg/get_conversations_has_read_and_max_seq\": context canceled: 10000 NetworkError"}
I/GoLog (28736): 2023-10-23 06:30:49.448 ERROR [PID:28736] [conversation_msg/conversation_notification.go:640] SyncConversationHashReadSeqs err {"operationID": "1698042648333", "error": "ApiPost http.Client.Do failed Post \"http://172.105.107.69:9005/msg/get_conversations_has_read_and_max_seq\": context canceled: 10000 NetworkError"}
I/GoLog (28736): 2023-10-23 06:30:49.448 ERROR [PID:28736] [util/post.go:77] ApiRequest {"operationID": "1698042648332", "type": "network error", "error": "Post \"http://172.105.107.69:9005/friend/get_friend_list\": context canceled"}
I/GoLog (28736): 2023-10-23 06:30:49.448 ERROR [PID:28736] [util/post.go:55] CallApi {"operationID": "1698042648332", "api": "/friend/get_friend_list", "state": "failed", "cost time": 2, "error": "ApiPost http.Client.Do failed Post \"http://172.105.107.69:9005/friend/get_friend_list\": context canceled: 10000 NetworkError"}
I/GoLog (28736): 2023-10-23 06:30:49.448 ERROR [PID:28736] [util/post.go:77] ApiRequest {"operationID": "1698042648332", "type": "network error", "error": "Post \"http://172.105.107.69:9005/friend/get_black_list\": context canceled"}
I/GoLog (28736): 2023-10-23 06:30:49.448 ERROR [PID:28736] [util/post.go:55] CallApi {"operationID": "1698042648332", "api": "/friend/get_black_list", "state": "failed", "cost time": 2, "error": "ApiPost http.Client.Do failed Post \"http://172.105.107.69:9005/friend/get_black_list\": context canceled: 10000 NetworkError"}
I/GoLog (28736): 2023-10-23 06:30:49.448 ERROR [PID:28736] [util/post.go:77] ApiRequest {"operationID": "1698042648333", "type": "network error", "error": "Post \"http://172.105.107.69:9005/group/get_user_req_group_applicationList\": context canceled"}
I/GoLog (28736): 2023-10-23 06:30:49.448 ERROR [PID:28736] [util/post.go:55] CallApi {"operationID": "1698042648333", "api": "/group/get_user_req_group_applicationList", "state": "failed", "cost time": 0, "error": "ApiPost http.Client.Do failed Post \"http://172.105.107.69:9005/group/get_user_req_group_applicationList\": context canceled: 10000 NetworkError"}
I/GoLog (28736): 2023-10-23 06:30:49.448 ERROR [PID:28736] [util/post.go:77] ApiRequest {"operationID": "1698042648332", "type": "network error", "error": "Post \"http://172.105.107.69:9005/friend/get_friend_apply_list\": context canceled"}
I/GoLog (28736): 2023-10-23 06:30:49.448 ERROR [PID:28736] [util/post.go:55] CallApi {"operationID": "1698042648332", "api": "/friend/get_friend_apply_list", "state": "failed", "cost time": 0, "error": "ApiPost http.Client.Do failed Post \"http://172.105.107.69:9005/friend/get_friend_apply_list\": context canceled: 10000 NetworkError"}
I/GoLog (28736): 2023-10-23 06:30:49.448 ERROR [PID:28736] [util/post.go:77] ApiRequest {"operationID": "1698042648333", "type": "network error", "error": "Post \"http://172.105.107.69:9005/user/get_users_info\": context canceled"}
I/GoLog (28736): 2023-10-23 06:30:49.448 ERROR [PID:28736] [util/post.go:55] CallApi {"operationID": "1698042648333", "api": "/user/get_users_info", "state": "failed", "cost time": 0, "error": "ApiPost http.Client.Do failed Post \"http://172.105.107.69:9005/user/get_users_info\": context canceled: 10000 NetworkError"}
I/GoLog (28736): 2023-10-23 06:30:49.449 ERROR [PID:28736] [util/post.go:77] ApiRequest {"operationID": "1698042648332", "type": "network error", "error": "Post \"http://172.105.107.69:9005/friend/get_self_friend_apply_list\": context canceled"}
I/GoLog (28736): 2023-10-23 06:30:49.449 ERROR [PID:28736] [util/post.go:55] CallApi {"operationID": "1698042648332", "api": "/friend/get_self_friend_apply_list", "state": "failed", "cost time": 0, "error": "ApiPost http.Client.Do failed Post \"http://172.105.107.69:9005/friend/get_self_friend_apply_list\": context canceled: 10000 NetworkError"}
I/GoLog (28736): 2023-10-23 06:30:49.449 ERROR [PID:28736] [util/post.go:77] ApiRequest {"operationID": "1698042648333", "type": "network error", "error": "Post \"http://172.105.107.69:9005/friend/get_black_list\": context canceled"}
I/GoLog (28736): 2023-10-23 06:30:49.449 ERROR [PID:28736] [util/post.go:55] CallApi {"operationID": "1698042648333", "api": "/friend/get_black_list", "state": "failed", "cost time": 0, "error": "ApiPost http.Client.Do failed Post \"http://172.105.107.69:9005/friend/get_black_list\": context canceled: 10000 NetworkError"}
I/GoLog (28736): 2023-10-23 06:30:49.449 ERROR [PID:28736] [util/post.go:77] ApiRequest {"operationID": "1698042648332", "type": "network error", "error": "Post \"http://172.105.107.69:9005/group/get_joined_group_list\": context canceled"}
I/GoLog (28736): 2023-10-23 06:30:49.449 ERROR [PID:28736] [util/post.go:77] ApiRequest {"operationID": "1698042648333", "type": "network error", "error": "Post \"http://172.105.107.69:9005/friend/get_friend_list\": context canceled"}
I/GoLog (28736): 2023-10-23 06:30:49.449 ERROR [PID:28736] [util/post.go:55] CallApi {"operationID": "1698042648332", "api": "/group/get_joined_group_list", "state": "failed", "cost time": 0, "error": "ApiPost http.Client.Do failed Post \"http://172.105.107.69:9005/group/get_joined_group_list\": context canceled: 10000 NetworkError"}
I/GoLog (28736): 2023-10-23 06:30:49.449 ERROR [PID:28736] [util/post.go:55] CallApi {"operationID": "1698042648333", "api": "/friend/get_friend_list", "state": "failed", "cost time": 0, "error": "ApiPost http.Client.Do failed Post \"http://172.105.107.69:9005/friend/get_friend_list\": context canceled: 10000 NetworkError"}
I/GoLog (28736): 2023-10-23 06:30:49.449 ERROR [PID:28736] [util/post.go:77] ApiRequest {"operationID": "1698042648333", "type": "network error", "error": "Post \"http://172.105.107.69:9005/friend/get_self_friend_apply_list\": context canceled"}
I/GoLog (28736): 2023-10-23 06:30:49.449 ERROR [PID:28736] [util/post.go:77] ApiRequest {"operationID": "1698042648332", "type": "network error", "error": "Post \"http://172.105.107.69:9005/group/get_recv_group_applicationList\": context canceled"}
I/GoLog (28736): 2023-10-23 06:30:49.449 ERROR [PID:28736] [util/post.go:55] CallApi {"operationID": "1698042648333", "api": "/friend/get_self_friend_apply_list", "state": "failed", "cost time": 0, "error": "ApiPost http.Client.Do failed Post \"http://172.105.107.69:9005/friend/get_self_friend_apply_list\": context canceled: 10000 NetworkError"}
I/GoLog (28736): 2023-10-23 06:30:49.449 ERROR [PID:28736] [util/post.go:77] ApiRequest {"operationID": "1698042648333", "type": "network error", "error": "Post \"http://172.105.107.69:9005/group/get_joined_group_list\": context canceled"}
I/GoLog (28736): 2023-10-23 06:30:49.449 ERROR [PID:28736] [util/post.go:77] ApiRequest {"operationID": "1698042648333", "type": "network error", "error": "Post \"http://172.105.107.69:9005/friend/get_friend_apply_list\": context canceled"}
I/GoLog (28736): 2023-10-23 06:30:49.449 ERROR [PID:28736] [util/post.go:55] CallApi {"operationID": "1698042648333", "api": "/friend/get_friend_apply_list", "state": "failed", "cost time": 0, "error": "ApiPost http.Client.Do failed Post \"http://172.105.107.69:9005/friend/get_friend_apply_list\": context canceled: 10000 NetworkError"}
I/GoLog (28736): 2023-10-23 06:30:49.449 ERROR [PID:28736] [util/post.go:55] CallApi {"operationID": "1698042648333", "api": "/group/get_joined_group_list", "state": "failed", "cost time": 0, "error": "ApiPost http.Client.Do failed Post \"http://172.105.107.69:9005/group/get_joined_group_list\": context canceled: 10000 NetworkError"}
I/GoLog (28736): 2023-10-23 06:30:49.449 ERROR [PID:28736] [util/post.go:77] ApiRequest {"operationID": "1698042648333", "type": "network error", "error": "Post \"http://172.105.107.69:9005/group/get_recv_group_applicationList\": context canceled"}
I/GoLog (28736): 2023-10-23 06:30:49.449 ERROR [PID:28736] [util/post.go:55] CallApi {"operationID": "1698042648333", "api": "/group/get_recv_group_applicationList", "state": "failed", "cost time": 0, "error": "ApiPost http.Client.Do failed Post \"http://172.105.107.69:9005/group/get_recv_group_applicationList\": context canceled: 10000 NetworkError"}
I/F-OpenIMSDK(native call flutter)(28736): { method:conversationListener, type:onSyncServerFailed }
[flutter_openim_sdk] ** Flutter Handler : connectListener {type: onKickedOffline}
[flutter_openim_sdk] ** Flutter Handler : connectListener {type: onConnecting}
[log] [OpenIM] onConnecting
[flutter_openim_sdk] ** Flutter Handler : conversationListener {type: onSyncServerFailed}
I/F-OpenIMSDK(native call flutter)(28736): { method:connectListener, type:onConnectSuccess }
[flutter_openim_sdk] ** Flutter Handler : connectListener {type: onConnectSuccess}
[log] [OpenIM] onConnectSuccess
E/Go (28736): panic: close of closed channel
E/Go (28736):
E/Go (28736): goroutine 136 [running]:
E/Go (28736): github.com/openimsdk/openim-sdk-core/v3/internal/interaction.(*LongConnMgr).writePump.func1()
E/Go (28736): github.com/openimsdk/openim-sdk-core/v3@v3.0.0-00010101000000-000000000000/internal/interaction/long_conn_mgr.go:227 +0x34
E/Go (28736): github.com/openimsdk/openim-sdk-core/v3/internal/interaction.(*LongConnMgr).writePump(0x40004080c0, {0x737cae3a88, 0x40000a16b0})
E/Go (28736): github.com/openimsdk/openim-sdk-core/v3@v3.0.0-00010101000000-000000000000/internal/interaction/long_conn_mgr.go:233 +0x87c
E/Go (28736): created by github.com/openimsdk/openim-sdk-core/v3/internal/interaction.(*LongConnMgr).Run
E/Go (28736): github.com/openimsdk/openim-sdk-core/v3@v3.0.0-00010101000000-000000000000/internal/interaction/long_conn_mgr.go:120 +0x10c
F/libc (28736): Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 28999 (Thread-14), pid 28736 (ouds.tworoamers)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'xiaomi/whyred/whyred:9/PKQ1.180904.001/V12.0.3.0.PEICNXM:user/release-keys'
Revision: '0'
ABI: 'arm64'
pid: 28736, tid: 28999, name: Thread-14 >>> com.shyclouds.tworoamers <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
x0 0000000000000000 x1 0000000000007147 x2 0000000000000006 x3 0000000000000008
x4 0000000000000001 x5 0000000000000000 x6 000000737c15c408 x7 000000000000000a
x8 0000000000000083 x9 000000737cff6260 x10 000000000000007d x11 00000000171fc301
x12 0000000000000018 x13 000000006536131e x14 001a140196388eb0 x15 0000bb0f92becd85
x16 0000007350845b90 x17 0000007350941310 x18 0000000000000008 x19 0000000000007040
x20 0000007350940ee0 x21 0000004000101000 x22 0000000000000001 x23 000000000000005a
x24 0000007350941570 x25 0000007350844000 x26 0000000000000000 x27 00000000000002d0
x28 0000004000612820 x29 0000004000509c68
sp 0000004000509c70 lr 000000737c1da804 pc 000000737c1f5338
backtrace:
#00 pc 0000000000372338 /data/app/com.shyclouds.tworoamers-LSwOgtIL_Ek2su43tMMdSw==/lib/arm64/libgojni.so (offset 0x30e000)
You can try using the latest version 3.4, including the server, to see if the issue persists. In our testing with the new version, we were unable to reproduce this problem.
sdk 3.4.0 Failure to connect to the server causes the APP to become unresponsive.
I/F-OpenIMSDK(native call flutter)(22263): { method:connectListener, type:onConnectSuccess }
I/GoLog (22263): 2023-11-14 05:09:47.440 ERROR [PID:22263] [interaction/msg_sync.go:222] get max seq error {"operationID": "1699938586774", "error": "10000 NetworkError"}
I/F-OpenIMSDK(native call flutter)(22263): { method:connectListener, type:onConnecting }
I/F-OpenIMSDK(native call flutter)(22263): { method:conversationListener, type:onSyncServerStart }
[flutter_openim_sdk] ** Flutter Handler : connectListener {type: onConnecting}
[flutter_openim_sdk] ** Flutter Handler : conversationListener {type: onSyncServerStart}
[flutter_openim_sdk] ** Flutter Handler : conversationListener {type: onSyncServerFailed}
I/GoLog (22263): 2023-11-14 05:09:47.978 WARN [PID:22263] [interaction/long_conn_mgr.go:167] readPump closed {"operationID": "1699938590902101035", "error": "client kicked offline"}
I/F-OpenIMSDK(native call flutter)(22263): { method:connectListener, type:onKickedOffline }
E/Go (22263): panic: close of closed channel
E/Go (22263):
E/Go (22263): goroutine 14 [running]:
E/Go (22263): github.com/openimsdk/openim-sdk-core/v3/internal/interaction.(*LongConnMgr).writePump.func1()
E/Go (22263): github.com/openimsdk/openim-sdk-core/v3@v3.0.0-00010101000000-000000000000/internal/interaction/long_conn_mgr.go:228 +0x34
E/Go (22263): github.com/openimsdk/openim-sdk-core/v3/internal/interaction.(*LongConnMgr).writePump(0x40003b0000, {0x7a486ddce8, 0x4000560480})
E/Go (22263): github.com/openimsdk/openim-sdk-core/v3@v3.0.0-00010101000000-000000000000/internal/interaction/long_conn_mgr.go:234 +0x87c
E/Go (22263): created by github.com/openimsdk/openim-sdk-core/v3/internal/interaction.(*LongConnMgr).Run
E/Go (22263): github.com/openimsdk/openim-sdk-core/v3@v3.0.0-00010101000000-000000000000/internal/interaction/long_conn_mgr.go:120 +0x10c
sing the latest version 3.4, including the server, to see if the issue persists. In our testing with the new version, we were unable to reproduce this problem.
could you provide your server branch version?
sing the latest version 3.4, including the server, to see if the issue persists. In our testing with the new version, we were unable to reproduce this problem.
could you provide your server branch version?
Branch:release-v3.4
sdk 3.4.0 Failure to connect to the server causes the APP to become unresponsive.
I/F-OpenIMSDK(native call flutter)(22263): { method:connectListener, type:onConnectSuccess } I/GoLog (22263): 2023-11-14 05:09:47.440 ERROR [PID:22263] [interaction/msg_sync.go:222] get max seq error {"operationID": "1699938586774", "error": "10000 NetworkError"} I/F-OpenIMSDK(native call flutter)(22263): { method:connectListener, type:onConnecting } I/F-OpenIMSDK(native call flutter)(22263): { method:conversationListener, type:onSyncServerStart } [flutter_openim_sdk] ** Flutter Handler : connectListener {type: onConnecting} [flutter_openim_sdk] ** Flutter Handler : conversationListener {type: onSyncServerStart} [flutter_openim_sdk] ** Flutter Handler : conversationListener {type: onSyncServerFailed} I/GoLog (22263): 2023-11-14 05:09:47.978 WARN [PID:22263] [interaction/long_conn_mgr.go:167] readPump closed {"operationID": "1699938590902101035", "error": "client kicked offline"} I/F-OpenIMSDK(native call flutter)(22263): { method:connectListener, type:onKickedOffline } E/Go (22263): panic: close of closed channel E/Go (22263): E/Go (22263): goroutine 14 [running]: E/Go (22263): github.com/openimsdk/openim-sdk-core/v3/internal/interaction.(*LongConnMgr).writePump.func1() E/Go (22263): github.com/openimsdk/openim-sdk-core/v3@v3.0.0-00010101000000-000000000000/internal/interaction/long_conn_mgr.go:228 +0x34 E/Go (22263): github.com/openimsdk/openim-sdk-core/v3/internal/interaction.(*LongConnMgr).writePump(0x40003b0000, {0x7a486ddce8, 0x4000560480}) E/Go (22263): github.com/openimsdk/openim-sdk-core/v3@v3.0.0-00010101000000-000000000000/internal/interaction/long_conn_mgr.go:234 +0x87c E/Go (22263): created by github.com/openimsdk/openim-sdk-core/v3/internal/interaction.(*LongConnMgr).Run E/Go (22263): github.com/openimsdk/openim-sdk-core/v3@v3.0.0-00010101000000-000000000000/internal/interaction/long_conn_mgr.go:120 +0x10c
I have updated the status order in PR https://github.com/openimsdk/openim-sdk-core/pull/417 to try and fix the issue. Meanwhile, I suspect a concurrent scenario where an old connection was being cleared at the same time as the login interface was being called. This could result in the second login referencing the context of the previous connection, leading to a duplicate close. Could you please provide detailed information about your phone model, the operating system version, and your strategy for handling app callbacks in the foreground? Specifically, do you verify the login status before logging in, or do you follow a different approach? This information will help me pinpoint the issue more accurately.
Thank you for your assistance. If the issue persists, please feel free to join our Slack 🤖 for further communication with me.
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been stalled for 7 days with no activity.
What happened?
app crash on launch
What did you expect to happen?
report direct error message
How can we reproduce it (as minimally and precisely as possible)?
can't reproduce
Anything else we need to know?
No response
version
Cloud provider
OS version
Install tools
Checklist
- [X] ``internal/util/post.go`` ✅ Commit63a64f7
- [X] ``msgtest/module/manager.go`` ✅ Commitf8a3f3d
- [X] ``pkg/network/http_client.go`` ✅ Commit22dec58
- [X] ``internal/group/sync.go`` ✅ Commit96ca38a
- [X] ``test/account.go`` ✅ Commit0675969