iyu46 / RemovedConnectionAlerts

Keep track of your friends and servers on BetterDiscord, and get notified if you get unfriended or kicked from a server.
11 stars 6 forks source link

An error was encountered while trying to load this plugin. #6

Closed Pyddkae closed 10 months ago

Pyddkae commented 1 year ago

How do i fix this, it pops up

https://prnt.sc/_ASuwvelEijU

iyu46 commented 1 year ago

Can you show me any error messages that appear in the console?

QuentinMcCarthy commented 1 year ago

SyntaxError: Unexpected token ' ', " "... is not valid JSON at JSON.parse () at Object.ensurePluginData (renderer.js:4:14025) at Object.getPluginData (renderer.js:4:14124) at Ot.load (renderer.js:4:358386) at getSavedData (RemovedConnectionAlerts.plugin.js:332:32) at initializeCurrentSavedData (RemovedConnectionAlerts.plugin.js:422:33) at Object.start (RemovedConnectionAlerts.plugin.js:900:13) at A.startPlugin (renderer.js:4:35582) at A.startAddon (renderer.js:4:35375) at A.enableAddon (renderer.js:4:8916) at A.toggleAddon (renderer.js:4:9173) at A.togglePlugin (renderer.js:4:32667) at renderer.js:4:85194 at renderer.js:4:79324 at Object.Me (5d60241f1a35b792bb74.js:1731:509) at je (5d60241f1a35b792bb74.js:1731:663) at 5d60241f1a35b792bb74.js:1752:416 at Ur (5d60241f1a35b792bb74.js:1752:513) at Gr (5d60241f1a35b792bb74.js:1752:927) at 5d60241f1a35b792bb74.js:1758:415 at cc (5d60241f1a35b792bb74.js:1823:267) at Le (5d60241f1a35b792bb74.js:1730:624) at Yr (5d60241f1a35b792bb74.js:1754:232) at Kt (5d60241f1a35b792bb74.js:1737:858) at Zt (5d60241f1a35b792bb74.js:1737:642) at HTMLDivElement.n (c7ba3c7ba97a256b835b.js:237:559) Just today

iyu46 commented 1 year ago

Just today

Would you be willing to share your cache file?

QuentinMcCarthy commented 1 year ago

Dunno what, or where, that is

iyu46 commented 1 year ago

Dunno what, or where, that is

Your history files can be found next to the plugin itself. They are named RemovedConnectionAlerts_{your Discord user ID number here}.config.json.

QuentinMcCarthy commented 1 year ago

Sorry for the late response, forgot about this I'll admit. I found the file in question, and this is definitely not a JSON as the file type would imply. No JSON I've ever seen is full of nul characters...

GitHub won't let me upload it as a JSON, so... RemovedConnectionAlertsCache.zip Hopefully that works?

dudeedud4 commented 1 year ago

I am getting the same error as well now. Also with the .json file full of NUL characters.

Discord did crash, or rather my entire PC did, so that could be the cause but I'm not sure.

toastewoofs commented 1 year ago

Can you show me any error messages that appear in the console?

I also get this issue. image

iyu46 commented 10 months ago

To my current understanding, this is caused by an unexpected event to Discord while the plugin is trying to save your data. The most likely event is Discord randomly crashing. I'm not entirely sure that this is the sole type of reason for this issue but it's one that I have no control over. I've made changes such as in #12 and in the readme to make creating backups of your history more accessible, and I highly recommend doing so whenever you can.

Also I accidentally clicked "close with comment" way before I was done writing my comment lol. oops