MrTigreroux / TigerReports

Spigot plugin to manage player reports.
16 stars 16 forks source link

Data too long for column #125

Closed CyriacF closed 1 year ago

CyriacF commented 2 years ago

image

Error when i click on Update in 5.1

MrTigreroux commented 2 years ago

Could you run that MySQL query (in phpMyAdmin for example following that tutorial) and give me the result please ? SELECT TOP 1 t.reporter_ip FROM tigerreports_reports AS t ORDER BY LENGTH(t.reporter_ip) DESC and replace the IP in the result with XXX (the same amount of X than characters)

CyriacF commented 2 years ago

Result : nwcsnbsc03w-XX-XX-XXX-XX.dhcp-dynamic.fibreop.nb.bellaliant.net/XX.XX.XXX.XX

MrTigreroux commented 2 years ago

Ok thank you, the error comes from the way I'm getting the player IP which isn't standard. Anyway, just run that 2 queries and all should work:

ALTER TABLE tigerreports_reports MODIFY reporter_ip VARCHAR(250);
ALTER TABLE tigerreports_reports MODIFY reported_ip VARCHAR(250)

I will try something in the next version but because I can't test I have no idea if the IP will be correctly written or not.

CyriacF commented 2 years ago

Same error after the alter table, maybe your new version put a varchar ?

MrTigreroux commented 2 years ago

I don't understand, can I see the error and what you did before it please ?

CyriacF commented 2 years ago

image Après avoir cliqué ici, j'ai cette erreur qui apparait en console : image

MrTigreroux commented 2 years ago

Ok it's my fault, just ignore that message telling you to update your data. If you want to remove that message, put this file tigerreports.version.txt in your plugins/TigerReports folder and rename it to "tigerreports.version" (remove the ".txt"). Then the red message will disappear.

CyriacF commented 2 years ago

That's good

CyriacF commented 2 years ago

New error : image

MrTigreroux commented 2 years ago

I think that you have not updated TigerReports on all your Spigot servers to the last 5.1 version.

CyriacF commented 2 years ago

All is update on all server, the message is not shown in reports and i have this error when a player want to report [17:17:16] [Craft Scheduler Thread - 558/ERROR]: [TigerReports] Une erreur est survenue avec la base de donnees: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''reported_location'='BedWars4v4-1/horloge_copy/3.65/140.0/-13.83/-219.03/25.6...' at line 1 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_331] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_331] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_331] at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_331] at com.mysql.jdbc.Util.handleNewInstance(Util.java:407) ~[patched_1.8.8.jar:git-PaperSpigot-445] at com.mysql.jdbc.Util.getInstance(Util.java:382) ~[patched_1.8.8.jar:git-PaperSpigot-445] at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052) ~[patched_1.8.8.jar:git-PaperSpigot-445] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3593) ~[patched_1.8.8.jar:git-PaperSpigot-445] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3525) ~[patched_1.8.8.jar:git-PaperSpigot-445] at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1986) ~[patched_1.8.8.jar:git-PaperSpigot-445] at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2140) ~[patched_1.8.8.jar:git-PaperSpigot-445] at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2626) ~[patched_1.8.8.jar:git-PaperSpigot-445] at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2111) ~[patched_1.8.8.jar:git-PaperSpigot-445] at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2407) ~[patched_1.8.8.jar:git-PaperSpigot-445] at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2325) ~[patched_1.8.8.jar:git-PaperSpigot-445] at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2310) ~[patched_1.8.8.jar:git-PaperSpigot-445] at fr.mrtigreroux.tigerreports.data.database.Database.update(Database.java:127) ~[?:?] at fr.mrtigreroux.tigerreports.data.database.Database.lambda$updateAsynchronously$7(Database.java:115) ~[?:?] at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:59) [patched_1.8.8.jar:git-PaperSpigot-445] at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53) [patched_1.8.8.jar:git-PaperSpigot-445] at org.github.paperspigot.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:23) [patched_1.8.8.jar:git-PaperSpigot-445] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_331] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_331] at java.lang.Thread.run(Thread.java:750) [?:1.8.0_331]

CyriacF commented 2 years ago

And antoher error on all my servers image

MrTigreroux commented 2 years ago

Thank you for reporting that errors. Do you have a world named "horloge_copy" in your server BedWars4v4-1 ? (I ask that because the name seems weird). The first error should be fixed with the new 5.1.1 version. But the second is really strange, I added a check but I'm not sure it will fix it.

CyriacF commented 2 years ago

Yes is that, i put this version and i check it

CyriacF commented 2 years ago

image Only just this error now

MrTigreroux commented 2 years ago

Ok, this error is strange because it implies that your BungeeCord server doesn't send a valid message. Do you have any BungeeCord plugin ? Do you have any special BungeeCord proxy server configuration ? Please try on a Spigot server to put that file logs.config.txt in your plugins/TigerReports folder, rename it to logs.config then restart your server, wait for the error to appear in the console/logs and then send me all the logs starting from "[TigerReports] Enabling ..." (removing any sensitive information like IPs).

MrTigreroux commented 1 year ago

If you still have this error, it would really help me if you could do what I asked in my previous message. For now, I close that issue assuming you no longer have that error.