neko-craft / NekoMaid

A plugin can use Web to manage your MineCraft server.
http://maid.neko-craft.com
GNU Affero General Public License v3.0
200 stars 22 forks source link

[Bug]打开webui时控制台报错:IOException ; 更改出生点保护半径不生效 #33

Closed krau closed 1 year ago

krau commented 1 year ago

Describe the bug

  1. 配置好后,打开web管理页面,控制台便会输出以下错误信息,但是并不影响实际运行

[02:06:32 ERROR] [STDERR]: java.io.IOException: Server returned HTTP response code: 401 for URL: https://hub.spigotmc.org/stash/rest/api/1.0/projects/SPIGOT/repos/spigot/commits?since=1.0.1&withCounts=true [02:06:32 ERROR] [STDERR]: at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source) [02:06:32 ERROR] [STDERR]: at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) [02:06:32 ERROR] [STDERR]: at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source) [02:06:32 ERROR] [STDERR]: at java.base/java.net.URL.openStream(Unknown Source) [02:06:32 ERROR] [STDERR]: at MC-BOOTSTRAP/com.google.common@31.0.1-jre/com.google.common.io.Resources$UrlByteSource.openStream(Resources.java:72) [02:06:32 ERROR] [STDERR]: at MC-BOOTSTRAP/com.google.common@31.0.1-jre/com.google.common.io.ByteSource$AsCharSource.openStream(ByteSource.java:474) [02:06:32 ERROR] [STDERR]: at MC-BOOTSTRAP/com.google.common@31.0.1-jre/com.google.common.io.CharSource.openBufferedStream(CharSource.java:126) [02:06:32 ERROR] [STDERR]: at TRANSFORMER/arclight@1.19.2-1.0.1-0550c6cd/org.bukkit.command.defaults.VersionCommand.getDistance(VersionCommand.java:241) [02:06:32 ERROR] [STDERR]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [02:06:32 ERROR] [STDERR]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [02:06:32 ERROR] [STDERR]: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [02:06:32 ERROR] [STDERR]: at java.base/java.lang.reflect.Method.invoke(Unknown Source) [02:06:32 ERROR] [STDERR]: at cn.apisium.nekomaid.utils.Utils.checkUpdate(Utils.java:255) [02:06:32 ERROR] [STDERR]: at cn.apisium.nekomaid.builtin.Dashboard.lambda$checkUpdate$8(Dashboard.java:157) [02:06:32 ERROR] [STDERR]: at TRANSFORMER/arclight@1.19.2-1.0.1-0550c6cd/org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftTask.run(CraftTask.java:82) [02:06:32 ERROR] [STDERR]: at TRANSFORMER/arclight@1.19.2-1.0.1-0550c6cd/org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) [02:06:32 ERROR] [STDERR]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [02:06:32 ERROR] [STDERR]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [02:06:32 ERROR] [STDERR]: at java.base/java.lang.Thread.run(Unknown Source) [02:06:32 ERROR] [STDERR]: java.io.IOException: Server returned HTTP response code: 401 for URL: https://hub.spigotmc.org/stash/rest/api/1.0/projects/SPIGOT/repos/craftbukkit/commits?since=0550c6cd&withCounts=true [02:06:32 ERROR] [STDERR]: at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source) [02:06:32 ERROR] [STDERR]: at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) [02:06:32 ERROR] [STDERR]: at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source) [02:06:32 ERROR] [STDERR]: at java.base/java.net.URL.openStream(Unknown Source) [02:06:32 ERROR] [STDERR]: at MC-BOOTSTRAP/com.google.common@31.0.1-jre/com.google.common.io.Resources$UrlByteSource.openStream(Resources.java:72) [02:06:32 ERROR] [STDERR]: at MC-BOOTSTRAP/com.google.common@31.0.1-jre/com.google.common.io.ByteSource$AsCharSource.openStream(ByteSource.java:474) [02:06:32 ERROR] [STDERR]: at MC-BOOTSTRAP/com.google.common@31.0.1-jre/com.google.common.io.CharSource.openBufferedStream(CharSource.java:126) [02:06:32 ERROR] [STDERR]: at TRANSFORMER/arclight@1.19.2-1.0.1-0550c6cd/org.bukkit.command.defaults.VersionCommand.getDistance(VersionCommand.java:241) [02:06:32 ERROR] [STDERR]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [02:06:32 ERROR] [STDERR]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [02:06:32 ERROR] [STDERR]: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [02:06:32 ERROR] [STDERR]: at java.base/java.lang.reflect.Method.invoke(Unknown Source) [02:06:32 ERROR] [STDERR]: at cn.apisium.nekomaid.utils.Utils.checkUpdate(Utils.java:256) [02:06:32 ERROR] [STDERR]: at cn.apisium.nekomaid.builtin.Dashboard.lambda$checkUpdate$8(Dashboard.java:157) [02:06:32 ERROR] [STDERR]: at TRANSFORMER/arclight@1.19.2-1.0.1-0550c6cd/org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftTask.run(CraftTask.java:82) [02:06:32 ERROR] [STDERR]: at TRANSFORMER/arclight@1.19.2-1.0.1-0550c6cd/org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) [02:06:32 ERROR] [STDERR]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [02:06:32 ERROR] [STDERR]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [02:06:32 ERROR] [STDERR]: at java.base/java.lang.Thread.run(Unknown Source)

2 . 在web页面中,更改出生点保护半径,页面提示更改成功并自动刷新,刷新之后仍然是原来的数值

To Reproduce

打开控制台监控日志,再打开nekomaid的web页面即可复现 1 在web页面中尝试更改 出生点保护半径,即可复现 2

Expected behavior

Screenshots

图片

Information

Additional context

ShirasawaSama commented 1 year ago
  1. 这不是bug,这是检测服务端更新失败的报错,因为arclight本身好像没有提供检测更新的api
  2. 介绍里写了只支持paper及其分支,像arclight这种mod混合端api变化比较厉害不做支持