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

[Bug?]: connecting servers后报错Unhandled exception. System.Threading.Tasks.TaskCanceledException: A task was canceled. #763

Closed
4 tasks done
q921195075 opened this issue Feb 6, 2025 · 4 comments
Labels
bug? Maybe it's a bug

Comments

@q921195075
Copy link

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

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

Lagrange项目

OneBot

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

fa45d03

运行环境

Windows

运行架构

x64

连接方式

反向 WebSocket

重现步骤

.\Lagrange.OneBot.exe
每次运行必现

期望的结果是什么?

成功登录

实际的结果是什么?

Lagrange.OneBot Version: 0.0.3+fa45d03ac42c72ab83d76d2d0336667419e36717

warn: Lagrange.OneBot.Utility.MusicSigner[0]
MusicSignServer is not available, sign may be failed
dbug: Microsoft.Extensions.Hosting.Internal.Host[1]
Hosting starting
crit: Realms.RealmConfiguration[0]
Found LiteDB database, currently Lagrange.OneBot has been migrated to Realm database
crit: Realms.RealmConfiguration[0]
Please delete ./lagrange-0.db if you no longer need the data in the database; otherwise, please refer to https://lagrangedev.github.io/Lagrange.Doc/Lagrange.OneBot/#从-litedb-迁移到-realm to migrate the database to Realm
crit: Realms.RealmConfiguration[0]
Press any key to terminate the program
dbug: Microsoft.Extensions.Hosting.Internal.Host[3]
Hosting stopping
info: Microsoft.Hosting.Lifetime[0]
Application is shutting down...
dbug: Microsoft.Extensions.Hosting.Internal.Host[4]
Hosting stopped
info: Lagrange.OneBot.Core.Login.LoginService[0]
Protocol Version: 3.2.15-30366
info: Lagrange.Core.BotContext[0]
[2025-02-06 23:12:52] [SocketContext] [VERBOSE]: Server: http://39.156.125.20:8080/ Latency: 21
info: Lagrange.Core.BotContext[0]
[2025-02-06 23:12:52] [SocketContext] [VERBOSE]: Server: http://111.31.200.210:8080/ Latency: 20
info: Lagrange.Core.BotContext[0]
[2025-02-06 23:12:52] [SocketContext] [VERBOSE]: Server: http://39.156.126.178:8080/ Latency: 22
info: Lagrange.Core.BotContext[0]
[2025-02-06 23:12:52] [SocketContext] [VERBOSE]: Server: http://111.30.182.254:8080/ Latency: 19
info: Lagrange.Core.BotContext[0]
[2025-02-06 23:12:52] [SocketContext] [VERBOSE]: Server: http://111.30.187.227:8080/ Latency: 20
warn: Lagrange.Core.BotContext[0]
[2025-02-06 23:12:52] [BusinessContext] [WARNING]: Error when processing the event: Lagrange.Core.Internal.Event.System.InfoSyncEvent
info: Lagrange.Core.BotContext[0]
[2025-02-06 23:12:52] [SocketContext] [VERBOSE]: Server: http://111.30.169.83:8080/ Latency: 21
info: Lagrange.Core.BotContext[0]
[2025-02-06 23:12:52] [WtExchangeLogic] [INFORMATION]: Session has not expired, using session to login and register status
info: Lagrange.Core.BotContext[0]
[2025-02-06 23:12:52] [SocketContext] [VERBOSE]: Server: http://39.156.144.113:8080/ Latency: 21
warn: Lagrange.Core.BotContext[0]
[2025-02-06 23:12:53] [BusinessContext] [WARNING]: System.InvalidOperationException: Packet 'trpc.msg.register_proxy.RegisterProxy.SsoInfoSync' returns -10003 with seq: 7053981, extra: 身份验证失败,请你重新登录。(w21)
at Lagrange.Core.Internal.Context.BusinessContext.SendEvent(ProtocolEvent event)
warn: Lagrange.Core.BotContext[0]
[2025-02-06 23:12:53] [WtExchangeLogic] [WARNING]: Register by session failed, try to login by EasyLogin
trce: Lagrange.Core.BotContext[0]
[2025-02-06 23:12:53] [ServiceContext] [DEBUG]: Outgoing SSOFrame: trpc.login.ecdh.EcdhService.SsoKeyExchange
trce: Lagrange.Core.BotContext[0]
[2025-02-06 23:12:52] [ServiceContext] [DEBUG]: Outgoing SSOFrame: trpc.msg.register_proxy.RegisterProxy.SsoInfoSync
trce: Lagrange.Core.BotContext[0]
[2025-02-06 23:12:53] [ServiceContext] [DEBUG]: Incoming SSOFrame: trpc.login.ecdh.EcdhService.SsoKeyExchange
info: Lagrange.Core.BotContext[0]
[2025-02-06 23:12:53] [WtExchangeLogic] [INFORMATION]: Key Exchange successfully!
info: Lagrange.Core.BotContext[0]
[2025-02-06 23:12:53] [WtExchangeLogic] [INFORMATION]: Trying to Login by EasyLogin...
trce: Lagrange.Core.BotContext[0]
[2025-02-06 23:12:53] [ServiceContext] [DEBUG]: Outgoing SSOFrame: trpc.login.ecdh.EcdhService.SsoNTLoginEasyLogin
trce: Lagrange.Core.BotContext[0]
[2025-02-06 23:12:54] [ServiceContext] [DEBUG]: Incoming SSOFrame: trpc.login.ecdh.EcdhService.SsoNTLoginEasyLogin
warn: Lagrange.Core.BotContext[0]
[2025-02-06 23:12:54] [WtExchangeLogic] [WARNING]: Fast Login Failed with code 140022015, trying to Login by Password...
info: Lagrange.Core.BotContext[0]
[2025-02-06 23:12:54] [WtExchangeLogic] [INFORMATION]: Connecting Servers...
trce: Lagrange.Core.BotContext[0]
[2025-02-06 23:12:54] [ServiceContext] [DEBUG]: Outgoing SSOFrame: wtlogin.trans_emp
Unhandled exception. System.Threading.Tasks.TaskCanceledException: A task was canceled.
at Lagrange.OneBot.Core.Login.LoginService.b__8_1(CancellationToken token)
at Lagrange.OneBot.Utility.Fallbacks.FallbackAsync.ExecuteAsync(CancellationToken token)
at Lagrange.OneBot.Core.Login.LoginService.StartAsync(CancellationToken token)
at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host)
at Lagrange.OneBot.Program.Main(String[] args)

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

