kangarko / ChatControl-Red

Issue tracker and documentation for the next generation ChatControl Red, the most advanced chat management plugin.
49 stars 23 forks source link

1.17.1: Mail Error thrown in console #1317

Closed SecretarySami closed 2 years ago

SecretarySami commented 3 years ago

Minecraft Version: 1.17.1 MySQL: true BungeeCord: true

https://pastebin.com/47a3f6xv Saw this error thrown in console regarding a mail that was sent to a player.

ElBananaa commented 3 years ago

Hi, Sorry for the delay, You are using a pretty old version of the plugin, please update to the latest version available on MCM and it should hopefully fix your issue.

SecretarySami commented 3 years ago

Hi, Sorry for the delay, You are using a pretty old version of the plugin, please update to the latest version available on MCM and it should hopefully fix your issue.

this issue has shown up before and we were told to update previously and its returned

ElBananaa commented 3 years ago

Hi, Sorry for the delay, You are using a pretty old version of the plugin, please update to the latest version available on MCM and it should hopefully fix your issue.

this issue has shown up before and we were told to update previously and its returned

Well, the issue may have been fixed then reintroduced later. Anyways, as I said, try with the latest version to see if it still happens.

kangarko commented 3 years ago

Please upload a copy of that message to pastebin.com as it appears in your config or as you typed it.

SecretarySami commented 3 years ago

Please upload a copy of that message to pastebin.com as it appears in your config or as you typed it.

Little confused as I already uploaded a direct copy of the error from console to paste bin

kangarko commented 3 years ago

The error already has your message translated into JSON. I am asking you to provide your original message in the mail before our system converted it internally, since that conversion seems to be broken and I will be able to fix it by such.

SecretarySami commented 3 years ago

The error already has your message translated into JSON. I am asking you to provide your original message in the mail before our system converted it internally, since that conversion seems to be broken and I will be able to fix it by such.

Where can I find the original message by chance so I can grab that for you really quick:) sorry still learning everything!

kangarko commented 3 years ago

I just wanted to know what you typed in the mail since it appears slightly off in the error log. I will make invalid mails skip being loaded without crashing the plugin. Nevermind, let me know if it appears again.

SecretarySami commented 3 years ago

wanted to let you know that We updated the plugin to latest and did our proxy restart and upon startup and reload the error for that mail since occurs

ElBananaa commented 3 years ago

Hey, I'm sorry to read that! I'm reopening the issue so you guys can both take a deeper look at this issue!

SecretarySami commented 3 years ago

wanted to let you know that We updated the plugin to latest and did our proxy restart and upon startup and reload the error for that mail since occurs

Also wanted to add I tried searching logs for the original message as I was not the message sender or receiver and was unable to find it

kangarko commented 3 years ago

Since the code has changed since, can you please re-post that error so I can track back the lines accordingly?

SecretarySami commented 3 years ago

Since the code has changed since, can you please re-post that error so I can track back the lines accordingly?

I'm sorry i've been super sick

