Skip to content

[Bug?] Operation is not supported on this platform. #56

@Miyakowww

Description

@Miyakowww

版本

  • Lagrange.Core 2.0.8-beta (Lagrange.Proto 1.0.8) (后续报错信息基于此版本)
  • Lagrange.Core 2.0.2-beta (Lagrange.Proto 1.0.7)

环境

.NET 8.0, Ubuntu 22.04.5 LTS, arm64

具体问题

登录过程中抛出异常,并因此导致登录失败。自行构建后问题解决

Unhandled exception. Lagrange.Core.Exceptions.LagrangeException: An error occurred while sending the event
 ---> System.PlatformNotSupportedException: Operation is not supported on this platform.
   at Lagrange.Proto.Primitives.ProtoWriter.EncodeVarInt[T](T value)
   at Lagrange.Core.Internal.Packets.System.SsoInfoSyncRequest.SerializeHandler(SsoInfoSyncRequest obj, ProtoWriter writer)
   at Lagrange.Proto.Serialization.ProtoSerializer.SerializeProtoPackableCore[T](ProtoWriter writer, T obj)
   at Lagrange.Proto.Serialization.ProtoSerializer.SerializeProtoPackable[T](IBufferWriter`1 dest, T obj)
   at Lagrange.Core.Utility.ProtoHelper.Serialize[T](T value)
   at Lagrange.Core.Internal.Services.System.InfoSyncService.Build(InfoSyncEventReq input, BotContext context)
   at Lagrange.Core.Internal.Context.ServiceContext.Resolve(ProtocolEvent event)
   at Lagrange.Core.Internal.Context.EventContext.SendEvent[T](ProtocolEvent event)
   --- End of inner exception stack trace ---
   at Lagrange.Core.Internal.Context.EventContext.SendEvent[T](ProtocolEvent event)
   at Lagrange.Core.Internal.Logic.WtExchangeLogic.Online()
   at Lagrange.Core.Internal.Logic.WtExchangeLogic.ManualLogin(Int64 uin, String password)
   at Lagrange.Core.Internal.Logic.WtExchangeLogic.Login(Int64 uin, String password, CancellationToken token)

复现方式

  • 在 Windows 11 24H2, amd64 设备上运行正常,相同的可执行文件在 Ubuntu 22.04.5 LTS, arm64 上运行出现上述问题
  • 克隆 LagrangeV2 项目,在 Windows 11 设备上进行构建,并用生成的 Lagrange.Proto.dll 替换对应文件,问题解决

期望的结果

直接使用 nuget 包不会抛出此异常

附件

自行构建的 dll:Lagrange.Proto.dll.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions