Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

支持同步其他客户端入群 #478

Closed
sandtechnology opened this issue Jul 31, 2020 · 5 comments · Fixed by #804
Closed

支持同步其他客户端入群 #478

sandtechnology opened this issue Jul 31, 2020 · 5 comments · Fixed by #804
Labels
M 优先级: 主要 t:feature 类型: 新特性 x:protocol 属性: 协议相关
Milestone

Comments

@sandtechnology
Copy link
Collaborator

sandtechnology commented Jul 31, 2020

Exception in NetworkHandler
java.util.NoSuchElementException: group (群号)
        at net.mamoe.mirai.Bot.getGroup(Bot.kt:178)
        at net.mamoe.mirai.qqandroid.network.protocol.packet.chat.receive.OnlinePushReqPush$decode$packets$1.invoke(OnlinePush.ReqPush.kt:84)
        at net.mamoe.mirai.qqandroid.network.protocol.packet.chat.receive.OnlinePushReqPush$decode$packets$1.invoke(OnlinePush.ReqPush.kt:61)
        at net.mamoe.mirai.qqandroid.network.protocol.packet.chat.receive.OnlinePushReqPush$deco$2.invoke(OnlinePush.ReqPush.kt:72)
        at net.mamoe.mirai.qqandroid.network.protocol.packet.chat.receive.OnlinePushReqPush$deco$2.invoke(OnlinePush.ReqPush.kt:61)
        at kotlin.sequences.FlatteningSequence$iterator$1.ensureItemIterator(Sequences.kt:277)
        at kotlin.sequences.FlatteningSequence$iterator$1.hasNext(Sequences.kt:265)
        at net.mamoe.mirai.qqandroid.network.QQAndroidBotNetworkHandler$generifiedParsePacket$2.invokeSuspend(QQAndroidBotNetworkHandler.kt:698)
        at net.mamoe.mirai.qqandroid.network.QQAndroidBotNetworkHandler$generifiedParsePacket$2.invoke(QQAndroidBotNetworkHandler.kt)
        at net.mamoe.mirai.qqandroid.network.protocol.packet.KnownPacketFactories.handleIncomingPacket$mirai_core_qqandroid(PacketFactory.kt:270)
        at net.mamoe.mirai.qqandroid.network.protocol.packet.KnownPacketFactories.parseIncomingPacket(PacketFactory.kt:228)
        at net.mamoe.mirai.qqandroid.network.QQAndroidBotNetworkHandler.generifiedParsePacket(QQAndroidBotNetworkHandler.kt:468)
        at net.mamoe.mirai.qqandroid.network.QQAndroidBotNetworkHandler.parsePacket(QQAndroidBotNetworkHandler.kt:463)
        at net.mamoe.mirai.qqandroid.network.QQAndroidBotNetworkHandler$parsePacketAsync$1.invokeSuspend(QQAndroidBotNetworkHandler.kt:452)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)


复现

1.使用TIM加入其他群
2.在新群发言
3.报错

版本

mirai: 1.1.2

@sandtechnology sandtechnology added the t:problem 类型: 不容易归类为特性或 bug 的综合问题 label Jul 31, 2020
@ryoii
Copy link
Member

ryoii commented Jul 31, 2020

能否复现,简单描述下复现方式

@mzdluo123
Copy link
Member

有更详细的log吗,比如network之类的

@Him188 Him188 added the x:question 标签: 需要更多信息 label Jul 31, 2020
@sandtechnology
Copy link
Collaborator Author

可以复现,但是报错无法复现,详细的log如下:

