LuckPerms

LuckPerms

41.4k Downloads

Couldn't convert H2 v1 to v2

Landy005 opened this issue ยท 3 comments

commented

Description

Our permissions weren't able to be converted upon updating luckperms and we now have no permissions.

Of cours didn't backup because i expect updating a plugin will NOT alter files and just fail to load when not working.

I don't know what to send since the files are gone so I'll just send the whole luckperms file.
Download;
https://www.mediafire.com/file/71xbbnz99w43gs1/LuckPerms.zip/file

Reproduction Steps

Restart server with existing permissions from previous version
Server tries to update the data
Upgrading fails

Expected Behaviour

Update the database

Server Details

spigot 1.19.1

LuckPerms Version

v5.4.54

Logs and Configs

Nov 27 09:11 [Server] INFO [LuckPerms] Successfully enabled. (took 2143ms)
Nov 27 09:11 [Server] INFO [LuckPerms] Performing initial data load...
Nov 27 09:11 [Server] INFO [LuckPerms] Loading internal permission managers...
Nov 27 09:11 [Multicraft] Skipped 12 lines due to rate limit (30/s)
Nov 27 09:11 [Server] INFO 	at org.bukkit.craftbukkit.v1_19_R1.CraftServer.enablePlugin(CraftServer.java:565) ~[paper-1.19.2.jar:git-Paper-177]
Nov 27 09:11 [Server] INFO 	at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:542) ~[paper-api-1.19.2-R0.1-SNAPSHOT.jar:?]
Nov 27 09:11 [Server] INFO 	at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370) ~[paper-api-1.19.2-R0.1-SNAPSHOT.jar:?]
Nov 27 09:11 [Server] INFO 	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[paper-api-1.19.2-R0.1-SNAPSHOT.jar:?]
Nov 27 09:11 [Server] INFO 	at me.lucko.luckperms.bukkit.loader.BukkitLoaderPlugin.onEnable(BukkitLoaderPlugin.java:51) ~[LuckPerms-Bukkit-5.4.54.jar:?]
Nov 27 09:11 [Server] INFO 	at me.lucko.luckperms.bukkit.LPBukkitBootstrap.onEnable(LPBukkitBootstrap.java:177) ~[?:?]
Nov 27 09:11 [Server] INFO 	at me.lucko.luckperms.common.plugin.AbstractLuckPermsPlugin.enable(AbstractLuckPermsPlugin.java:185) ~[?:?]
Nov 27 09:11 [Server] INFO 	at me.lucko.luckperms.common.storage.StorageFactory.getInstance(StorageFactory.java:88) ~[?:?]
Nov 27 09:11 [Server] INFO 	at me.lucko.luckperms.common.storage.Storage.init(Storage.java:117) ~[?:?]
Nov 27 09:11 [Server] INFO 	at me.lucko.luckperms.common.storage.implementation.sql.SqlStorage.init(SqlStorage.java:166) ~[?:?]
Nov 27 09:11 [Server] INFO 	at me.lucko.luckperms.common.storage.implementation.sql.connection.file.H2ConnectionFactory.init(H2ConnectionFactory.java:68) ~[?:?]
Nov 27 09:11 [Server] INFO 	at me.lucko.luckperms.common.storage.implementation.sql.connection.file.H2ConnectionFactory$MigrateH2ToVersion2.run(H2ConnectionFactory.java:131) ~[?:?]
Nov 27 09:11 [Server] INFO 	at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:205) ~[?:?]
Nov 27 09:11 [Server] INFO 	at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:227) ~[?:?]
Nov 27 09:11 [Server] INFO 	at org.h2.command.Command.executeQuery(Command.java:219) ~[?:?]
Nov 27 09:11 [Server] INFO 	at org.h2.message.DbException.convert(DbException.java:347) ~[?:?]
Nov 27 09:11 [Server] INFO 	at org.h2.message.DbException.get(DbException.java:194) ~[?:?]
Nov 27 09:11 [Server] INFO 	at org.h2.message.DbException.getJdbcSQLException(DbException.java:427) ~[?:?]
Nov 27 09:11 [Server] INFO 	at org.h2.message.DbException.getJdbcSQLException(DbException.java:502) ~[?:?]
Nov 27 09:11 [Server] INFO SCRIPT TO '/plugins/LuckPerms/luckperms-h2-migration.sql' [50000-199]
Nov 27 09:11 [Server] INFO org.h2.jdbc.JdbcSQLNonTransientException: General error: "java.lang.ClassCastException: class org.h2.value.ValueLong cannot be cast to class org.h2.value.ValueArray (org.h2.value.ValueLong and org.h2.value.ValueArray are in unnamed module of loader me.lucko.luckperms.common.dependencies.classloader.IsolatedClassLoader @573354b3)"; SQL statement:
Nov 27 09:11 [Server] WARN [LuckPerms] Something went wrong whilst upgrading the LuckPerms database. Please report this on GitHub.
Nov 27 09:11 [Server] INFO [LuckPerms] [DB Upgrade] Stage 1: Exporting the old database to an intermediary file...
Nov 27 09:11 [Server] WARN [LuckPerms] [DB Upgrade] Found an old (v1) H2 database file. LuckPerms will now attempt to upgrade it to v2 (this is a one time operation).
Nov 27 09:11 [Server] INFO [LuckPerms] Loading storage provider... [H2]
Nov 27 09:11 [Server] INFO [LuckPerms] Loading configuration...
Nov 27 09:11 [Server] INFO |___ |      Running on Bukkit - Paper
Nov 27 09:11 [Server] INFO |    |__)   LuckPerms v5.4.54
Nov 27 09:11 [Server] INFO __    
Nov 27 09:11 [Server] INFO [LuckPerms] Enabling LuckPerms v5.4.54`

Extra Details

I updated my luckperms plugin from version 5.3.53 to 5.4.54

commented

please send your full log file with something like this. its very hard to read it the way you sent it.
also you should ALWAYS make backups before changing ANYTHING. I also dont see why its unreasonable for luckperms to switch to a newer version of H2 and automatically convert the file.

commented

please send your full log file with something like this. its very hard to read it the way you sent it. also you should ALWAYS make backups before changing ANYTHING. I also dont see why its unreasonable for luckperms to switch to a newer version of H2 and automatically convert the file.

https://pastes.dev/6KNC2YUz04

I can ask a backup from my server host but that will take a day. Regardless wether I made a backup or not is irrelevant to this bug report, it'll just put me on the older version again. I have to settle for just not updating? I'm just looking for a way to make it convert.

commented

If you roll back to the previous version, your permissions should re-appear. (the migration doesn't delete the old data)