Trace 级别日志记录(可选)

trce: Lagrange.Core.BotContext[0]
      [2025-02-06 23:12:53] [ServiceContext] [DEBUG]: Outgoing SSOFrame: trpc.login.ecdh.EcdhService.SsoKeyExchange
trce: Lagrange.Core.BotContext[0]
      [2025-02-06 23:12:52] [ServiceContext] [DEBUG]: Outgoing SSOFrame: trpc.msg.register_proxy.RegisterProxy.SsoInfoSync
trce: Lagrange.Core.BotContext[0]
      [2025-02-06 23:12:53] [ServiceContext] [DEBUG]: Incoming SSOFrame: trpc.login.ecdh.EcdhService.SsoKeyExchange
trce: Lagrange.Core.BotContext[0]
      [2025-02-06 23:12:53] [ServiceContext] [DEBUG]: Outgoing SSOFrame: trpc.login.ecdh.EcdhService.SsoNTLoginEasyLogin
trce: Lagrange.Core.BotContext[0]
      [2025-02-06 23:12:54] [ServiceContext] [DEBUG]: Incoming SSOFrame: trpc.login.ecdh.EcdhService.SsoNTLoginEasyLogin
trce: Lagrange.Core.BotContext[0]
      [2025-02-06 23:12:54] [ServiceContext] [DEBUG]: Outgoing SSOFrame: wtlogin.trans_emp

补充说明(可选)

Image

Image