2020-07-31 21:55:13 V/Net (机器人账号): Send: Heartbeat.Alive
2020-07-31 21:55:13 V/Net (机器人账号): Recv: Heartbeat.Alive.Response
2020-07-31 21:55:43 D/Net (机器人账号): Received unknown commandName: MessageSvc.PushReaded
2020-07-31 21:56:08 V/Net (机器人账号): Send: MessageSvc.PbGetMsg
2020-07-31 21:56:08 V/Net (机器人账号): Send: OnlinePush.RespPush
2020-07-31 21:56:08 V/Net (机器人账号): Send: MessageSvc.PbDeleteMsg
2020-07-31 21:56:08 D/Net (机器人账号): unknown PbGetMsg type 528, data=08 34 12 5C 0A 5A 08 03 12 12 10 50 1A 0E 63 61 70 74 63 68 61 2E 71 71 2E 63 6F 6D 18 01 20 B0 09 28 01 32 00 38 00 42 09 69 63 6F 6E 73 2E 70 6E 67 48 90 4E 52 1A 00 06 00 01 00 00 00 08 30 00 03 71 5F 24 20 57 0A E7 0B A1 46 51 0A F1 72 A9 58 01 60 02 72 00 98 01 00 A0 01 00 B8 01 02
2020-07-31 21:56:08 D/Net (机器人账号): unknown PbGetMsg type 528, data=08 1D 12 2B 08 14 A2 01 26 08 D9 C8 AD B7 0B 12 12 08 A2 9C 01 12 0C E5 A4 A7 E5 A8 81 E5 A4 A9 E9 BE 99 12 0A 08 BF 9C 01 12 04 07 6C 01 01
2020-07-31 21:56:10 V/Bot (机器人账号): (之前群的群聊消息)
2020-07-31 21:56:13 V/Net (机器人账号): Send: Heartbeat.Alive
2020-07-31 21:56:13 V/Net (机器人账号): Recv: Heartbeat.Alive.Response
2020-07-31 21:56:16 V/Net (机器人账号): Send: OnlinePush.RespPush
2020-07-31 21:56:18 D/Net (机器人账号): Received unknown commandName: MessageSvc.PushReaded
2020-07-31 21:56:18 D/Net (机器人账号): Received unknown commandName: MessageSvc.PushReaded
2020-07-31 21:56:26 V/Net (机器人账号): Send: OnlinePush.RespPush
2020-07-31 21:56:29 D/Net (机器人账号): Received unknown commandName: MessageSvc.PushReaded
2020-07-31 21:56:34 V/Net (机器人账号): Send: OnlinePush.RespPush
2020-07-31 21:56:49 D/Net (机器人账号): Received unknown commandName: MessageSvc.PushReaded
2020-07-31 21:57:01 D/Net (机器人账号): Received unknown commandName: MessageSvc.PushReaded
2020-07-31 21:57:13 V/Net (机器人账号): Send: Heartbeat.Alive
2020-07-31 21:57:13 V/Net (机器人账号): Recv: Heartbeat.Alive.Response
2020-07-31 21:58:13 V/Net (机器人账号): Send: Heartbeat.Alive
2020-07-31 21:58:13 V/Net (机器人账号): Recv: Heartbeat.Alive.Response
2020-07-31 21:58:19 V/Bot (机器人账号): (之前群的群聊消息)
2020-07-31 21:58:32 D/Net (机器人账号): Received unknown commandName: MessageSvc.PushReaded
2020-07-31 21:58:35 V/Bot (机器人账号): (之前群的群聊消息)
2020-07-31 21:58:52 D/Net (机器人账号): Received unknown commandName: MessageSvc.PushReaded
2020-07-31 21:59:10 D/Net (机器人账号): Received unknown commandName: MessageSvc.PushReaded
2020-07-31 21:59:12 D/Net (机器人账号): Received unknown commandName: MessageSvc.PushReaded
2020-07-31 21:59:13 V/Net (机器人账号): Send: Heartbeat.Alive
2020-07-31 21:59:14 V/Net (机器人账号): Recv: Heartbeat.Alive.Response
2020-07-31 21:59:22 D/Net (机器人账号): Received unknown commandName: MessageSvc.PushReaded
2020-07-31 21:59:38 V/Bot (机器人账号): (之前群的群聊消息)
2020-07-31 21:59:43 V/Bot (机器人账号): (之前群的群聊消息)
2020-07-31 22:00:14 V/Net (机器人账号): Send: Heartbeat.Alive
2020-07-31 22:00:14 V/Net (机器人账号): Recv: Heartbeat.Alive.Response
2020-07-31 22:00:31 V/Bot (机器人账号): (之前群的群聊消息)
2020-07-31 22:00:41 D/Net (机器人账号): Received unknown commandName: MessageSvc.PushReaded
2020-07-31 22:00:44 D/Net (机器人账号): Received unknown commandName: MessageSvc.PushReaded
2020-07-31 22:00:47 D/Net (机器人账号): Received unknown commandName: MessageSvc.PushReaded
2020-07-31 22:00:58 V/Bot (机器人账号): (之前群的群聊消息)
2020-07-31 22:01:14 V/Net (机器人账号): Send: Heartbeat.Alive
2020-07-31 22:01:14 V/Net (机器人账号): Recv: Heartbeat.Alive.Response
2020-07-31 22:01:53 V/Net (机器人账号): Send: OnlinePush.RespPush
2020-07-31 22:02:00 V/Bot (机器人账号): (之前群的群聊消息)
2020-07-31 22:02:01 V/Net (机器人账号): Send: OnlinePush.RespPush

