Skip to content

[Bug?]: 无法正确处理好友请求 #775

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

Open
4 tasks done
AlexanderAria opened this issue Feb 19, 2025 · 2 comments
Open
4 tasks done

[Bug?]: 无法正确处理好友请求 #775

AlexanderAria opened this issue Feb 19, 2025 · 2 comments
Labels
bug? Maybe it's a bug

Comments

@AlexanderAria
Copy link

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

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

Lagrange项目

OneBot

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

903dce7

运行环境

Windows

运行架构

x64

连接方式

反向 WebSocket

重现步骤

Lagrange.OneBot_win-x64_net9.0,反向连接WS,分离部署的SealDice海豹核心。QQ隐私设置“加我为好友的方式”为“需要验证信息。任意帐号发送好友请求。

期望的结果是什么?

Lagrange像自动同意双相好友的进群邀请一样 自动同意好友申请。

实际的结果是什么?

每次收到好友请求时会出现白字[WARN]报错,后台不会对此请求做更进一步处理。手机登录QQ后能看见未处理、待通过的好友申请等待审批。

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

Trace 级别日志记录(可选)

warn: Lagrange.Core.BotContext[0]
      [2025-02-20 01:55:27] [BusinessContext] [WARNING]: Error while handling msf push: 12 trpc.msg.olpush.OlPushService.MsgPush
warn: Lagrange.Core.BotContext[0]
      [2025-02-20 01:55:27] [BusinessContext] [WARNING]: Invalid wire-type (Variant); this usually means you have over-written a file without truncating or setting the length; see https://stackoverflow.com/q/2152978/23354
warn: Lagrange.Core.BotContext[0]
      [2025-02-20 01:55:27] [BusinessContext] [WARNING]:    at ProtoBuf.ProtoReader.State.ThrowProtoException(String message) in /_/src/protobuf-net.Core/ProtoReader.State.ReadMethods.cs:line 803
         at ProtoBuf.ProtoReader.State.ThrowWireTypeException() in /_/src/protobuf-net.Core/ProtoReader.State.ReadMethods.cs:line 797
         at proto_54(State&, FriendRequestInfo)
         at ProtoBuf.Internal.Serializers.SimpleCompiledSerializer`1.ProtoBuf.Serializers.ISerializer<T>.Read(State& state, T value) in /_/src/protobuf-net/Internal/Serializers/CompiledSerializer.cs:line 107
         at ProtoBuf.ProtoReader.State.ReadMessage[TSerializer,T](SerializerFeatures features, T value, TSerializer& serializer) in /_/src/protobuf-net.Core/ProtoReader.State.ReadMethods.cs:line 1022
         at proto_52(State&, FriendRequest)
         at ProtoBuf.Internal.Serializers.SimpleCompiledSerializer`1.ProtoBuf.Serializers.ISerializer<T>.Read(State& state, T value) in /_/src/protobuf-net/Internal/Serializers/CompiledSerializer.cs:line 107
         at ProtoBuf.ProtoReader.State.ReadAsRoot[T](T value, ISerializer`1 serializer) in /_/src/protobuf-net.Core/ProtoReader.State.ReadMethods.cs:line 1157
         at ProtoBuf.ProtoReader.State.DeserializeRoot[T](T value, ISerializer`1 serializer) in /_/src/protobuf-net.Core/ProtoReader.State.ReadMethods.cs:line 1137
         at ProtoBuf.Meta.TypeModel.Deserialize[T](ReadOnlySpan`1 source, T value, Object userState) in /_/src/protobuf-net.Core/Meta/TypeModel.cs:line 808
         at ProtoBuf.Serializer.Deserialize[T](ReadOnlySpan`1 source, T value, Object userState) in /_/src/protobuf-net/Serializer.Deserialize.cs:line 74
         at Lagrange.Core.Internal.Service.Message.PushMessageService.ProcessEvent0x210(Span`1 payload, PushMsg msg, List`1 extraEvents)
         at Lagrange.Core.Internal.Service.Message.PushMessageService.Parse(Span`1 input, BotKeystore keystore, BotAppInfo appInfo, BotDeviceInfo device, PushMessageEvent& output, List`1& extraEvents)
         at Lagrange.Core.Internal.Service.BaseService`1.Lagrange.Core.Internal.Service.IService.Parse(Span`1 input, BotKeystore keystore, BotAppInfo appInfo, BotDeviceInfo device, ProtocolEvent& output, List`1& extraEvents)
         at Lagrange.Core.Internal.Context.ServiceContext.ResolveEventByPacket(SsoPacket packet)
         at Lagrange.Core.Internal.Context.BusinessContext.HandleServerPacket(SsoPacket packet)

补充说明(可选)

(由”允许任何人的好友请求“、”需要正确回答问题“自动通过导致加上的单向好友的进群邀请也不会被处理)

Image

Image

@AlexanderAria AlexanderAria added the bug? Maybe it's a bug label Feb 19, 2025
@AlexanderAria
Copy link
Author

海豹端已将加好友口令留空(即一切留言均可通过好友请求)。另,就算不开启海豹只开启Lagrange,也能复现一样的后台报错和QQ内效果

@pk5ls20 pk5ls20 changed the title [Bug?]: [Bug?]: 无法正确处理好友请求 Feb 20, 2025
@kenichiLyon
Copy link

意识到这位用户并未提供完整的 trace 级别的log,故本人使用目前最新构建的 Lagrange.Onebot( Commit 908683e )在 Windows 11 .net 8.0环境进行复测,同样 bug 复现,trace级别log附此

error.log

初步检查该log报错,发现可能是与 Protobuf 序列化相关

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug? Maybe it's a bug
Projects
None yet
Development

No branches or pull requests

2 participants