.NET version: 9.0.1
Download the .NET runtime: https://aka.ms/dotnet-core-applaunch?missing_runtime=true&arch=x64&rid=win-x64&os=win10&apphost_version=9.0.1

@q921195075 q921195075 added the bug? Maybe it's a bug label Feb 6, 2025
@ishkong
Copy link
Collaborator

ishkong commented Feb 6, 2025

?

[2025-02-06 23:12:53] [BusinessContext] [WARNING]: System.InvalidOperationException: Packet 'trpc.msg.register_proxy.RegisterProxy.SsoInfoSync' returns -10003 with seq: 7053981, extra: 身份验证失败,请你重新登录。(w21)
at Lagrange.Core.Internal.Context.BusinessContext.SendEvent(ProtocolEvent event)

?

@q921195075
Copy link
Author

?

[2025-02-06 23:12:53] [BusinessContext] [WARNING]: System.InvalidOperationException: Packet 'trpc.msg.register_proxy.RegisterProxy.SsoInfoSync' returns -10003 with seq: 7053981, extra: 身份验证失败,请你重新登录。(w21)
at Lagrange.Core.Internal.Context.BusinessContext.SendEvent(ProtocolEvent event)

?

尝试过删除keystore.json文件后重新运行,但是会直接跳到最后的报错
Lagrange.OneBot Version: 0.0.3+fa45d03ac42c72ab83d76d2d0336667419e36717

warn: Lagrange.OneBot.Utility.MusicSigner[0]
MusicSignServer is not available, sign may be failed
dbug: Microsoft.Extensions.Hosting.Internal.Host[1]
Hosting starting
crit: Realms.RealmConfiguration[0]
Found LiteDB database, currently Lagrange.OneBot has been migrated to Realm database
crit: Realms.RealmConfiguration[0]
Please delete ./lagrange-0.db if you no longer need the data in the database; otherwise, please refer to https://lagrangedev.github.io/Lagrange.Doc/Lagrange.OneBot/#从-litedb-迁移到-realm to migrate the database to Realm
crit: Realms.RealmConfiguration[0]
Press any key to terminate the program
dbug: Microsoft.Extensions.Hosting.Internal.Host[3]
Hosting stopping
info: Microsoft.Hosting.Lifetime[0]
Application is shutting down...
dbug: Microsoft.Extensions.Hosting.Internal.Host[4]
Hosting stopped
info: Lagrange.OneBot.Core.Login.LoginService[0]
Protocol Version: 3.2.15-30366
Unhandled exception. System.Threading.Tasks.TaskCanceledException: A task was canceled.
at Lagrange.OneBot.Core.Login.LoginService.b__8_1(CancellationToken token)
at Lagrange.OneBot.Utility.Fallbacks.FallbackAsync.ExecuteAsync(CancellationToken token)
at Lagrange.OneBot.Core.Login.LoginService.StartAsync(CancellationToken token)
at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host)
at Lagrange.OneBot.Program.Main(String[] args)

Image

@ishkong
Copy link
Collaborator

ishkong commented Feb 6, 2025

Please delete ./lagrange-0.db if you no longer need the data in the database; otherwise, please refer to [https://lagrangedev.github.io/Lagrange.Doc/Lagrange.OneBot/#从-litedb-迁移到-realm](https://lagrangedev.github.io/Lagrange.Doc/Lagrange.OneBot/#%E4%BB%8E-litedb-%E8%BF%81%E7%A7%BB%E5%88%B0-realm) to migrate the database to Realm

@q921195075
Copy link
Author

Please delete ./lagrange-0.db if you no longer need the data in the database; otherwise, please refer to [https://lagrangedev.github.io/Lagrange.Doc/Lagrange.OneBot/#从-litedb-迁移到-realm](https://lagrangedev.github.io/Lagrange.Doc/Lagrange.OneBot/#%E4%BB%8E-litedb-%E8%BF%81%E7%A7%BB%E5%88%B0-realm) to migrate the database to Realm

是我的问题 没有细看这个 我看到数据库关键词以为会自动迁移 所以没有管这个 刚刚看了看 虽然还没有迁移 但是目前能用了 感谢

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