@Him188
Copy link
Member

Him188 commented Aug 1, 2020

日志中并没有入群

@Him188 Him188 changed the title 其他客户端入群会导致mirai无法获取新群消息 支持同步其他客户端入群 Aug 1, 2020
@Him188 Him188 added t:feature 类型: 新特性 N 优先级: 一般 x:protocol 属性: 协议相关 and removed t:problem 类型: 不容易归类为特性或 bug 的综合问题 x:question 标签: 需要更多信息 labels Aug 1, 2020
@Him188 Him188 added this to the 1.4.0 milestone Aug 1, 2020
@sandtechnology
Copy link
Collaborator Author

日志中并没有入群

但是确实是入群了的,重启mirai即可获取新群消息

@Him188 Him188 added M 优先级: 主要 and removed N 优先级: 一般 labels Dec 25, 2020
sandtechnology added a commit to sandtechnology/mirai that referenced this issue Jan 2, 2021
Him188 added a commit that referenced this issue Jan 5, 2021
…ite event (#804)

* Introduce UserInfo and change uin to id

* Stranger api: List and asStranger

* Stranger api: Events

* Stranger api: MessageDSL and MessageSource

* Update docs

* Improve LoginSolver

fix project-mirai/mirai-login-solver-selenium#4

* Improve SeleniumLoginSolver loading

* Fix MessageChain.fragmented

* 2.0-M2-1

* Stranger api change: StrangerRelationChangeEvent

* Stranger impl: list and asStranger

* Stranger impl: get stranger list and del stranger protocol

* Stranger impl: add stranger protocol

* Stranger impl: MessageSource refactor and sending&receiving message

* Stranger impl: Dropping long message support (server rejected)

* Stranger impl: sending stranger message when member is stranger

* Fix wrong key

Co-authored-by: Him188 <Him188@mamoe.net>

* Add @LowLevelApi

Co-authored-by: Him188 <Him188@mamoe.net>

* Remove redundant val modifier

* Replace nudge if statement to when statement

* Move list seq to QQAndroidClient

* Replace id with uin in UserInfo and fix build error

* Using by lazy in asStranger

* Fix wrong wordings

* Fix wrong wordings in uploading image

* Fix nudge

* Fix #478, sync other client join group

* Change to NormalMember and update toString method

Co-authored-by: Karlatemp <karlatemp@vip.qq.com>

* Launch on bot network scope

Co-authored-by: Him188 <Him188@mamoe.net>

* Fix TarsDecoder

fix #762

* Fix TarsInput.skipField

Co-authored-by: Him188 <Him188@mamoe.net>
Co-authored-by: Karlatemp <karlatemp@vip.qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
M 优先级: 主要 t:feature 类型: 新特性 x:protocol 属性: 协议相关
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants