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

无法正常解析邀请机器人进群的富文本消息 #220

Closed
sandtechnology opened this issue Apr 11, 2020 · 6 comments
Closed

无法正常解析邀请机器人进群的富文本消息 #220

sandtechnology opened this issue Apr 11, 2020 · 6 comments
Labels
M 优先级: 主要 t:bug 类型: bug x:protocol 属性: 协议相关
Milestone

Comments

@sandtechnology
Copy link
Collaborator

问题

Network(xxxxx) 12:10:56 : unknown PbGetMsg type 87
java.util.zip.DataFormatException: incorrect header check
at java.util.zip.Inflater.inflateBytes(Native Method)
at java.util.zip.Inflater.inflate(Inflater.java:259)
at java.util.zip.Inflater.inflate(Inflater.java:280)
at net.mamoe.mirai.qqandroid.utils.MiraiPlatformUtils.unzip(MiraiPlatformUtils.kt:30)
at net.mamoe.mirai.qqandroid.utils.MiraiPlatformUtils.unzip$default(MiraiPlatformUtils.kt)
at net.mamoe.mirai.qqandroid.message.ConvensionKt.joinToMessageChain(convension.kt:289)
at net.mamoe.mirai.qqandroid.message.ConvensionKt.toMessageChain(convension.kt:197)
at net.mamoe.mirai.qqandroid.message.ConvensionKt.toMessageChain$default(convension.kt:184)
at net.mamoe.mirai.qqandroid.network.protocol.packet.chat.receive.MessageSvc$PbGetMsg$decode$$inlined$mapNotNull$1$2.emit(Collect.kt:178)
at kotlinx.coroutines.flow.FlowKt__BuildersKt$asFlow$$inlined$unsafeFlow$3.collect(SafeCollector.common.kt:115)
at kotlinx.coroutines.flow.FlowKt__MergeKt$flattenConcat$$inlined$unsafeFlow$1$lambda$1.emit(Collect.kt:138)
at kotlinx.coroutines.flow.FlowKt__MergeKt$flatMapConcat$$inlined$map$1$2.emit(Collect.kt:138)
at net.mamoe.mirai.qqandroid.network.protocol.packet.chat.receive.MessageSvc$PbGetMsg$decode$$inlined$filterNot$1$2.emit(Collect.kt:140)
at kotlinx.coroutines.flow.FlowKt__BuildersKt$asFlow$$inlined$unsafeFlow$3.collect(SafeCollector.common.kt:115)
at net.mamoe.mirai.qqandroid.network.protocol.packet.chat.receive.MessageSvc$PbGetMsg$decode$$inlined$filterNot$1.collect(SafeCollector.common.kt:114)
at kotlinx.coroutines.flow.FlowKt__MergeKt$flatMapConcat$$inlined$map$1.collect(SafeCollector.common.kt:114)
at kotlinx.coroutines.flow.FlowKt__MergeKt$flattenConcat$$inlined$unsafeFlow$1.collect(SafeCollector.common.kt:114)
at net.mamoe.mirai.qqandroid.network.protocol.packet.chat.receive.MessageSvc$PbGetMsg$decode$$inlined$mapNotNull$1.collect(SafeCollector.common.kt:114)
at kotlinx.coroutines.flow.FlowKt__CollectionKt.toCollection(Collection.kt:32)
at kotlinx.coroutines.flow.FlowKt.toCollection(Unknown Source)
at kotlinx.coroutines.flow.FlowKt__CollectionKt.toList(Collection.kt:15)
at kotlinx.coroutines.flow.FlowKt.toList(Unknown Source)
at kotlinx.coroutines.flow.FlowKt__CollectionKt.toList$default(Collection.kt:15)
at kotlinx.coroutines.flow.FlowKt.toList$default(Unknown Source)
at net.mamoe.mirai.qqandroid.network.protocol.packet.chat.receive.MessageSvc$PbGetMsg.decode(MessageSvc.kt:314)
at net.mamoe.mirai.qqandroid.network.protocol.packet.KnownPacketFactories.handleIncomingPacket$mirai_core_qqandroid(PacketFactory.kt:483)
at net.mamoe.mirai.qqandroid.network.protocol.packet.KnownPacketFactories.parseIncomingPacket(PacketFactory.kt:224)
at net.mamoe.mirai.qqandroid.network.QQAndroidBotNetworkHandler.generifiedParsePacket(QQAndroidBotNetworkHandler.kt:392)
at net.mamoe.mirai.qqandroid.network.QQAndroidBotNetworkHandler.parsePacket(QQAndroidBotNetworkHandler.kt:387)
at net.mamoe.mirai.qqandroid.network.QQAndroidBotNetworkHandler$parsePacketAsync$1.invokeSuspend(QQAndroidBotNetworkHandler.kt:372)
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.邀请机器人进群
2.第一次报错
3.第二次正常

