pop4959 / Bolt

Modern protection solution for individual blocks and entities
GNU General Public License v3.0
50 stars 7 forks source link

Error using `/bolt edit add` #114

Closed GLufano closed 9 months ago

GLufano commented 9 months ago

Hello, today I quickly needed to convert my Bolt back to LWC, it's an error that is only happening with my main server, I couldn't find the cause of the problem, but some players were abusing the command /bolt edit add <user > and the server crashed at the same time. I tried updating to newer versions of Bolt and couldn't find the problem. The temporary solution I had was to convert back to LWC. I've been using Bolt for just over 6 months, and I recently updated some plugins, I imagine there may be a conflict between them or this problem has been going on for a long time and players only discovered it recently, I'm checking further but I thought it was important to report.

Below is a log of the command being used and the crash afterwards. https://paste.gg/p/anonymous/a40b604a6f034407bf57ecc4e9856f20

Thanks, your plugin is amazing! I hope I can resolve the issue so I can get back to you as soon as possible!

pop4959 commented 9 months ago

Hm, yeah, it looks like there is a blocking profile completion there. That should definitely be fixed.

That said, I would not be surprised if this went unnoticed for a long time since normally even the slowest this should be is a fraction of a second. Maybe Mojang's servers were down or something.

I appreciate the transparency and I will try to find a solution soon so you can feel comfortable using Bolt again.

Thank you for the report!

pop4959 commented 9 months ago

Should be fixed by 27267dc4202642ca47a7ff6174a6c61f75e6693a. That said, if a profile lookup takes a long time for whatever reason, their action will be delayed until it completes. However it should not crash the server anymore.

The latest build can be found here as it is not yet released.

If you're still having problems, please join the Discord server as it will be easier to troubleshoot there, and perhaps we can explore other solutions (adding a maximum timeout, etc) as a follow-up if necessary.

Also, just because I realized that when you convert back, you will likely already have a mostly complete Bolt database, I went and made sure that it will properly "back-fill" when you re-run the conversion process.

Back-filling means that only protections that do not already exist in your Bolt database will be added (e.g. only the difference in new protections from LWC). This reduces the risk of lossy conversion (which is rare, but always an inherent risk since the data upgrades may not be 1:1). I always recommend keeping your existing LWC/Bolt databases around just so that you have the original protections in one or both of them while performing these upgrades.

pop4959 commented 9 months ago

Also worth noting that the back-filling is already implemented for Bolt -> LWC (going back to LWC) but I just never had it implemented for LWC -> Bolt since the assumption previously is that these are all "new users", but in your situation that isn't really the case since you were using Bolt before, so we need to handle that now. :D