open-im-server icon indicating copy to clipboard operation
open-im-server copied to clipboard

[BUG] When the server sends an online message, the client will receive it multiple times~

Open MJLblabla opened this issue 1 year ago • 1 comments

OpenIM Server Version

v3.3.1

Operating System and CPU Architecture

Linux (AMD)

Deployment Method

Source Code Deployment

Bug Description and Steps to Reproduce

服务端发在线消息 isOnlineOnly=true。客户端(网页,安卓)收到多次。 日志: 服务端返回: {"errCode":0,"errMsg":"","errDlt":"","data":{"serverMsgID":"5da291bbdca15340d37b9ffca801d3e4","clientMsgID":"a3fb83278be988946b74d6f54217f044","sendTime":1719817052346}}

安卓端日志: `

2024-07-01 14:57:29.472 13967-14064 GoLog com.blabla.watchdog.admin I 2024-07-01 06:57:29.463 [37mDEBUG[0m [37m[PID:13967][0m [conversation_msg/conversation_msg.go:195] parse message {"operationID": "1646445464564", "conversationID": "sn_imAdmin_uid-10", "msg": "sendID:"imAdmin" recvID:"uid-10" clientMsgID:"a3fb83278be988946b74d6f54217f044" serverMsgID:"5da291bbdca15340d37b9ffca801d3e4" senderPlatformID:10 sessionType:4 msgFrom:200 contentType:1400 content:"{\"detail\":\"{\\\"ex\\\":\\\"asdasd\\\",\\\"externalUrl\\\":\\\"\\\",\\\"mixType\\\":0,\\\"notificationFaceURL\\\":\\\"\\\",\\\"notificationName\\\":\\\"11\\\",\\\"notificationType\\\":1,\\\"text\\\":\\\"离0000\\\"}\"}" sendTime:1719817052346 createTime:1719817052476 options:{key:"conversationUpdate" value:false} options:{key:"history" value:false} options:{key:"offlinePush" value:false} options:{key:"persistent" value:false} options:{key:"senderSync" value:false}"} 2024-07-01 14:57:29.472 13967-14064 GoLog com.blabla.watchdog.admin I 2024-07-01 06:57:29.463 [37mDEBUG[0m [37m[PID:13967][0m [conversation_msg/conversation_msg.go:237] decode message {"operationID": "1646445464564", "msg": {"clientMsgID":"a3fb83278be988946b74d6f54217f044","serverMsgID":"5da291bbdca15340d37b9ffca801d3e4","createTime":1719817052476,"sendTime":1719817052346,"sessionType":4,"sendID":"imAdmin","recvID":"uid-10","msgFrom":200,"contentType":1400,"senderPlatformID":10,"seq":0,"isRead":false,"status":2,"notificationElem":{"detail":"{"ex":"asdasd","externalUrl":"","mixType":0,"notificationFaceURL":"","notificationName":"11","notificationType":1,"text":"离0000"}"},"attachedInfoElem":{"groupHasReadInfo":{"hasReadCount":0,"groupMemberCount":0},"isPrivateChat":false,"burnDuration":0,"hasReadTime":0,"isEncryption":false,"inEncryptStatus":false}}} 2024-07-01 14:57:29.472 13967-14064 GoLog com.blabla.watchdog.admin I 2024-07-01 06:57:29.463 [37mDEBUG[0m [37m[PID:13967][0m [conversation_msg/conversation_msg.go:328] listToMap: {"operationID": "1646445464564", "local conversation": [{"conversationID":"sn_imAdmin_uid-10","conversationType":4,"userID":"imAdmin","groupID":"","showName":"imAdmin","faceURL":"http://localhost:10002/object/imAdmin/截屏2024-06-27 23.56.43.png","recvMsgOpt":0,"unreadCount":10,"groupAtType":0,"latestMsg":"{"clientMsgID":"000bca9573bd54637102e1518cb98db5","serverMsgID":"be4da12778321f0f951d064605751543","createTime":1719816499568,"sendTime":1719816499442,"sessionType":4,"sendID":"imAdmin","recvID":"uid-10","msgFrom":200,"contentType":1400,"senderPlatformID":10,"seq":10,"isRead":false,"status":2,"notificationElem":{"detail":"{\"ex\":\"asdasd\",\"externalUrl\":\"\",\"mixType\":0,\"notificationFaceURL\":\"\",\"notificationName\":\"11\",\"notificationType\":1,\"text\":\"离0000\"}"},"attachedInfoElem":{"groupH 2024-07-01 14:57:29.472 13967-14064 GoLog com.blabla.watchdog.admin I asReadInfo":{"hasReadCount":0,"groupMemberCount":0},"isPrivateChat":false,"burnDuration":0,"hasReadTime":0,"isEncryption":false,"inEncryptStatus":false}}","latestMsgSendTime":1719816499442,"draftText":"","draftTextTime":0,"isPinned":false,"isPrivateChat":false,"burnDuration":0,"isNotInGroup":false,"updateUnreadCountTime":0,"attachedInfo":"","ex":"","maxSeq":0,"minSeq":0,"hasReadSeq":0,"msgDestructTime":0,"isMsgDestruct":false}], "generated c map": {}} 2024-07-01 14:57:29.472 13967-14064 GoLog com.blabla.watchdog.admin I 2024-07-01 06:57:29.463 [34mINFO[0m [34m[PID:13967][0m [conversation_msg/conversation_msg.go:330] trigger map is : {"operationID": "1646445464564", "newConversations": {}, "changedConversations": {}} 2024-07-01 14:57:29.472 13967-14064 GoLog com.blabla.watchdog.admin I 2024-07-01 06:57:29.464 [37mDEBUG[0m [37m[PID:13967][0m [conversation_msg/conversation_msg.go:399] insert msg {"operationID": "1646445464564", "cost time": 0.000909833, "len": 1} 2024-07-01 14:57:29.472 13967-14064 GoLog com.blabla.watchdog.admin I 2024-07-01 06:57:29.464 [37mDEBUG[0m [37m[PID:13967][0m [conversation_msg/conversation_notification.go:51] NotificationCmd end {"operationID": "1646445464564", "cmd": "005", "value": {"Msgs":{"sn_imAdmin_uid-10":{"Msgs":[{"sendID":"imAdmin","recvID":"uid-10","groupID":"","clientMsgID":"a3fb83278be988946b74d6f54217f044","serverMsgID":"5da291bbdca15340d37b9ffca801d3e4","senderPlatformID":10,"senderNickname":"","senderFaceURL":"","sessionType":4,"msgFrom":200,"contentType":1400,"content":"eyJkZXRhaWwiOiJ7XCJleFwiOlwiYXNkYXNkXCIsXCJleHRlcm5hbFVybFwiOlwiXCIsXCJtaXhUeXBlXCI6MCxcIm5vdGlmaWNhdGlvbkZhY2VVUkxcIjpcIlwiLFwibm90aWZpY2F0aW9uTmFtZVwiOlwiMTFcIixcIm5vdGlmaWNhdGlvblR5cGVcIjoxLFwidGV4dFwiOlwi56a7MDAwMFwifSJ9","seq":0,"sendTime":1719817052346,"createTime":1719817052476,"status":0,"isRead":false,"options":{"conversationUpdate":false,"history":false,"offlinePush":false,"persistent":false,"senderSync":false},"offlinePushInfo":null,"atUserIDList":null,"attachedInfo":"","ex":""}],"isEnd":false}},"SyncFlag":0}} 2024-07-01 14:57:29.472 13967-14064 GoLog com.blabla.watchdog.admin I 2024-07-01 06:57:29.464 [37mDEBUG[0m [37m[PID:13967][0m [conversation_msg/conversation_notification.go:33] NotificationCmd start {"operationID": "1646445464564", "cmd": "005", "value": {"Msgs":{"sn_imAdmin_uid-10":{"Msgs":[{"sendID":"imAdmin","recvID":"uid-10","groupID":"","clientMsgID":"a3fb83278be988946b74d6f54217f044","serverMsgID":"5da291bbdca15340d37b9ffca801d3e4","senderPlatformID":10,"senderNickname":"","senderFaceURL":"","sessionType":4,"msgFrom":200,"contentType":1400,"content":"eyJkZXRhaWwiOiJ7XCJleFwiOlwiYXNkYXNkXCIsXCJleHRlcm5hbFVybFwiOlwiXCIsXCJtaXhUeXBlXCI6MCxcIm5vdGlmaWNhdGlvbkZhY2VVUkxcIjpcIlwiLFwibm90aWZpY2F0aW9uTmFtZVwiOlwiMTFcIixcIm5vdGlmaWNhdGlvblR5cGVcIjoxLFwidGV4dFwiOlwi56a7MDAwMFwifSJ9","seq":0,"sendTime":1719817052346,"createTime":1719817052476,"status":0,"isRead":false,"options":{"conversationUpdate":false,"history":false,"offlinePush":false,"persistent":false,"senderSync":false},"offlinePushInfo":null,"atUserIDList":null,"attachedInfo":"","ex":""}],"isEnd":false}},"SyncFlag":0}} 2024-07-01 14:57:29.472 13967-14064 GoLog com.blabla.watchdog.admin I 2024-07-01 06:57:29.464 [37mDEBUG[0m [37m[PID:13967][0m [conversation_msg/conversation_msg.go:186] message come here conversation ch {"operationID": "1646445464564", "conversation length": 1} 2024-07-01 14:57:29.472 13967-14064 GoLog com.blabla.watchdog.admin I 2024-07-01 06:57:29.464 [37mDEBUG[0m [37m[PID:13967][0m [conversation_msg/conversation_msg.go:190] parse message in one conversation {"operationID": "1646445464564", "conversationID": "sn_imAdmin_uid-10", "message length": 1} 2024-07-01 14:57:29.472 13967-14064 GoLog com.blabla.watchdog.admin I 2024-07-01 06:57:29.464 [37mDEBUG[0m [37m[PID:13967][0m [conversation_msg/conversation_msg.go:195] parse message {"operationID": "1646445464564", "conversationID": "sn_imAdmin_uid-10", "msg": "sendID:"imAdmin" recvID:"uid-10" clientMsgID:"a3fb83278be988946b74d6f54217f044" serverMsgID:"5da291bbdca15340d37b9ffca801d3e4" senderPlatformID:10 sessionType:4 msgFrom:200 contentType:1400 content:"{\"detail\":\"{\\\"ex\\\":\\\"asdasd\\\",\\\"externalUrl\\\":\\\"\\\",\\\"mixType\\\":0,\\\"notificationFaceURL\\\":\\\"\\\",\\\"notificationName\\\":\\\"11\\\",\\\"notificationType\\\":1,\\\"text\\\":\\\"离0000\\\"}\"}" sendTime:1719817052346 createTime:1719817052476 options:{key:"conversationUpdate" value:false} options:{key:"history" value:false} options:{key:"offlinePush" value:false} options:{key:"persistent" value:false} options:{key:"senderSync" value:false}"} 2024-07-01 14:57:29.472 13967-14064 GoLog com.blabla.watchdog.admin I 2024-07-01 06:57:29.464 [37mDEBUG[0m [37m[PID:13967][0m [conversation_msg/conversation_msg.go:237] decode message {"operationID": "1646445464564", "msg": {"clientMsgID":"a3fb83278be988946b74d6f54217f044","serverMsgID":"5da291bbdca15340d37b9ffca801d3e4","createTime":1719817052476,"sendTime":1719817052346,"sessionType":4,"sendID":"imAdmin","recvID":"uid-10","msgFrom":200,"contentType":1400,"senderPlatformID":10,"seq":0,"isRead":false,"status":2,"notificationElem":{"detail":"{"ex":"asdasd","externalUrl":"","mixType":0,"notificationFaceURL":"","notificationName":"11","notificationType":1,"text":"离0000"}"},"attachedInfoElem":{"groupHasReadInfo":{"hasReadCount":0,"groupMemberCount":0},"isPrivateChat":false,"burnDuration":0,"hasReadTime":0,"isEncryption":false,"inEncryptStatus":false}}} 2024-07-01 14:57:29.472 13967-14064 GoLog com.blabla.watchdog.admin I 2024-07-01 06:57:29.465 [37mDEBUG[0m [37m[PID:13967][0m [conversation_msg/conversation_msg.go:328] listToMap: {"operationID": "1646445464564", "local conversation": [{"conversationID":"sn_imAdmin_uid-10","conversationType":4,"userID":"imAdmin","groupID":"","showName":"imAdmin","faceURL":"http://localhost:10002/object/imAdmin/截屏2024-06-27 23.56.43.png","recvMsgOpt":0,"unreadCount":10,"groupAtType":0,"latestMsg":"{"clientMsgID":"000bca9573bd54637102e1518cb98db5","serverMsgID":"be4da12778321f0f951d064605751543","createTime":1719816499568,"sendTime":1719816499442,"sessionType":4,"sendID":"imAdmin","recvID":"uid-10","msgFrom":200,"contentType":1400,"senderPlatformID":10,"seq":10,"isRead":false,"status":2,"notificationElem":{"detail":"{\"ex\":\"asdasd\",\"externalUrl\":\"\",\"mixType\":0,\"notificationFaceURL\":\"\",\"notificationName\":\"11\",\"notificationType\":1,\"text\":\"离0000\"}"},"attachedInfoElem":{"groupH 2024-07-01 14:57:29.472 13967-14064 GoLog com.blabla.watchdog.admin I asReadInfo":{"hasReadCount":0,"groupMemberCount":0},"isPrivateChat":false,"burnDuration":0,"hasReadTime":0,"isEncryption":false,"inEncryptStatus":false}}","latestMsgSendTime":1719816499442,"draftText":"","draftTextTime":0,"isPinned":false,"isPrivateChat":false,"burnDuration":0,"isNotInGroup":false,"updateUnreadCountTime":0,"attachedInfo":"","ex":"","maxSeq":0,"minSeq":0,"hasReadSeq":0,"msgDestructTime":0,"isMsgDestruct":false}], "generated c map": {}} 2024-07-01 14:57:29.472 13967-14064 GoLog com.blabla.watchdog.admin I 2024-07-01 06:57:29.465 [34mINFO[0m [34m[PID:13967][0m [conversation_msg/conversation_msg.go:330] trigger map is : {"operationID": "1646445464564", "newConversations": {}, "changedConversations": {}} 2024-07-01 14:57:29.472 13967-13967 RTM com.blabla.watchdog.admin D onRecvOnlineOnlyMessage - {"clientMsgID":"a3fb83278be988946b74d6f54217f044","serverMsgID":"5da291bbdca15340d37b9ffca801d3e4","createTime":1719817052476,"sendTime":1719817052346,"sessionType":4,"sendID":"imAdmin","recvID":"uid-10","msgFrom":200,"contentType":1400,"senderPlatformID":10,"seq":0,"isRead":false,"status":2,"notificationElem":{"detail":"{"ex":"asdasd","externalUrl":"","mixType":0,"notificationFaceURL":"","notificationName":"11","notificationType":1,"text":"离0000"}"},"attachedInfoElem":{"groupHasReadInfo":{"hasReadCount":0,"groupMemberCount":0},"isPrivateChat":false,"burnDuration":0,"hasReadTime":0,"isEncryption":false,"inEncryptStatus":false}} 2024-07-01 14:57:29.477 13967-13967 RTM com.blabla.watchdog.admin D onRecvOnlineOnlyMessage - {"clientMsgID":"a3fb83278be988946b74d6f54217f044","serverMsgID":"5da291bbdca15340d37b9ffca801d3e4","createTime":1719817052476,"sendTime":1719817052346,"sessionType":4,"sendID":"imAdmin","recvID":"uid-10","msgFrom":200,"contentType":1400,"senderPlatformID":10,"seq":0,"isRead":false,"status":2,"notificationElem":{"detail":"{"ex":"asdasd","externalUrl":"","mixType":0,"notificationFaceURL":"","notificationName":"11","notificationType":1,"text":"离0000"}"},"attachedInfoElem":{"groupHasReadInfo":{"hasReadCount":0,"groupMemberCount":0},"isPrivateChat":false,"burnDuration":0,"hasReadTime":0,"isEncryption":false,"inEncryptStatus":false}} 2024-07-01 14:57:29.477 13967-13967 RTM com.blabla.watchdog.admin D onRecvOnlineOnlyMessage - {"clientMsgID":"a3fb83278be988946b74d6f54217f044","serverMsgID":"5da291bbdca15340d37b9ffca801d3e4","createTime":1719817052476,"sendTime":1719817052346,"sessionType":4,"sendID":"imAdmin","recvID":"uid-10","msgFrom":200,"contentType":1400,"senderPlatformID":10,"seq":0,"isRead":false,"status":2,"notificationElem":{"detail":"{"ex":"asdasd","externalUrl":"","mixType":0,"notificationFaceURL":"","notificationName":"11","notificationType":1,"text":"离0000"}"},"attachedInfoElem":{"groupHasReadInfo":{"hasReadCount":0,"groupMemberCount":0},"isPrivateChat":false,"burnDuration":0,"hasReadTime":0,"isEncryption":false,"inEncryptStatus":false}} 2024-07-01 14:57:29.478 13967-13967 RTM com.blabla.watchdog.admin D onRecvOnlineOnlyMessage - {"clientMsgID":"a3fb83278be988946b74d6f54217f044","serverMsgID":"5da291bbdca15340d37b9ffca801d3e4","createTime":1719817052476,"sendTime":1719817052346,"sessionType":4,"sendID":"imAdmin","recvID":"uid-10","msgFrom":200,"contentType":1400,"senderPlatformID":10,"seq":0,"isRead":false,"status":2,"notificationElem":{"detail":"{"ex":"asdasd","externalUrl":"","mixType":0,"notificationFaceURL":"","notificationName":"11","notificationType":1,"text":"离0000"}"},"attachedInfoElem":{"groupHasReadInfo":{"hasReadCount":0,"groupMemberCount":0},"isPrivateChat":false,"burnDuration":0,"hasReadTime":0,"isEncryption":false,"inEncryptStatus":false}} 2024-07-01 14:57:29.479 13967-13967 RTM com.blabla.watchdog.admin D onRecvOnlineOnlyMessage - {"clientMsgID":"a3fb83278be988946b74d6f54217f044","serverMsgID":"5da291bbdca15340d37b9ffca801d3e4","createTime":1719817052476,"sendTime":1719817052346,"sessionType":4,"sendID":"imAdmin","recvID":"uid-10","msgFrom":200,"contentType":1400,"senderPlatformID":10,"seq":0,"isRead":false,"status":2,"notificationElem":{"detail":"{"ex":"asdasd","externalUrl":"","mixType":0,"notificationFaceURL":"","notificationName":"11","notificationType":1,"text":"离0000"}"},"attachedInfoElem":{"groupHasReadInfo":{"hasReadCount":0,"groupMemberCount":0},"isPrivateChat":false,"burnDuration":0,"hasReadTime":0,"isEncryption":false,"inEncryptStatus":false}} 2024-07-01 14:57:29.479 13967-13967 RTM com.blabla.watchdog.admin D onRecvOnlineOnlyMessage - {"clientMsgID":"a3fb83278be988946b74d6f54217f044","serverMsgID":"5da291bbdca15340d37b9ffca801d3e4","createTime":1719817052476,"sendTime":1719817052346,"sessionType":4,"sendID":"imAdmin","recvID":"uid-10","msgFrom":200,"contentType":1400,"senderPlatformID":10,"seq":0,"isRead":false," `

Screenshots Link

No response

MJLblabla avatar Jul 01 '24 07:07 MJLblabla

this issue has fixed in release-v3.8, I recommend you update to new version. If you run into any new issues, please reopen this issue or create a new one.

skiffer-git avatar Sep 27 '24 07:09 skiffer-git