@sandtechnology sandtechnology added the t:bug 类型: bug label Apr 11, 2020
@Him188
Copy link
Member

Him188 commented Apr 11, 2020

这是解析长消息,xml等消息时出错

@sandtechnology
Copy link
Collaborator Author

应该是xml消息 手机登录发现私聊有邀请进群的私聊消息

@Him188 Him188 added N 优先级: 一般 x:protocol 属性: 协议相关 labels Apr 11, 2020
@Him188 Him188 added this to the mirai-core 1.0.0 milestone Apr 11, 2020
@Him188 Him188 added M 优先级: 主要 and removed N 优先级: 一般 labels Apr 11, 2020
Him188 added a commit that referenced this issue Apr 15, 2020
@sandtechnology
Copy link
Collaborator Author

java.lang.IllegalStateException: 在 解析 richMsg 时遇到了意料之中的问题. 请完整复制此日志提交给 mirai. 调试信息: 00 3C 3F 78 6D 6C 20 76 65 72 73 69 6F 6E 3D 27 31 2E 30 27 20 65 6E 63 6F 64 69 6E 67 3D 27 55 54 46 2D 38 27 20 73 74 61 6E 64 61 6C 6F 6E 65 3D 27 79 65 73 27 20 3F 3E 3C 6D 73 67 20 73 65 72 76 69 63 65 49 44 3D 22 31 32 38 22 20 74 65 6D 70 6C 61 74 65 49 44 3D 22 31 32 33 34 35 22 20 61 63 74 69 6F 6E 3D 22 6E 61 74 69 76 65 22 20 62 72 69 65 66 3D 22 5B E9 93 BE E6 8E A5 5D E9 82 80 E8 AF B7 E4 BD A0 E5 8A A0 E5 85 A5 E7 BE A4 E8 81 8A 22 20 73 6F 75 72 63 65 4D 73 67 49 64 3D 22 30 22 20 75 72 6C 3D 22 22 3E 3C 69 74 65 6D 20 6C 61 79 6F 75 74 3D 22 32 22 3E 3C 70 69 63 74 75 72 65 20 63 6F 76 65 72 3D 22 22 2F 3E 3C 74 69 74 6C 65 3E E9 82 80 E8 AF B7 E4 BD A0 E5 8A A0 E5 85 A5 E7 BE A4 E8 81 8A 3C 2F 74 69 74 6C 65 3E 3C 73 75 6D 6D 61 72 79 20 2F 3E 3C 2F 69 74 65 6D 3E 3C 64 61 74 61 20 67 72 6F 75 70 63 6F 64 65 3D 22 36 35 35 30 35 37 31 32 37 22 20 67 72 6F 75 70 6E 61 6D 65 3D 22 6D 69 72 61 69 22 20 6D 73 67 73 65 71 3D 22 31 35 38 36 39 34 31 36 33 31 36 37 32 39 39 36 22 20 6D 73 67 74 79 70 65 3D 22 32 22 2F 3E 3C 2F 6D 73 67 3E
	at net.mamoe.mirai.qqandroid.message.ConvensionKt.contextualBugReportException(convension.kt:411)
	at net.mamoe.mirai.qqandroid.message.ConvensionKt.joinToMessageChain(convension.kt:281)
	at net.mamoe.mirai.qqandroid.message.ConvensionKt.toMessageChain(convension.kt:194)
	at net.mamoe.mirai.qqandroid.message.ConvensionKt.toMessageChain$default(convension.kt:180)
	at net.mamoe.mirai.qqandroid.network.protocol.packet.chat.receive.MessageSvc$PbGetMsg$decode$$inlined$mapNotNull$1$2.emit(Collect.kt:178)
	at kotlinx.coroutines.flow.FlowKt__BuildersKt$asFlow$$inlined$unsafeFlow$3.collect(SafeCollector.common.kt:115)
	at kotlinx.coroutines.flow.FlowKt__MergeKt$flattenConcat$$inlined$unsafeFlow$1$lambda$1.emit(Collect.kt:138)
	at kotlinx.coroutines.flow.FlowKt__MergeKt$flatMapConcat$$inlined$map$1$2.emit(Collect.kt:138)
	at net.mamoe.mirai.qqandroid.network.protocol.packet.chat.receive.MessageSvc$PbGetMsg$decode$$inlined$filterNot$1$2.emit(Collect.kt:140)
	at kotlinx.coroutines.flow.FlowKt__BuildersKt$asFlow$$inlined$unsafeFlow$3.collect(SafeCollector.common.kt:115)
	at net.mamoe.mirai.qqandroid.network.protocol.packet.chat.receive.MessageSvc$PbGetMsg$decode$$inlined$filterNot$1.collect(SafeCollector.common.kt:114)
	at kotlinx.coroutines.flow.FlowKt__MergeKt$flatMapConcat$$inlined$map$1.collect(SafeCollector.common.kt:114)
	at kotlinx.coroutines.flow.FlowKt__MergeKt$flattenConcat$$inlined$unsafeFlow$1.collect(SafeCollector.common.kt:114)
	at net.mamoe.mirai.qqandroid.network.protocol.packet.chat.receive.MessageSvc$PbGetMsg$decode$$inlined$mapNotNull$1.collect(SafeCollector.common.kt:114)
	at kotlinx.coroutines.flow.FlowKt__CollectionKt.toCollection(Collection.kt:32)
	at kotlinx.coroutines.flow.FlowKt.toCollection(Unknown Source)
	at kotlinx.coroutines.flow.FlowKt__CollectionKt.toList(Collection.kt:15)
	at kotlinx.coroutines.flow.FlowKt.toList(Unknown Source)
	at kotlinx.coroutines.flow.FlowKt__CollectionKt.toList$default(Collection.kt:15)
	at kotlinx.coroutines.flow.FlowKt.toList$default(Unknown Source)
	at net.mamoe.mirai.qqandroid.network.protocol.packet.chat.receive.MessageSvc$PbGetMsg.decode(MessageSvc.kt:313)
	at net.mamoe.mirai.qqandroid.network.protocol.packet.KnownPacketFactories.handleIncomingPacket$mirai_core_qqandroid(PacketFactory.kt:487)
	at net.mamoe.mirai.qqandroid.network.protocol.packet.KnownPacketFactories.parseIncomingPacket(PacketFactory.kt:228)
	at net.mamoe.mirai.qqandroid.network.QQAndroidBotNetworkHandler.generifiedParsePacket(QQAndroidBotNetworkHandler.kt:426)
	at net.mamoe.mirai.qqandroid.network.QQAndroidBotNetworkHandler.parsePacket(QQAndroidBotNetworkHandler.kt:421)
	at net.mamoe.mirai.qqandroid.network.QQAndroidBotNetworkHandler$parsePacketAsync$1.invokeSuspend(QQAndroidBotNetworkHandler.kt:406)
	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)
