yushijinhun / authlib-injector

Build your own Minecraft authentication system.
https://authlib-injector.yushi.moe
GNU Affero General Public License v3.0
728 stars 66 forks source link

如果在velocity-3.3.0-SNAPSHOT-325中使用authlib-injector-1.2.4会出现身份验证服务宕机问题 #234

Closed SkyIce0229 closed 4 months ago

SkyIce0229 commented 5 months ago

这是ve出现的报错[authlib-injector] [INFO] Httpd is running on port 52564 [authlib-injector] [INFO] Transformed [com.velocitypowered.proxy.connection.client.InitialLoginSessionHandler] with [Constant URL Transformer] [00:42:28 ERROR]: Got an unexpected error code Optional.empty whilst contacting Mojang to log in Sky_Ice_ [00:42:28 INFO]: [initial connection] /119.34.176.119:36600 has disconnected: multiplayer.disconnect.authservers_down

wifi-left commented 5 months ago

我这边好像没问题,版本:Velocity 3.3.0-SNAPSHOT (git-b9b11665-b343) Authlib版本1.2.4

SerinaNya commented 5 months ago

相同问题,以下报错仅在使用 Velocity 时发生,普通 Paper 服务端正常。

velocity: 3.3.0-SNAPSHOT-351

> [authlib-injector] [INFO] Httpd is running on port 65139
[authlib-injector] [DEBUG] Transformed url [https://sessionserver.mojang.com/session/minecraft/hasJoined] to [http://127.0.0.1:65139/https/sessionserver.mojang.com/session/minecraft/hasJoined]
[authlib-injector] [DEBUG] Transformed url [https://sessionserver.mojang.com/session/minecraft/hasJoined] to [http://127.0.0.1:65139/https/sessionserver.mojang.com/session/minecraft/hasJoined]
[authlib-injector] [INFO] Transformed [com.velocitypowered.proxy.connection.client.InitialLoginSessionHandler] with [Constant URL Transformer]
[authlib-injector] [DEBUG] Reverse proxy: > GET https://littleskin.cn/api/yggdrasil/sessionserver/session/minecraft/hasJoined?username=SerinaNya&serverId=-1bc940471df********5f63395017e98ed866b77, headers: {content-length=0, http2-settings=AAEAAEAAAAIAAAABAAMAAABkAAQBAAAAAAUAAEAA, upgrade=h2c, user-agent=Velocity/3.3.0-SNAPSHOT (git-53923ed8-b351)}
[authlib-injector] [DEBUG] Reverse proxy: < 405 Method Not Allowed , headers: {X-Error-Info=[Origin], allow=[GET, HEAD], Server=[JSP3/2.0.14], Date=[Fri, 09 Feb 2024 07:00:57 GMT], Ohc-Cache-HIT=[sh2un53 [1], cdix175 [1]], Strict-Transport-Security=[max-age=63072000; includeSubDomains], X-Cache-Status=[MISS], Cache-Control=[no-cache, private], X-Authlib-Injector-API-Location=[https://littleskin.cn/api/yggdrasil], Set-Cookie=[locale=zh_CN; expires=Fri, 09 Feb 2024 09:00:57 GMT; Max-Age=7200; path=/; httponly; samesite=lax], Content-Type=[text/html; charset=UTF-8]}
[15:00:52 ERROR]: Got an unexpected error code 405 whilst contacting Mojang to log in SerinaNya (192.168.4.151)
[15:00:52 INFO]: [initial connection] /192.168.4.151:49729 has disconnected:

临时解决方案 Temporary solutions 👇

在启动时添加一个 JVM 参数。Add a JVM parameter at startup.

-Dauthlibinjector.disableHttpd