HMCL icon indicating copy to clipboard operation
HMCL copied to clipboard

无法使用外置登录?验证令牌错误

Open LJS08 opened this issue 2 years ago • 1 comments

启动器版本 Launcher Version

3.5.3.229

平台 Platform

Windwos10

问题描述 Problem Description

HMCL在处理/api/yggdrasil/authserver/validate接口返回中似乎有问题,如将210等请求处理为204(验证成功的情况) 无法进行让令牌失效 当服务端返回500时HMCL会提示 用户信息页刷新令牌 或者在启动时提示 image 但是服务器显示返回成功 image

如果服务端返回的是101,则HMCL启动器会明显卡顿一段时间。然后显示 image 服务端日志如下 image

当然,返回2xx则直接被判定为204(甚至不是204的时候也显示登录成功) 而在文档中是这样的 image 是我理解的问题吗

Java

No response

游戏版本 Game Version

1.12.2

对游戏所做的修改 Modifications Made to the Game

No response

游戏崩溃报告 Game Crash Report

No response

启动器崩溃报告 Launcher Crash Report

当返回为101时为下面的日志 [20:06:44] [org.jackhuang.hmcl.game.LauncherHelper.lambda$logIn$49/WARNING] Authentication failed, try skipping refresh org.jackhuang.hmcl.auth.ServerDisconnectException: java.net.SocketTimeoutException: Read timed out at org.jackhuang.hmcl.auth.yggdrasil.YggdrasilService.request(YggdrasilService.java:240) at org.jackhuang.hmcl.auth.yggdrasil.YggdrasilService.validate(YggdrasilService.java:134) at org.jackhuang.hmcl.auth.yggdrasil.YggdrasilAccount.logIn(YggdrasilAccount.java:109) at org.jackhuang.hmcl.auth.authlibinjector.AuthlibInjectorAccount.lambda$logIn$0(AuthlibInjectorAccount.java:57) at org.jackhuang.hmcl.auth.authlibinjector.AuthlibInjectorAccount.inject(AuthlibInjectorAccount.java:95) at org.jackhuang.hmcl.auth.authlibinjector.AuthlibInjectorAccount.logIn(AuthlibInjectorAccount.java:57) at org.jackhuang.hmcl.game.LauncherHelper.lambda$logIn$49(LauncherHelper.java:639) at org.jackhuang.hmcl.task.Task$2.execute(Task.java:870) at org.jackhuang.hmcl.task.AsyncTaskExecutor.lambda$null$22(AsyncTaskExecutor.java:245) at org.jackhuang.hmcl.util.Lang.lambda$wrap$2(Lang.java:291) at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804) at java.base/java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1796) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) Caused by: java.net.SocketTimeoutException: Read timed out at java.base/sun.nio.ch.NioSocketImpl.timedRead(NioSocketImpl.java:283) at java.base/sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:309) at java.base/sun.nio.ch.NioSocketImpl.read(NioSocketImpl.java:350) at java.base/sun.nio.ch.NioSocketImpl$1.read(NioSocketImpl.java:803) at java.base/java.net.Socket$SocketInputStream.read(Socket.java:966) at java.base/sun.security.ssl.SSLSocketInputRecord.read(SSLSocketInputRecord.java:478) at java.base/sun.security.ssl.SSLSocketInputRecord.readHeader(SSLSocketInputRecord.java:472) at java.base/sun.security.ssl.SSLSocketInputRecord.bytesInCompletePacket(SSLSocketInputRecord.java:70) at java.base/sun.security.ssl.SSLSocketImpl.readApplicationRecord(SSLSocketImpl.java:1455) at java.base/sun.security.ssl.SSLSocketImpl$AppInputStream.read(SSLSocketImpl.java:1059) at java.base/java.io.BufferedInputStream.fill(BufferedInputStream.java:244) at java.base/java.io.BufferedInputStream.read1(BufferedInputStream.java:284) at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:343) at java.base/java.io.FilterInputStream.read(FilterInputStream.java:132) at java.base/sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:3663) at java.base/sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:3656) at org.jackhuang.hmcl.util.io.IOUtils.copyTo(IOUtils.java:76) at org.jackhuang.hmcl.util.io.IOUtils.copyTo(IOUtils.java:71) at org.jackhuang.hmcl.util.io.IOUtils.readFully(IOUtils.java:57) at org.jackhuang.hmcl.util.io.IOUtils.readFullyAsString(IOUtils.java:67) at org.jackhuang.hmcl.util.io.NetworkUtils.readData(NetworkUtils.java:212) at org.jackhuang.hmcl.util.io.NetworkUtils.doPost(NetworkUtils.java:206) at org.jackhuang.hmcl.auth.yggdrasil.YggdrasilService.request(YggdrasilService.java:238) ... 16 more 到此为止

以下是返回403时的日志 [20:09:16] [org.jackhuang.hmcl.game.LauncherHelper.lambda$logIn$49/WARNING] Authentication failed, try skipping refresh org.jackhuang.hmcl.auth.ServerDisconnectException: java.io.IOException: Server returned HTTP response code: 403 for URL: https://xxx.xxx.cn/api/yggdrasil/authserver/validate at org.jackhuang.hmcl.auth.yggdrasil.YggdrasilService.request(YggdrasilService.java:240) at org.jackhuang.hmcl.auth.yggdrasil.YggdrasilService.validate(YggdrasilService.java:134) at org.jackhuang.hmcl.auth.yggdrasil.YggdrasilAccount.logIn(YggdrasilAccount.java:109) at org.jackhuang.hmcl.auth.authlibinjector.AuthlibInjectorAccount.lambda$logIn$0(AuthlibInjectorAccount.java:57) at org.jackhuang.hmcl.auth.authlibinjector.AuthlibInjectorAccount.inject(AuthlibInjectorAccount.java:95) at org.jackhuang.hmcl.auth.authlibinjector.AuthlibInjectorAccount.logIn(AuthlibInjectorAccount.java:57) at org.jackhuang.hmcl.game.LauncherHelper.lambda$logIn$49(LauncherHelper.java:639) at org.jackhuang.hmcl.task.Task$2.execute(Task.java:870) at org.jackhuang.hmcl.task.AsyncTaskExecutor.lambda$null$22(AsyncTaskExecutor.java:245) at org.jackhuang.hmcl.util.Lang.lambda$wrap$2(Lang.java:291) at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804) at java.base/java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1796) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: https://xxx.xxx.cn/api/yggdrasil/authserver/validate at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1997) at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1589) at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:224) at org.jackhuang.hmcl.util.io.NetworkUtils.readData(NetworkUtils.java:211) at org.jackhuang.hmcl.util.io.NetworkUtils.doPost(NetworkUtils.java:206) at org.jackhuang.hmcl.auth.yggdrasil.YggdrasilService.request(YggdrasilService.java:238) ... 16 more 到此为止

启动器日志文件 Launcher Log File

No response

LJS08 avatar Feb 11 '23 12:02 LJS08

目前还有类似的问题吗

burningtnt avatar Jan 27 '24 08:01 burningtnt

本问题长时间没有更新,我先关了,如果问题还存在请重新打开一个 Issue。

Glavo avatar Mar 14 '24 09:03 Glavo