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

服务器登录,无法输入验证码 #650

Closed
fhh-coder opened this issue Apr 16, 2023 · 7 comments
Closed

服务器登录,无法输入验证码 #650

fhh-coder opened this issue Apr 16, 2023 · 7 comments
Assignees
Labels
疑问 一个疑问 陈旧 陈旧且未更新的议题

Comments

@fhh-coder
Copy link

版本号

3.0.0.0-RC

涉及的编程语言

Java

涉及的组件库

No response

疑问描述

2023-04-16 13:24:06 W/BotConfiguration: 未指定设备信息, 已使用随机设备信息. 请查看 BotConfiguration.deviceInfo 以获取更多信息.
2023-04-16 13:24:06 W/BotConfiguration: Device info isn't specified. Please refer to BotConfiguration.deviceInfo for more information
2023-04-16 13:24:06 V/Net 2138435303: Hash not match. Invaliding caches.....
2023-04-16 13:24:06 V/Net 2138435303: No server list cached.
2023-04-16 13:24:06 I/Net 2138435303: ECDH key is invalid, start to fetch ecdh public key from server.
2023-04-16 13:24:06 I/Net 2138435303: Successfully fetched ecdh public key from server.
2023-04-16 13:24:06 V/Net 2138435303: Send: wtlogin.login(9:password-login)
2023-04-16 13:24:06 V/Net 2138435303: Recv: wtlogin.login
2023-04-16 13:24:06 I/Bot 2138435303: [SliderCaptcha] 需要滑动验证码, 请按照以下链接的步骤完成滑动验证码, 然后输入获取到的 ticket
2023-04-16 13:24:06 I/Bot 2138435303: [SliderCaptcha] Slider captcha required. Please solve the captcha with following link. Type ticket here after completion.
2023-04-16 13:24:06 I/Bot 2138435303: [SliderCaptcha] @see https://github.com/project-mirai/mirai-login-solver-selenium
2023-04-16 13:24:06 I/Bot 2138435303: [SliderCaptcha] @see https://docs.mirai.mamoe.net/mirai-login-solver-selenium/
2023-04-16 13:24:06 I/Bot 2138435303: [SliderCaptcha] 或者输入 TxCaptchaHelper 来使用 TxCaptchaHelper 完成滑动验证码
2023-04-16 13:24:06 I/Bot 2138435303: [SliderCaptcha] Or type `TxCaptchaHelper` to resolve slider captcha with TxCaptchaHelper.apk
2023-04-16 13:24:06 I/Bot 2138435303: [SliderCaptcha] Captcha link: https://ssl.captcha.qq.com/template/wireless_mqq_captcha.html?style=simple&aid=16&uin=2138435303&sid=3584668342163310198&cap_cd=nIocOcH42stJ8IkiYWZIPFWTP5DQZhVRHZKUj27FDurLUdKcB4BWkw**&clientype=1&apptype=2
2023-04-16 13:24:06 W/Net 2138435303: Exception in resumeConnection.
net.mamoe.mirai.internal.network.components.LoginFailedExceptionAsNetworkException: no standard input for captcha
        at net.mamoe.mirai.internal.network.handler.CommonNetworkHandler$StateConnecting$startState$2.invokeSuspend(CommonNetworkHandler.kt:248)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:749)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
Caused by: net.mamoe.mirai.network.NoStandardInputForCaptchaException: no standard input for captcha
        at net.mamoe.mirai.utils.StandardCharImageLoginSolver$1.invokeSuspend(LoginSolver.jvm.kt:44)
        at net.mamoe.mirai.utils.StandardCharImageLoginSolver$1.invoke(LoginSolver.jvm.kt)
        at net.mamoe.mirai.utils.StandardCharImageLoginSolver$1.invoke(LoginSolver.jvm.kt)
        at net.mamoe.mirai.utils.StandardCharImageLoginSolver$input$1$1.invokeSuspend(LoginSolver.jvm.kt:56)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
        at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
        at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
        ... 4 more

