LagrangeDev / Lagrange.Core

An Implementation of NTQQ Protocol, with Pure C#, Derived from Konata.Core
GNU General Public License v3.0
2.1k stars 262 forks source link

[Bug]: `get_forward_msg`无法获取合并转发内容 #164

Closed ishkong closed 7 months ago

ishkong commented 7 months ago

请确保您已阅读以上注意事项,并勾选下方的确认框。

Lagrange项目

OneBot

所使用/依赖的Lagrange项目对应的commit

a576f3708fefe475e8d23c56670cc5d79f064cde

运行环境

Linux

运行架构

x64

连接方式

反向 WebSocket

重现步骤

使用get_forward_msg获取合并转发内容

期望的结果是什么?

获取到消息内容

实际的结果是什么?

trce: Lagrange.OneBot.Core.Network.Service.ReverseWSService[2]
      [ReverseWSService] Receive: {"action": "get_forward_msg", "params": {"message_id": "*"}, "echo": "16333"}
trce: Lagrange.Core.BotContext[0]
      [2024-03-09 17:40:20] [ServiceContext] [DEBUG]: Outgoing SSOFrame: trpc.group.long_msg_interface.MsgService.SsoRecvLongMsg
trce: Lagrange.Core.BotContext[0]
      [2024-03-09 17:40:20] [ServiceContext] [DEBUG]: Incoming SSOFrame: trpc.msg.olpush.OlPushService.MsgPush
trce: Lagrange.Core.BotContext[0]
      [2024-03-09 17:40:20] [ServiceContext] [DEBUG]: Outgoing SSOFrame: trpc.group.long_msg_interface.MsgService.SsoRecvLongMsg
warn: Lagrange.Core.BotContext[0]
      [2024-03-09 17:40:21] [BusinessContext] [WARNING]: Error when processing the event: Lagrange.Core.Internal.Event.Message.MultiMsgDownloadEvent
warn: Lagrange.Core.BotContext[0]
      [2024-03-09 17:40:21] [BusinessContext] [WARNING]: Value cannot be null. (Parameter 'buffer')
