Skip to content
This repository was archived by the owner on Oct 12, 2025. It is now read-only.
This repository was archived by the owner on Oct 12, 2025. It is now read-only.

[Bug?]: get_group_msg_history 因视频文件不可用 #290

@mole828

Description

@mole828

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

  • 我已经仔细阅读上述内容
  • 我已经使用 最新构建 测试过,问题依旧存在。
  • 我已经在 Issue Tracker 中找过我要提出的问题,没有找到相同问题的ISSUE。
  • 我已知晓并同意,此处仅用于汇报程序中存在的问题。若这个 Issue 是关于其他非程序本身问题,则我的 Issue 可能会被无条件自动关闭或/并锁定。(其它疑问请考虑加入TG群询问或在discussions中提问)

Lagrange项目

OneBot

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

633efc5

运行环境

Linux

运行架构

x64

连接方式

正向 WebSocket

重现步骤

  • 删除消息记录的db文件
  • 重新部署
  • 在群聊中发送一个视频
  • 尝试获取历史记录

期望的结果是什么?

正确获取历史记录

实际的结果是什么?

{
"status": "failed",
"retcode": 200,
"data": null,
"echo": "getChatHistoryFist"
}

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

No response

日志记录(可选)

trce: Lagrange.OneBot.Core.Network.Service.ForwardWSService[3]
      Receive(Conn: 40f2c38f-96c4-4d2c-8c76-ea9983452511): {"action":"get_group_msg_history","params":{"message_type":"group","group_id":000,"message_seq":0,"message_id":0,"count":20},"echo":"getChatHistoryFist"}
warn: Lagrange.OneBot.Core.Operation.OperationService[0]
      Unexpected error encountered while handling message.
      System.IO.FileNotFoundException: Could not find file '/app/data/4bf8552b0f29ab3333bed453ff717995.mp4'.
      File name: '/app/data/4bf8552b0f29ab3333bed453ff717995.mp4'
         at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirError)
         at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode, Boolean failForSymlink, Boolean& wasSymlink, Func`4 createOpenException)
         at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, UnixFileMode openPermissions, Int64& fileLength, UnixFileMode& filePermissions, Boolean failForSymlink, Boolean& wasSymlink, Func`4 createOpenException)
         at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
         at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access)
         at Lagrange.Core.Message.Entity.VideoEntity..ctor(String filePath, Int32 videoLength)
         at lambda_method184(Closure, BsonDocument)
         at LiteDB.BsonMapper.Deserialize(Type type, BsonValue value)
         at LiteDB.BsonMapper.DeserializeList(Type type, BsonArray value)
         at LiteDB.BsonMapper.Deserialize(Type type, BsonValue value)
         at LiteDB.BsonMapper.DeserializeObject(EntityMapper entity, Object obj, BsonDocument value)
         at LiteDB.BsonMapper.Deserialize(Type type, BsonValue value)
         at LiteDB.LiteQueryable`1.<ToEnumerable>b__27_2(BsonDocument x)
         at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext()
         at System.Linq.OrderedEnumerable`1.TryGetFirst(Boolean& found)
         at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Boolean& found)
         at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
         at Lagrange.OneBot.Core.Operation.Message.GetGroupMessageHistoryOperation.HandleOperation(BotContext context, JsonNode payload)
         at Lagrange.OneBot.Core.Operation.OperationService.HandleOperation(MsgRecvEventArgs e)
trce: Lagrange.OneBot.Core.Network.Service.ForwardWSService[2]
      Send(Conn: 40f2c38f-96c4-4d2c-8c76-ea9983452511): {"status":"failed","retcode":200,"data":null,"echo":"getChatHistoryFist"}
info: Microsoft.Hosting.Lifetime[0]
      Application is shutting down...
info: Lagrange.OneBot.LagrangeApp[0]
      Lagrange.OneBot Implementation has stopped
info: Lagrange.OneBot.Core.Network.Service.ForwardWSService[4]
      Disconnected(Conn: 40f2c38f-96c4-4d2c-8c76-ea9983452511)

补充说明(可选)

image: ghcr.io/konatadev/lagrange.onebot:sha-633efc5

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions