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】扫码登录,持久化cookie报错 #649

Closed
jkssll opened this issue Jan 7, 2024 · 4 comments
Closed

【Bug】扫码登录,持久化cookie报错 #649

jkssll opened this issue Jan 7, 2024 · 4 comments
Labels
needs-more-info Further information is requested 需要更多信息 Stale Stale

Comments

@jkssll
Copy link

jkssll commented Jan 7, 2024

运行环境:青龙

开始执行... 2024-01-07 23:16:59

已安装dotnet,当前版本:6.0.417

repo目录: /ql/repo
bili仓库目录: /ql/repo/RayWangQvQ_BiliBiliToolPro


| _ \ __ _ _ _ | __ ) | ||_ |_ ___ | |
| |) / ` | | | | | _ () () | |/ _ \ / _ | |
| _ < (| | || | | |) | | | | | | () | () | |
|
| __,|_, | |/|||| ||_/ _/||
|___/

[23:17:24 INF] BiliBiliToolPro 开始运行...

[23:17:26 INF] 【账号个数】0个

[23:17:26 INF] 【目标任务】Login
[23:17:26 INF] =====开始 扫码登录 =====

[23:17:26 INF] ---开始 获取二维码 ---
[23:17:37 INF] AsciiQRCode:
[23:17:37 INF]
█████████████████████████████████████████████████
█████████████████████████████████████████████████
████ ▄▄▄▄▄ █ █▄█▀ ▀█ ▀█▀██ ▄▀▄██▄▄ █ ▄▄▄▄▄ ████
████ █ █ █▀▄▀ █ ██▀▄█▄▄ █▄▀▀▀▄█▀ ▀██ █ █ ████
████ █▄▄▄█ █▄ ▄ █▀▀██▄▄▄ █ ▀▀▄▀▀█ █▄▄█ █▄▄▄█ ████
████▄▄▄▄▄▄▄█▄█ ▀ █▄▀▄█▄▀ ▀ ▀ ▀ ▀▄▀▄▀▄█▄▄▄▄▄▄▄████
████ ███▀█▄ █▀▄▀█ ▄▀▀▀▄█ ▀ ▄█▄ █▀ █▄██▄▄▀▄ ████
████ ▄█▄▀▄ █▄████ ▄▀██▄▄▄█▀▄██▀ ██▀▀▀▀▄▀▀█████
████ █▄▄▄ ▄ ▀ ▀ █▄ ▄▀ ▀▄██▄█▀█ ▀ █▄██ ▀ █ ████
████▄▄▄ ▀▀▄▀▄▀▀▀█▄ ▄▀▀ ▀██▄▀█ ▄▀█ █ █▄ █████
███████▄ ▄▄▄ ▀▄█▀▀█▄▄ ▄▄▀█▀▄ ▀ ▄██ █ ▄ ██████
████▄▀█ █▄▀█ █▄█▄ ▀▀ █▄▀█ ▄▀▄█ ▀█▀▀▄▀ █ ▀█████
████▀█ ▀ ▄▄███ ▄▄█▄█▄▄████▄█▄▄███▄ █▄█ █▄▀███████
████▄▄▄▄▄ ▄▄█▀ ▄█▀▄▀ █▀█▄▀▀█▀ ▄█▀█ ▀█ ▀▀ ▀█▀ ████
████▀▄ ▀▄▄▀██▀█▄█▄█ ▄▄ ▄▀▄███ ▄ █▀ ██▀▄█▄ ▄ ████
████▄▄█▀▄▄▄▀▀ ▀▀ █▀▀ ▀█▀ ▀ ▀▀█▄ ▀█▀ ▄▄▀ ██████
████▀▄█▀█▀▄█ █ ▄ █▄█▀ ▄▀ ▀ ▄▀█▄█▀██ █▀▀▄ ▄▄█████
████▄▀▄▄▀▄▄▀█ █ █▄▀▄█ ▀▀ ▀▄██▄ ▀▄▀ ▄▀ █▄▀█████
█████▄██▄█▄▄█▀▄ ▀ ▀▄▀▄▀▀▀▀▀█▀█▄▀▀ █ ▄▄▄ ▀ █ ████
████ ▄▄▄▄▄ █▄▀▄ ▄▄ █▀█ ▄ ▀██▄ ▀▀█▄█ █▄█ ██ ▄████
████ █ █ ██ ▄ █▄▄▀█▄ ▄█ ▄ ▀ ██▀ ██▄▄▄▄ █▄▀█████
████ █▄▄▄█ ██▄▄▀▀▀▄▄██▄▄ ▄█▀ ▄ ▀█▄▄█▀███▀▄▄█████
████▄▄▄▄▄▄▄█▄███▄▄▄▄██▄▄▄██▄█▄▄▄██▄█▄███▄▄▄▄█████
█████████████████████████████████████████████████
█████████████████████████████████████████████████
[23:17:37 INF]

[23:17:37 INF] 如果上方二维码显示异常,或扫描失败,请使用浏览器访问如下链接,查看高清二维码:
[23:17:37 INF] https://tool.lu/qrcode/basic.html?text=https%3a%2f%2fpassport.bilibili.com%2fh5-app%2fpassport%2flogin%2fscan%3fnavhide%3d1%26qrcode_key%3d76269e844e908ab1c2bc9323ffdd4f31%26from%3d

[23:17:37 INF] 我数到10,动作快点
[23:17:37 INF] [1]等待扫描...
[23:17:47 INF] 未扫码

[23:17:47 INF] [2]等待扫描...
[23:17:55 INF] 未扫码

[23:17:55 INF] [3]等待扫描...
[23:18:06 INF] 扫描成功!
[23:18:06 INF] --------结束--------

[23:18:06 INF] ---开始 Set Cookie ---
[23:18:10 INF] 访问主站成功
[23:18:10 INF] SetCookie成功
[23:18:10 INF] -------------结束-------------

[23:18:10 INF] ---开始 持久化Cookie ---
[23:18:10 INF] 当前运行平台:QingLong
[23:18:13 ERR] [REQUEST]
GET /api/envs?searchValue=Ray_BiliBiliCookies__ HTTP/1.1
Host: localhost:5600
Authorization: Bearer eyJhbGciOiJIUzM4NCIsInR5cCI6IkpXVCJ9.eyJkYXRhIjoiYUszNTZ3djhIZEVHVVh6RTg3M3lIR1RneTJiVVJxX2gwMHlGZ0lyZ0JBaUJoX0FNOHRnNlVXWlZsbG1vMi1DWWJQaXNCVHlLMEtQbE50RzNqWjBYam9Fa21pUERCbnFZbCIsImlhdCI6MTcwNDYzOTY5MCwiZXhwIjoxNzA0ODk4ODkwfQ.8mm8forj3JAM3IPDv0WW7BvUOmuI1m5aDwhZ15PKlDPauJfAeZyt4tXxTDa3BqkD
Accept: application/json; q=0.001, application/xml; q=0.001

[EXCEPTION]
System.Net.Http.HttpRequestException: Name does not resolve (localhost:5600)
---> System.Net.Sockets.SocketException (0xFFFDFFFF): Name does not resolve
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
at System.Net.Sockets.Socket.g__WaitForConnectWithCancellation|277_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(HttpRequestMessage request)
at System.Threading.Tasks.TaskCompletionSourceWithCancellation1.WaitWithCancellationAsync(CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at Microsoft.Extensions.Http.PolicyHttpMessageHandler.SendCoreAsync(HttpRequestMessage request, Context context, CancellationToken cancellationToken) at Polly.Retry.AsyncRetryEngine.ImplementationAsync[TResult](Func3 action, Context context, CancellationToken cancellationToken, ExceptionPredicates shouldRetryExceptionPredicates, ResultPredicates1 shouldRetryResultPredicates, Func5 onRetryAsync, Int32 permittedRetryCount, IEnumerable1 sleepDurationsEnumerable, Func4 sleepDurationProvider, Boolean continueOnCapturedContext)
at Polly.AsyncPolicy1.ExecuteAsync(Func3 action, Context context, CancellationToken cancellationToken, Boolean continueOnCapturedContext)
at Microsoft.Extensions.Http.PolicyHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
at WebApiClientCore.Implementations.ApiRequestSender.SendCoreAsync(ApiRequestContext context)
at WebApiClientCore.Implementations.ApiRequestSender.SendAsync(ApiRequestContext context)

[ELAPSED] 00:00:02.1866908
[23:18:13 ERR] 程序发生异常:Name does not resolve (localhost:5600)
[23:18:13 INF] ------------结束------------

[23:18:13 ERR] 程序发生异常:Name does not resolve (localhost:5600)
[23:18:13 INF] =========结束=========

[23:18:13 ERR] 程序异常终止,原因:Name does not resolve (localhost:5600)
[23:18:13 INF] 运行环境:Development
[23:18:13 INF] 应用目录:/ql/repo/RayWangQvQ_BiliBiliToolPro/src/Ray.BiliBiliTool.Console/bin/Debug/net6.0/

[23:18:13 INF] 运行结束
[23:18:13 FTL] Host terminated unexpectedly!
System.Net.Http.HttpRequestException: Name does not resolve (localhost:5600)
---> System.Net.Sockets.SocketException (0xFFFDFFFF): Name does not resolve
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
at System.Net.Sockets.Socket.g__WaitForConnectWithCancellation|277_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(HttpRequestMessage request)
at System.Threading.Tasks.TaskCompletionSourceWithCancellation1.WaitWithCancellationAsync(CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at Microsoft.Extensions.Http.PolicyHttpMessageHandler.SendCoreAsync(HttpRequestMessage request, Context context, CancellationToken cancellationToken) at Polly.Retry.AsyncRetryEngine.ImplementationAsync[TResult](Func3 action, Context context, CancellationToken cancellationToken, ExceptionPredicates shouldRetryExceptionPredicates, ResultPredicates1 shouldRetryResultPredicates, Func5 onRetryAsync, Int32 permittedRetryCount, IEnumerable1 sleepDurationsEnumerable, Func4 sleepDurationProvider, Boolean continueOnCapturedContext)
at Polly.AsyncPolicy1.ExecuteAsync(Func3 action, Context context, CancellationToken cancellationToken, Boolean continueOnCapturedContext)
at Microsoft.Extensions.Http.PolicyHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
at WebApiClientCore.Implementations.ApiRequestSender.SendCoreAsync(ApiRequestContext context)
at WebApiClientCore.Implementations.ApiRequestSender.SendAsync(ApiRequestContext context)
at WebApiClientCore.Implementations.DefaultApiActionInvoker1.InvokeAsync(ApiRequestContext request) at WebApiClientCore.Implementations.DefaultApiActionInvoker1.InvokeAsync(HttpClientContext context, Object[] arguments)
at Ray.BiliBiliTool.DomainService.LoginDomainService.SaveCookieToQinLongAsync(BiliCookie ckInfo, CancellationToken cancellationToken) in /ql/repo/RayWangQvQ_BiliBiliToolPro/src/Ray.BiliBiliTool.DomainService/LoginDomainService.cs:line 216
at Ray.BiliBiliTool.Application.LoginTaskAppService.SaveCookieAsync(BiliCookie ckInfo, CancellationToken cancellationToken) in /ql/repo/RayWangQvQ_BiliBiliToolPro/src/Ray.BiliBiliTool.Application/LoginTaskAppService.cs:line 80
at Ray.BiliBiliTool.Application.LoginTaskAppService.DoTaskAsync(CancellationToken cancellationToken) in /ql/repo/RayWangQvQ_BiliBiliToolPro/src/Ray.BiliBiliTool.Application/LoginTaskAppService.cs:line 54
at Ray.BiliBiliTool.Console.BiliBiliToolHostedService.DoTasksAsync(String[] tasks, CancellationToken cancellationToken) in /ql/repo/RayWangQvQ_BiliBiliToolPro/src/Ray.BiliBiliTool.Console/BiliBiliToolHostedService.cs:line 194
at Ray.BiliBiliTool.Console.BiliBiliToolHostedService.StartAsync(CancellationToken cancellationToken) in /ql/repo/RayWangQvQ_BiliBiliToolPro/src/Ray.BiliBiliTool.Console/BiliBiliToolHostedService.cs:line 65
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 Ray.BiliBiliTool.Console.Program.Main(String[] args) in /ql/repo/RayWangQvQ_BiliBiliToolPro/src/Ray.BiliBiliTool.Console/Program.cs:line 27

执行结束... 2024-01-07 23:18:13 耗时 74 秒

@DoiiarX
Copy link

DoiiarX commented Feb 19, 2024

经过熬夜排查我解决了这个bug。以下是思路和解决方案。

主要是端口问题。

https://notion.doiiars.com/article/fixing-bilibilitoolpro-dockercompose-failure

@RayWangQvQ
Copy link
Owner

Name does not resolve (localhost:5600) 看起来dns失败,在宿主机或qinglong容器中执行nslookup localhost试试

@RayWangQvQ RayWangQvQ added the needs-more-info Further information is requested 需要更多信息 label May 7, 2024
Copy link

🕸️ This has been inactive for 3 days, please confirm if it still needs attention~~

@github-actions github-actions bot added the Stale Stale label May 11, 2024
Copy link

🚫 This has been inactive for too long and is now closed, feel free to reopen it if needed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-more-info Further information is requested 需要更多信息 Stale Stale
Projects
None yet
Development

No branches or pull requests

3 participants