Update checker no longer works
RobiNN1 opened this issue ยท 4 comments
What is happening?
According source code this plugin uses very old update checker that does not support new bukkit api token. It's no longer possible to obtain old api key. So when starting the server it throws an error even with disabled updater.
What did you expect to happen?
No errors and support for new api token so people can use this feature.
Plugin Version
3.12.2
Plugin Config
api-key: PUT_API_KEY_HERE
disable: true
Server Version
1.19.3
Server Log
[23:55:05] [Server thread/ERROR]: [ChestShop] The updater could not load configuration at /home/ubuntu/plugins/Updater
[23:55:05] [Server thread/ERROR]: [ChestShop] null
org.bukkit.configuration.InvalidConfigurationException: expected '<document start>', but found '<block mapping start>'
in 'reader', line 5, column 1:
api-key: PUT_API_KEY_HERE ...
^
at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:106) ~[paper-api-1.19.3-R0.1-SNAPSHOT.jar:?]
at org.bukkit.configuration.file.FileConfiguration.load(FileConfiguration.java:160) ~[paper-api-1.19.3-R0.1-SNAPSHOT.jar:?]
at org.bukkit.configuration.file.FileConfiguration.load(FileConfiguration.java:128) ~[paper-api-1.19.3-R0.1-SNAPSHOT.jar:?]
at com.Acrobot.ChestShop.Updater.Updater.<init>(Updater.java:190) ~[ChestShop.jar:?]
at com.Acrobot.ChestShop.ChestShop.startUpdater(ChestShop.java:505) ~[ChestShop.jar:?]
at com.Acrobot.ChestShop.ChestShop.onEnable(ChestShop.java:171) ~[ChestShop.jar:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[paper-api-1.19.3-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:371) ~[paper-api-1.19.3-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:544) ~[paper-api-1.19.3-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_19_R2.CraftServer.enablePlugin(CraftServer.java:578) ~[paper-1.19.3.jar:git-Paper-379]
at org.bukkit.craftbukkit.v1_19_R2.CraftServer.enablePlugins(CraftServer.java:492) ~[paper-1.19.3.jar:git-Paper-379]
at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:635) ~[paper-1.19.3.jar:git-Paper-379]
at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:434) ~[paper-1.19.3.jar:git-Paper-379]
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:301) ~[paper-1.19.3.jar:git-Paper-379]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1101) ~[paper-1.19.3.jar:git-Paper-379]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:316) ~[paper-1.19.3.jar:git-Paper-379]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: org.yaml.snakeyaml.parser.ParserException: expected '<document start>', but found '<block mapping start>'
in 'reader', line 5, column 1:
api-key: PUT_API_KEY_HERE ...
^
at org.yaml.snakeyaml.parser.ParserImpl$ParseDocumentStart.produce(ParserImpl.java:274) ~[snakeyaml-1.33.jar:?]
at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:185) ~[snakeyaml-1.33.jar:?]
at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:175) ~[snakeyaml-1.33.jar:?]
at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:163) ~[snakeyaml-1.33.jar:?]
at org.yaml.snakeyaml.Yaml.compose(Yaml.java:559) ~[snakeyaml-1.33.jar:?]
at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:104) ~[paper-api-1.19.3-R0.1-SNAPSHOT.jar:?]
... 16 more
What other plugins are you running?
EssentialsX, Vault
Agreements
- I have checked if there are already similar issues open.
- I am running the latest development version available from https://ci.minebench.de/job/ChestShop-3/.
- The version has support for this type of issue.
- I have provided all requested information and agree to the terms of the project's license
Additional context
No response
Auto updates have been turned off by default in ChestShop via the TURN_OFF_UPDATES
config value for a long while now. (If that is true then the Updater will never run nor reach the code that throws an error for you)
As for your actual issue: The error is due to the updater config not being valid yaml. Not sure how you managed that but it definitely has nothing to do with any kind of "new api token".
As for supporting any kind of newer updating system based on dev bukkit (if that's what you are really asking about) then that is very unlikely to happen. Dev bukkit/curseforge is pretty dead nowadays, if anything more open alternatives or just plain GitHub releases would be used but auto updating in general is a questionably concept to begin with as it can cause lots of issues if one doesn't monitor and tests updates. Ideally that would be managed in a more interactive way and for all plugins at once, not by each plugin individually.
I agree with @Phoenix616 about the auto-updating, it gimme no info and is unpredictable.
^ I make update scripts which can be tons of work ('Minecraft' plugins are a particular offender), but once you've a framework, extending with more becomes simple and updating the current stuff becomes just a matter of some minutes of waiting.
It will most likely just be a separate update notification for stable releases in the future (similarly to the dev update notifications) and maybe some additional integration with other, global update tools e.g. my own updater program which will get a plugin version soon too.