warn: Lagrange.Core.BotContext[0]
      [2024-03-09 17:40:21] [BusinessContext] [WARNING]:    at System.ArgumentNullException.Throw(String paramName)
         at System.IO.MemoryStream..ctor(Byte[] buffer)
         at Lagrange.Core.Utility.Binary.Compression.GZip.Inflate(Byte[] input) in /home/runner/work/Lagrange.Core/Lagrange.Core/Lagrange.Core/Utility/Binary/Compression/GZip.cs:line 9
         at Lagrange.Core.Internal.Service.Message.MultiMsgDownloadService.Parse(Byte[] input, BotKeystore keystore, BotAppInfo appInfo, BotDeviceInfo device, MultiMsgDownloadEvent& output, List`1& extraEvents) in /home/runner/work/Lagrange.Core/Lagrange.Core/Lagrange.Core/Internal/Service/Message/MultiMsgDownloadService.cs:line 45
         at Lagrange.Core.Internal.Service.BaseService`1.Lagrange.Core.Internal.Service.IService.Parse(Byte[] input, BotKeystore keystore, BotAppInfo appInfo, BotDeviceInfo device, ProtocolEvent& output, List`1& extraEvents) in /home/runner/work/Lagrange.Core/Lagrange.Core/Lagrange.Core/Internal/Service/BaseService.cs:line 26
         at Lagrange.Core.Internal.Context.ServiceContext.ResolveEventByPacket(SsoPacket packet) in /home/runner/work/Lagrange.Core/Lagrange.Core/Lagrange.Core/Internal/Context/ServiceContext.cs:line 103
         at Lagrange.Core.Internal.Context.BusinessContext.SendEvent(ProtocolEvent event) in /home/runner/work/Lagrange.Core/Lagrange.Core/Lagrange.Core/Internal/Context/BusinessContext.cs:line 105
warn: Lagrange.OneBot.Core.Operation.OperationService[0]
      Unexpected error encountered while handling message.
      System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
         at System.Collections.Generic.List`1.get_Item(Int32 index)
         at Lagrange.OneBot.Core.Operation.Message.GetForwardMsgOperation.HandleOperation(BotContext context, JsonNode payload) in /home/runner/work/Lagrange.Core/Lagrange.Core/Lagrange.OneBot/Core/Operation/Message/GetForwardMsgOperation.cs:line 23
         at Lagrange.OneBot.Core.Operation.OperationService.HandleOperation(MsgRecvEventArgs e) in /home/runner/work/Lagrange.Core/Lagrange.Core/Lagrange.OneBot/Core/Operation/OperationService.cs:line 55
trce: Lagrange.OneBot.Core.Network.Service.ReverseWSService[1]
      [ReverseWSService] Send: {"status":"failed","retcode":200,"data":null,"echo":"16333"}

简单的复现代码/链接(可选)

No response

日志记录(可选)

No response

补充说明(可选)

No response

ghost commented 7 months ago

干什么!

image

message_id是吧.png

ishkong commented 7 months ago
trce: Lagrange.OneBot.Core.Network.Service.ReverseWSService[2]
      [ReverseWSService] Receive: {"action": "get_forward_msg", "params": {"id": "*"}, "echo": "154"}
trce: Lagrange.Core.BotContext[0]
      [2024-03-10 13:17:14] [ServiceContext] [DEBUG]: Outgoing SSOFrame: trpc.group.long_msg_interface.MsgService.SsoRecvLongMsg
warn: Lagrange.Core.BotContext[0]
      [2024-03-10 13:17:15] [BusinessContext] [WARNING]: Error when processing the event: Lagrange.Core.Internal.Event.Message.MultiMsgDownloadEvent
warn: Lagrange.Core.BotContext[0]
      [2024-03-10 13:17:15] [BusinessContext] [WARNING]: Value cannot be null. (Parameter 'buffer')
warn: Lagrange.Core.BotContext[0]
      [2024-03-10 13:17:15] [BusinessContext] [WARNING]:    at System.ArgumentNullException.Throw(String paramName)
         at System.IO.MemoryStream..ctor(Byte[] buffer)
         at Lagrange.Core.Utility.Binary.Compression.GZip.Inflate(Byte[] input) in /home/runner/work/Lagrange.Core/Lagrange.Core/Lagrange.Core/Utility/Binary/Compression/GZip.cs:line 9
         at Lagrange.Core.Internal.Service.Message.MultiMsgDownloadService.Parse(Byte[] input, BotKeystore keystore, BotAppInfo appInfo, BotDeviceInfo device, MultiMsgDownloadEvent& output, List`1& extraEvents) in /home/runner/work/Lagrange.Core/Lagrange.Core/Lagrange.Core/Internal/Service/Message/MultiMsgDownloadService.cs:line 45
         at Lagrange.Core.Internal.Service.BaseService`1.Lagrange.Core.Internal.Service.IService.Parse(Byte[] input, BotKeystore keystore, BotAppInfo appInfo, BotDeviceInfo device, ProtocolEvent& output, List`1& extraEvents) in /home/runner/work/Lagrange.Core/Lagrange.Core/Lagrange.Core/Internal/Service/BaseService.cs:line 26
         at Lagrange.Core.Internal.Context.ServiceContext.ResolveEventByPacket(SsoPacket packet) in /home/runner/work/Lagrange.Core/Lagrange.Core/Lagrange.Core/Internal/Context/ServiceContext.cs:line 103
         at Lagrange.Core.Internal.Context.BusinessContext.SendEvent(ProtocolEvent event) in /home/runner/work/Lagrange.Core/Lagrange.Core/Lagrange.Core/Internal/Context/BusinessContext.cs:line 105
warn: Lagrange.OneBot.Core.Operation.OperationService[0]
      Unexpected error encountered while handling message.
      System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
         at System.Collections.Generic.List`1.get_Item(Int32 index)
         at Lagrange.OneBot.Core.Operation.Message.GetForwardMsgOperation.HandleOperation(BotContext context, JsonNode payload) in /home/runner/work/Lagrange.Core/Lagrange.Core/Lagrange.OneBot/Core/Operation/Message/GetForwardMsgOperation.cs:line 23
         at Lagrange.OneBot.Core.Operation.OperationService.HandleOperation(MsgRecvEventArgs e) in /home/runner/work/Lagrange.Core/Lagrange.Core/Lagrange.OneBot/Core/Operation/OperationService.cs:line 55
trce: Lagrange.OneBot.Core.Network.Service.ReverseWSService[1]
      [ReverseWSService] Send: {"status":"failed","retcode":200,"data":null,"echo":"154"}

也还是不行(

ghost commented 7 months ago

貌似修了?