DiscordSRV

DiscordSRV

86.8k Downloads

DiscordSRV v1.19.0 breaks fully on 1.12.2 Paper

TomLewis opened this issue ยท 5 comments

commented

I updated to 1.19.0 from 1.18.3 and its fully broken on startup using paper 1.12.2.

[10:31:29] [Server thread/INFO]: [DiscordSRV] Enabling DiscordSRV v1.19.0
[10:31:29] [Server thread/INFO]: [DiscordSRV] Your DiscordSRV config file was outdated; attempting migration...
[10:31:29] [Server thread/ERROR]: [DiscordSRV] Failed migrating configs: Destination 'plugins/DiscordSRV/messages.yml-build.1.16.0.old' already exists
[10:31:29] [Server thread/ERROR]: Error occurred while enabling DiscordSRV v1.19.0 (Is it up to date?)
java.lang.ClassCastException: 'MinecraftDiscordAccountLinkedAllowRelinkBySendingANewCode' miscast in path root->*MinecraftDiscordAccountLinkedAllowRelinkBySendingANewCode*: Cannot cast java.lang.Boolean to java.lang.String. Avoid by checking `if (aDynamic.is(String.class)) ...` or using `aDynamic.maybe().as(String.class)`
	at alexh.weak.DynamicChild.as(DynamicChild.java:52) ~[?:?]
	at alexh.weak.Weak.asString(Weak.java:67) ~[?:?]
	at github.scarsz.discordsrv.util.ConfigUtil.logMissingOptions(ConfigUtil.java:187) ~[?:?]
	at github.scarsz.discordsrv.DiscordSRV.onEnable(DiscordSRV.java:325) ~[?:?]
	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[patched_1.12.2.jar:git-Paper-1617]
	at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:316) ~[patched_1.12.2.jar:git-Paper-1617]
	at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405) ~[patched_1.12.2.jar:git-Paper-1617]
	at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugin(CraftServer.java:395) ~[patched_1.12.2.jar:git-Paper-1617]
	at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugins(CraftServer.java:344) ~[patched_1.12.2.jar:git-Paper-1617]
	at net.minecraft.server.v1_12_R1.MinecraftServer.t(MinecraftServer.java:442) ~[patched_1.12.2.jar:git-Paper-1617]
	at net.minecraft.server.v1_12_R1.MinecraftServer.l(MinecraftServer.java:403) ~[patched_1.12.2.jar:git-Paper-1617]
	at net.minecraft.server.v1_12_R1.MinecraftServer.a(MinecraftServer.java:341) ~[patched_1.12.2.jar:git-Paper-1617]
	at net.minecraft.server.v1_12_R1.DedicatedServer.init(DedicatedServer.java:289) ~[patched_1.12.2.jar:git-Paper-1617]
	at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:616) ~[patched_1.12.2.jar:git-Paper-1617]
	at java.lang.Thread.run(Thread.java:834) [?:?]
[10:31:29] [Server thread/INFO]: [DiscordSRV] Disabling DiscordSRV v1.19.0
commented

That is a different error, means there's a syntax error in the messages.yml file: use a yaml parser like https://yaml.helpch.at or join our Discord for help: https://discordsrv.com/discord #support

commented

@Vankka Didn't work.
The update converetd my config, and apparently broke it.

[10:30:54] [Server thread/ERROR]: Could not load 'plugins/DiscordSRV-Build-1.19.1-SNAPSHOT-1591350458.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: java.lang.RuntimeException: Failed to load config
	at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:131) ~[patched_1.12.2.jar:git-Paper-1617]
	at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:329) ~[patched_1.12.2.jar:git-Paper-1617]
	at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:251) ~[patched_1.12.2.jar:git-Paper-1617]
	at org.bukkit.craftbukkit.v1_12_R1.CraftServer.loadPlugins(CraftServer.java:318) ~[patched_1.12.2.jar:git-Paper-1617]
	at net.minecraft.server.v1_12_R1.DedicatedServer.init(DedicatedServer.java:222) ~[patched_1.12.2.jar:git-Paper-1617]
	at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:616) ~[patched_1.12.2.jar:git-Paper-1617]
	at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.lang.RuntimeException: Failed to load config
	at github.scarsz.discordsrv.DiscordSRV.<init>(DiscordSRV.java:288) ~[?:?]
	at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?]
	at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:490) ~[?:?]
	at java.lang.Class.newInstance(Class.java:584) ~[?:?]
	at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:94) ~[patched_1.12.2.jar:git-Paper-1617]
	at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:127) ~[patched_1.12.2.jar:git-Paper-1617]
	... 6 more