2023-04-16 13:24:06 W/Net 2138435303: Network selector received exception, closing bot. (net.mamoe.mirai.internal.network.components.LoginFailedExceptionAsNetworkException: no standard input for captcha)
2023-04-16 13:24:06.727 [ERROR] [org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[dispatcherServlet]:175] - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.IllegalStateException: Can't overwrite cause with a null] with root cause
net.mamoe.mirai.network.NoStandardInputForCaptchaException: no standard input for captcha
        at net.mamoe.mirai.utils.StandardCharImageLoginSolver$1.invokeSuspend(LoginSolver.jvm.kt:44)
        at net.mamoe.mirai.utils.StandardCharImageLoginSolver$1.invoke(LoginSolver.jvm.kt)
        at net.mamoe.mirai.utils.StandardCharImageLoginSolver$1.invoke(LoginSolver.jvm.kt)
        at net.mamoe.mirai.utils.StandardCharImageLoginSolver$input$1$1.invokeSuspend(LoginSolver.jvm.kt:56)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
        at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
        at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:749)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
@fhh-coder fhh-coder added the 疑问 一个疑问 label Apr 16, 2023
@ForliyScarlet ForliyScarlet added the 等待确认 等待负责人员的确认 label Apr 16, 2023
@ForteScarlet
Copy link
Member

因为环境中没有标准输入。

可考虑选择在本地登录成功后拷贝cache,device.json文件到服务器中项目运行环境根目录下,或者使用有标准输入的启动方式等。

@ForteScarlet ForteScarlet added 等待反馈 等待发起者的反馈 and removed 等待确认 等待负责人员的确认 labels Apr 16, 2023
@fhh-coder
Copy link
Author

我是使用BotManagers注册的。请问这种情况下,有什么好的解决方式吗?
BotManagers botManagers = application.getBotManagers();

@ForliyScarlet ForliyScarlet added 等待确认 等待负责人员的确认 and removed 等待反馈 等待发起者的反馈 labels Apr 16, 2023
@ForteScarlet
Copy link
Member

没有标准输入跟你用什么注册bot没什么关系。
如果有现成且可用cache 目录和 device.json 文件,注意在 register bot的时候配置它们的相关路径无误。

比如你日志中的第一行

2023-04-16 13:24:06 W/BotConfiguration: 未指定设备信息, 已使用随机设备信息. 请查看 BotConfiguration.deviceInfo 以获取更多信息.

说明注册bot的时候并没有配置 device.json 文件。

@ForteScarlet ForteScarlet added 等待反馈 等待发起者的反馈 and removed 等待确认 等待负责人员的确认 labels Apr 16, 2023
@fhh-coder
Copy link
Author

但是我在电脑上使用idea启动,是可以输入ticket的
image

@ForliyScarlet ForliyScarlet added 等待确认 等待负责人员的确认 and removed 等待反馈 等待发起者的反馈 labels Apr 17, 2023
@ForteScarlet
Copy link
Member

idea启动一直都是有标准输入的,这很正常。在服务器上例如使用docker的时候默认情况下就是没有标准输入的。

@ForteScarlet ForteScarlet added 等待反馈 等待发起者的反馈 and removed 等待确认 等待负责人员的确认 labels Apr 17, 2023
@fhh-coder
Copy link
Author

没有使用docker。在虚机上直接启动的,centOS 7.6的操作系统

@ForliyScarlet ForliyScarlet added 等待确认 等待负责人员的确认 and removed 等待反馈 等待发起者的反馈 labels Apr 17, 2023
@ForteScarlet
Copy link
Member

只是举个例子,具体为什么没有标准输入就自己结合实际情况调查一下

@ForteScarlet ForteScarlet removed the 等待确认 等待负责人员的确认 label Apr 17, 2023
@ForteScarlet ForteScarlet added the 陈旧 陈旧且未更新的议题 label Jul 4, 2023
@ForteScarlet ForteScarlet closed this as not planned Won't fix, can't repro, duplicate, stale Feb 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
疑问 一个疑问 陈旧 陈旧且未更新的议题
Projects
None yet
Development

No branches or pull requests

3 participants