[22:11:47 INFO]: Reloading plugin ChatControlRed v10.6.4
[22:11:47 INFO]:   
[22:11:47 INFO]: [PlaceholderAPI] Successfully registered expansion: chatcontrolred
[22:11:47 INFO]: Connecting to MySQL database...
[22:11:47 INFO]: Update settings.yml at 'Messages.Async' -> '[]'
[22:11:47 INFO]: Warning: Detected ViaVersion. If you're getting kicked out, set Integration.ProtocolLib.Listen_For_Packets and Tab_Complete.Enabled both to false in settings.yml.
[22:11:47 INFO]:   
[22:11:47 INFO]: Tutorial:
[22:11:47 INFO]: https://github.com/kangarko/ChatControl-Red/wiki
[22:11:47 INFO]:   
[22:11:47 INFO]: Get help:
[22:11:47 INFO]: https://github.com/kangarko/ChatControl-Red/issues
[22:11:47 INFO]:   
[22:11:47 INFO]: [DiscordSRV] API listener org.mineacademy.chatcontrol.lib.model.DiscordListener$DiscordListenerImpl unsubscribed
[22:11:47 INFO]: [DiscordSRV] API listener org.mineacademy.chatcontrol.lib.model.DiscordListener$DiscordListenerImpl subscribed (2 methods)
[22:11:47 INFO]: ______________________________________________________________
[22:11:47 INFO]: [i] ChatControl 10.6.4 has been reloaded.
[22:11:47 INFO]: [ChatControlRed 10.6.4] Command /chc reload took 595.11 ms
[22:11:47 INFO]: !-----------------------------------------------------!
[22:11:47 INFO]: Failed to parse JSON from input:
[22:11:47 INFO]: {"Sender":"2aaa41f2-01de-4c3b-ae2a-925fad09970c","Recipients":[{"UUID":"f766bd15-26ff-4750-9e2d-6bafbcf09c34","Opened":true,"Open_Time":1630720722479,"Deleted":true}],"Body":{"Title":"Warning","Author":"marvjosh","Pages":["Hello General_Success, we have recently found that you are using 2 accounts of yourself to afk two sets of minions. This violates our "Alternate Account" rule, therefore your minions have been placed in the chest in fron of you and a warn has been issued","Please consider re-reading the rule at rules.voidrealms.net
[22:11:47 INFO]: 
[22:11:47 INFO]: And before you say it was fine for Negus, this is the case as we cant afk, he should not have minions up on his main account."],"Signed":true,"Last_Modified":1630676787698,"Unique_Id":"d073123c-e243-44b4-a08c-790f3d2b6df1"},"Send_Date":1630676790742}
[22:11:47 INFO]: !-----------------------------------------------------!
[22:11:47 INFO]: ChatControlRed 10.6.4 encountered a MalformedJsonException! Please check your error.log and report this issue with the information in that file.
[22:11:47 INFO]: Skipping loading invalid mail. Got: com.google.gson.stream.MalformedJsonException: Unterminated array at line 1 column 360 path $..Pages[1], raw mail data: {"Sender":"2aaa41f2-01de-4c3b-ae2a-925fad09970c","Recipients":[{"UUID":"f766bd15-26ff-4750-9e2d-6bafbcf09c34","Opened":true,"Open_Time":1630720722479,"Deleted":true}],"Body":{"Title":"Warning","Author":"marvjosh","Pages":["Hello General_Success, we have recently found that you are using 2 accounts of yourself to afk two sets of minions. This violates our "Alternate Account" rule, therefore your minions have been placed in the chest in fron of you and a warn has been issued","Please consider re-reading the rule at rules.voidrealms.net
[22:11:47 INFO]: 
[22:11:47 INFO]: And before you say it was fine for Negus, this is the case as we cant afk, he should not have minions up on his main account."],"Signed":true,"Last_Modified":1630676787698,"Unique_Id":"d073123c-e243-44b4-a08c-790f3d2b6df1"},"Send_Date":1630676790742}

There you go

ElBananaa commented 3 years ago

Hey, thanks! I may have an idea of what's causing the issue. It seems like you used "" in the middle of the json message, which could be seen as the end of the message by the plugin. Could you try to edit your JSON so it looks like that

Hello General_Success, we have recently found that you are using 2 accounts of yourself to afk two sets of minions. This violates our 'Alternate Account' rule, therefore your minions have been placed in the chest in fron of you and a warn has been issued

if that doesn't work, simply try with

Hello General_Success, we have recently found that you are using 2 accounts of yourself to afk two sets of minions. This violates our Alternate Account rule, therefore your minions have been placed in the chest in fron of you and a warn has been issued
SecretarySami commented 3 years ago

Hey, thanks! I may have an idea of what's causing the issue. It seems like you used "" in the middle of the json message, which could be seen as the end of the message by the plugin. Could you try to edit your JSON so it looks like that

Hello General_Success, we have recently found that you are using 2 accounts of yourself to afk two sets of minions. This violates our 'Alternate Account' rule, therefore your minions have been placed in the chest in fron of you and a warn has been issued

if that doesn't work, simply try with

Hello General_Success, we have recently found that you are using 2 accounts of yourself to afk two sets of minions. This violates our Alternate Account rule, therefore your minions have been placed in the chest in fron of you and a warn has been issued

Sorry to ask such simple questions but where would I edit the JSON

ElBananaa commented 3 years ago

Hey, thanks! I may have an idea of what's causing the issue. It seems like you used "" in the middle of the json message, which could be seen as the end of the message by the plugin. Could you try to edit your JSON so it looks like that

Hello General_Success, we have recently found that you are using 2 accounts of yourself to afk two sets of minions. This violates our 'Alternate Account' rule, therefore your minions have been placed in the chest in fron of you and a warn has been issued

if that doesn't work, simply try with

Hello General_Success, we have recently found that you are using 2 accounts of yourself to afk two sets of minions. This violates our Alternate Account rule, therefore your minions have been placed in the chest in fron of you and a warn has been issued

Sorry to ask such simple questions but where would I edit the JSON

Well, according to the message in your log, it looks like a user named marvjosh sent an email to General_Success using ChatControl's feature with the message above. So try reproducing the issue with

Hello General_Success, we have recently found that you are using 2 accounts of yourself to afk two sets of minions. This violates our "Alternate Account" rule, therefore your minions have been placed in the chest in fron of you and a warn has been issued

If you manage to reproduce it, try with

Hello General_Success, we have recently found that you are using 2 accounts of yourself to afk two sets of minions. This violates our 'Alternate Account' rule, therefore your minions have been placed in the chest in fron of you and a warn has been issued

and if you still manage to reproduce it, try with

Hello General_Success, we have recently found that you are using 2 accounts of yourself to afk two sets of minions. This violates our Alternate Account rule, therefore your minions have been placed in the chest in fron of you and a warn has been issued
SecretarySami commented 3 years ago

Hey, thanks! I may have an idea of what's causing the issue. It seems like you used "" in the middle of the json message, which could be seen as the end of the message by the plugin. Could you try to edit your JSON so it looks like that

Hello General_Success, we have recently found that you are using 2 accounts of yourself to afk two sets of minions. This violates our 'Alternate Account' rule, therefore your minions have been placed in the chest in fron of you and a warn has been issued

if that doesn't work, simply try with

Hello General_Success, we have recently found that you are using 2 accounts of yourself to afk two sets of minions. This violates our Alternate Account rule, therefore your minions have been placed in the chest in fron of you and a warn has been issued

Sorry to ask such simple questions but where would I edit the JSON

Well, according to the message in your log, it looks like a user named marvjosh sent an email to General_Success using ChatControl's feature with the message above. So try reproducing the issue with Hello General_Success, we have recently found that you are using 2 accounts of yourself to afk two sets of minions. This violates our "Alternate Account" rule, therefore your minions have been placed in the chest in fron of you and a warn has been issued. If you manage to reproduce it, try with Hello General_Success, we have recently found that you are using 2 accounts of yourself to afk two sets of minions. This violates our 'Alternate Account' rule, therefore your minions have been placed in the chest in fron of you and a warn has been issued and if you still manage to reproduce it, try with Hello General_Success, we have recently found that you are using 2 accounts of yourself to afk two sets of minions. This violates our Alternate Account rule, therefore your minions have been placed in the chest in fron of you and a warn has been issued

Okay I'll give this a go soon

kangarko commented 2 years ago

Delete your ChatControl_Mail database: https://i.imgur.com/leycYE4.png That will prevent the error. The next release will fix saving these symbols and thus causing this error again.