Caused by: java.util.zip.DataFormatException: incorrect header check
	at java.util.zip.Inflater.inflateBytes(Native Method)
	at java.util.zip.Inflater.inflate(Inflater.java:259)
	at java.util.zip.Inflater.inflate(Inflater.java:280)
	at net.mamoe.mirai.qqandroid.utils.MiraiPlatformUtils.unzip(MiraiPlatformUtils.kt:30)
	at net.mamoe.mirai.qqandroid.utils.MiraiPlatformUtils.unzip$default(MiraiPlatformUtils.kt)
	at net.mamoe.mirai.qqandroid.message.ConvensionKt.joinToMessageChain(convension.kt:282)
	... 30 more
Network(3068879961) 17:07:10 : unknown PbGetMsg type 87
Network(3068879961) 17:07:13 : Send done: Heartbeat.Alive
Network(3068879961) 17:07:13 : Packet: Heartbeat.Alive.Response

@Him188 Him188 closed this as completed in e1004f1 Apr 15, 2020
@Him188 Him188 changed the title 初次邀请机器人进群时报错 无法正常解析邀请机器人进群的富文本消息 Apr 15, 2020
@sandtechnology
Copy link
Collaborator Author

Network(3068879961) 23:52:07 : unknown PbGetMsg type 87
java.lang.IllegalStateException: 在 解析 richMsg 时遇到了意料之中的问题. 请完整复制此日志提交给 mirai. 调试信息: 00 3C 3F 78 6D 6C 20 76 65 72 73 69 6F 6E 3D 27 31 2E 30 27 20 65 6E 63 6F 64 69 6E 67 3D 27 55 54 46 2D 38 27 20 73 74 61 6E 64 61 6C 6F 6E 65 3D 27 79 65 73 27 20 3F 3E 3C 6D 73 67 20 73 65 72 76 69 63 65 49 44 3D 22 31 32 38 22 20 74 65 6D 70 6C 61 74 65 49 44 3D 22 31 32 33 34 35 22 20 61 63 74 69 6F 6E 3D 22 6E 61 74 69 76 65 22 20 62 72 69 65 66 3D 22 5B E9 93 BE E6 8E A5 5D E9 82 80 E8 AF B7 E4 BD A0 E5 8A A0 E5 85 A5 E7 BE A4 E8 81 8A 22 20 73 6F 75 72 63 65 4D 73 67 49 64 3D 22 30 22 20 75 72 6C 3D 22 22 3E 3C 69 74 65 6D 20 6C 61 79 6F 75 74 3D 22 32 22 3E 3C 70 69 63 74 75 72 65 20 63 6F 76 65 72 3D 22 22 2F 3E 3C 74 69 74 6C 65 3E E9 82 80 E8 AF B7 E4 BD A0 E5 8A A0 E5 85 A5 E7 BE A4 E8 81 8A 3C 2F 74 69 74 6C 65 3E 3C 73 75 6D 6D 61 72 79 20 2F 3E 3C 2F 69 74 65 6D 3E 3C 64 61 74 61 20 67 72 6F 75 70 63 6F 64 65 3D 22 36 35 35 30 35 37 31 32 37 22 20 67 72 6F 75 70 6E 61 6D 65 3D 22 6D 69 72 61 69 22 20 6D 73 67 73 65 71 3D 22 31 35 38 37 30 35 32 33 32 36 35 37 32 36 35 32 22 20 6D 73 67 74 79 70 65 3D 22 32 22 2F 3E 3C 2F 6D 73 67 3E
at net.mamoe.mirai.qqandroid.message.ConvensionKt.contextualBugReportException(convension.kt:362)
at net.mamoe.mirai.qqandroid.message.ConvensionKt.joinToMessageChain(convension.kt:285)
at net.mamoe.mirai.qqandroid.message.ConvensionKt.toMessageChain(convension.kt:192)
at net.mamoe.mirai.qqandroid.message.ConvensionKt.toMessageChain$default(convension.kt:178)
at net.mamoe.mirai.qqandroid.network.protocol.packet.chat.receive.MessageSvc$PbGetMsg$decode$$inlined$mapNotNull$1$2.emit(Collect.kt:178)
at kotlinx.coroutines.flow.FlowKt__BuildersKt$asFlow$$inlined$unsafeFlow$3.collect(SafeCollector.common.kt:115)
at kotlinx.coroutines.flow.FlowKt__MergeKt$flattenConcat$$inlined$unsafeFlow$1$lambda$1.emit(Collect.kt:138)
at kotlinx.coroutines.flow.FlowKt__MergeKt$flatMapConcat$$inlined$map$1$2.emit(Collect.kt:138)
at net.mamoe.mirai.qqandroid.network.protocol.packet.chat.receive.MessageSvc$PbGetMsg$decode$$inlined$filterNot$1$2.emit(Collect.kt:140)
at kotlinx.coroutines.flow.FlowKt__BuildersKt$asFlow$$inlined$unsafeFlow$3.collect(SafeCollector.common.kt:115)
at net.mamoe.mirai.qqandroid.network.protocol.packet.chat.receive.MessageSvc$PbGetMsg$decode$$inlined$filterNot$1.collect(SafeCollector.common.kt:114)
at kotlinx.coroutines.flow.FlowKt__MergeKt$flatMapConcat$$inlined$map$1.collect(SafeCollector.common.kt:114)
at kotlinx.coroutines.flow.FlowKt__MergeKt$flattenConcat$$inlined$unsafeFlow$1.collect(SafeCollector.common.kt:114)
at net.mamoe.mirai.qqandroid.network.protocol.packet.chat.receive.MessageSvc$PbGetMsg$decode$$inlined$mapNotNull$1.collect(SafeCollector.common.kt:114)
at kotlinx.coroutines.flow.FlowKt__CollectionKt.toCollection(Collection.kt:32)
at kotlinx.coroutines.flow.FlowKt.toCollection(Unknown Source)
at kotlinx.coroutines.flow.FlowKt__CollectionKt.toList(Collection.kt:15)
at kotlinx.coroutines.flow.FlowKt.toList(Unknown Source)
at kotlinx.coroutines.flow.FlowKt__CollectionKt.toList$default(Collection.kt:15)
at kotlinx.coroutines.flow.FlowKt.toList$default(Unknown Source)
at net.mamoe.mirai.qqandroid.network.protocol.packet.chat.receive.MessageSvc$PbGetMsg.decode(MessageSvc.kt:313)
at net.mamoe.mirai.qqandroid.network.protocol.packet.KnownPacketFactories.handleIncomingPacket$mirai_core_qqandroid(PacketFactory.kt:487)
at net.mamoe.mirai.qqandroid.network.protocol.packet.KnownPacketFactories.parseIncomingPacket(PacketFactory.kt:228)
at net.mamoe.mirai.qqandroid.network.QQAndroidBotNetworkHandler.generifiedParsePacket(QQAndroidBotNetworkHandler.kt:434)
at net.mamoe.mirai.qqandroid.network.QQAndroidBotNetworkHandler.parsePacket(QQAndroidBotNetworkHandler.kt:429)
at net.mamoe.mirai.qqandroid.network.QQAndroidBotNetworkHandler$parsePacketAsync$1.invokeSuspend(QQAndroidBotNetworkHandler.kt:414)
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)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 356
at java.lang.String.checkBounds(String.java:385)
at java.lang.String.(String.java:462)
at net.mamoe.mirai.qqandroid.message.ConvensionKt.joinToMessageChain(convension.kt:418)
... 30 more
此问题仍然存在

@Him188
Copy link
Member

Him188 commented Apr 16, 2020

0.37.3?

@Him188 Him188 reopened this Apr 16, 2020
@sandtechnology
Copy link
Collaborator Author

0.37.3?

嗯,刚刚你说要做支持 然后我就重现了新的bug(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
M 优先级: 主要 t:bug 类型: bug x:protocol 属性: 协议相关
Projects
None yet
Development

No branches or pull requests

2 participants