Error Whilst Saving User - Issue
Valentiines opened this issue ยท 1 comments
Description
Migrated my server from a SparkedHost server over to a dedicated server via r-sync, one of my developers added a PMA (PhpMyAdmin) during this. Everytime I try to give someone a permission group or permission it says its completed it but doesn't follow through with genuinely giving the permission.
Reproduction steps
Best way I can reproduce the error is simply just doing /lp user MrCaust permission set * and it replies with "[Thu, 15. Apr 2021 19:44:03 PDT WARN] Error whilst saving user" "[Thu, 15. Apr 2021 19:44:03 PDT INFO] [LP] There was an error whilst saving user data for mrcaust."
Expected behaviour
Does nothing, says my permission (*) was given but doesn't actually put it in.
Environment details
- Server Brand: Purpur , git-Purpur-964 (MC: 1.16.5) - 1.16.5-R0.1-SNAPSHOT
- Storage: MYSQL , Ping: 1ms, Connected: True.
- No static context for instance
https://paste.lucko.me/fyyEmliExN
(Latest version of LuckPerms.)
Caused by: java.sql.SQLException: Field 'id' doesn't have a default value
at me.lucko.luckperms.lib.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129) ~[?:?]
at me.lucko.luckperms.lib.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97) ~[?:?]
at me.lucko.luckperms.lib.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) ~[?:?]
at me.lucko.luckperms.lib.mysql.cj.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:637) ~[?:?]
at me.lucko.luckperms.lib.mysql.cj.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:418) ~[?:?]
at me.lucko.luckperms.lib.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1092) ~[?:?]
at me.lucko.luckperms.lib.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1040) ~[?:?]
at me.lucko.luckperms.lib.mysql.cj.jdbc.ClientPreparedStatement.executeLargeUpdate(ClientPreparedStatement.java:1347) ~[?:?]
at me.lucko.luckperms.lib.mysql.cj.jdbc.ClientPreparedStatement.executeBatchedInserts(ClientPreparedStatement.java:716) ~[?:?]
at me.lucko.luckperms.lib.mysql.cj.jdbc.ClientPreparedStatement.executeBatchInternal(ClientPreparedStatement.java:426) ~[?:?]
at me.lucko.luckperms.lib.mysql.cj.jdbc.StatementImpl.executeBatch(StatementImpl.java:796) ~[?:?]
at me.lucko.luckperms.lib.hikari.pool.ProxyStatement.executeBatch(ProxyStatement.java:127) ~[?:?]
at me.lucko.luckperms.lib.hikari.pool.HikariProxyPreparedStatement.executeBatch(HikariProxyPreparedStatement.java) ~[?:?]
at me.lucko.luckperms.common.storage.implementation.sql.SqlStorage.updatePermissions(SqlStorage.java:832) ~[?:?]
at me.lucko.luckperms.common.storage.implementation.sql.SqlStorage.updateUserPermissions(SqlStorage.java:784) ~[?:?]
at me.lucko.luckperms.common.storage.implementation.sql.SqlStorage.saveUser(SqlStorage.java:375) ~[?:?]
at me.lucko.luckperms.common.storage.Storage.lambda$saveUser$5(Storage.java:157) ~[?:?]
at me.lucko.luckperms.common.storage.Storage.lambda$future$1(Storage.java:100) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1736) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1728) ~[?:?]
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290) ~[?:?]
at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020) ~[?:?]
at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656) ~[?:?]
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594) ~[?:?]
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183) ~[?:?]
Seems like your MySQL tables were not migrated correctly.
The id fields should be auto_increment: https://github.com/lucko/LuckPerms/blob/master/common/src/main/resources/me/lucko/luckperms/schema/mysql.sql#L17