Caused by: github.scarsz.configuralize.ParseException: Error parsing config file messages.yml: while parsing a block mapping
 in 'string', line 24, column 1:
    DiscordToMinecraftChatMessageFor ... 
    ^
expected <block end>, but found Scalar
 in 'string', line 195, column 42:
     ... atChannelServerStartupMessage: ":white_check_mark: **Server has  ... 
                                         ^

	at github.scarsz.configuralize.Provider.load(Provider.java:35) ~[?:?]
	at github.scarsz.configuralize.Provider.loadValues(Provider.java:56) ~[?:?]
	at github.scarsz.configuralize.Provider.load(Provider.java:52) ~[?:?]
	at github.scarsz.configuralize.DynamicConfig.loadAll(DynamicConfig.java:96) ~[?:?]
	at github.scarsz.discordsrv.DiscordSRV.<init>(DiscordSRV.java:286) ~[?:?]
	at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?]
	at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:490) ~[?:?]
	at java.lang.Class.newInstance(Class.java:584) ~[?:?]
	at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:94) ~[patched_1.12.2.jar:git-Paper-1617]
	at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:127) ~[patched_1.12.2.jar:git-Paper-1617]
	... 6 more
Caused by: org.yaml.snakeyaml.parser.ParserException: while parsing a block mapping
 in 'string', line 24, column 1:
    DiscordToMinecraftChatMessageFor ... 
    ^
expected <block end>, but found Scalar
 in 'string', line 195, column 42:
     ... atChannelServerStartupMessage: ":white_check_mark: **Server has  ... 
                                         ^

	at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(ParserImpl.java:571) ~[patched_1.12.2.jar:git-Paper-1617]
	at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:157) ~[patched_1.12.2.jar:git-Paper-1617]
	at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:147) ~[patched_1.12.2.jar:git-Paper-1617]
	at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:227) ~[patched_1.12.2.jar:git-Paper-1617]
	at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:154) ~[patched_1.12.2.jar:git-Paper-1617]
	at org.yaml.snakeyaml.composer.Composer.composeDocument(Composer.java:122) ~[patched_1.12.2.jar:git-Paper-1617]
	at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:105) ~[patched_1.12.2.jar:git-Paper-1617]
	at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:140) ~[patched_1.12.2.jar:git-Paper-1617]
	at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:524) ~[patched_1.12.2.jar:git-Paper-1617]
	at org.yaml.snakeyaml.Yaml.loadAs(Yaml.java:501) ~[patched_1.12.2.jar:git-Paper-1617]
	at github.scarsz.configuralize.Provider.load(Provider.java:28) ~[?:?]
	at github.scarsz.configuralize.Provider.loadValues(Provider.java:56) ~[?:?]
	at github.scarsz.configuralize.Provider.load(Provider.java:52) ~[?:?]
	at github.scarsz.configuralize.DynamicConfig.loadAll(DynamicConfig.java:96) ~[?:?]
	at github.scarsz.discordsrv.DiscordSRV.<init>(DiscordSRV.java:286) ~[?:?]
	at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?]
	at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:490) ~[?:?]
	at java.lang.Class.newInstance(Class.java:584) ~[?:?]
	at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:94) ~[patched_1.12.2.jar:git-Paper-1617]
	at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:127) ~[patched_1.12.2.jar:git-Paper-1617]
	... 6 more
commented

That's not very helpful without providing what part of the file it broke / the file

commented

I haven't changed my files, the conversion did.
What I'm saying is your conversion broke the config files to not be valid.
I have not touched mine that have been working for months.

commented

This should be fixed in development builds, https://snapshot.discordsrv.com