3urobeat / steam-comment-service-bot

📡 The most advanced Steam Account Manager Bot with mass coordinated comments/likes/favs/follows and plugin support
https://steamcommunity.com/id/3urobeatscommentbot
GNU General Public License v3.0
274 stars 40 forks source link

Error loading lastcomment.db #82

Closed hamid-jogomba closed 3 years ago

hamid-jogomba commented 3 years ago

Error loading lastcomment.db database! Error: Error: More than 10% of the data file is corrupt, the wrong beforeDeserialization hook may be used. Cautiously refusing to start NeDB to prevent dataloss

3urobeat commented 3 years ago

Hey, thanks for opening an issue!
I actually haven't seen this error before so you discovered something new!
I'm not sure if this is an error caused by a mistake in my code.

To get this error away you can delete everything inside lastcomment.db in the src folder. This file is only used to store the last time each user requested a comment and is used to check if the bot should unfriend them or to check if they should have a cooldown applied.

Edit: For now I will ignore this issue as I don't think this can happen regularly. If anyone has the same error, feel free to reopen or create your own issue!

3urobeat commented 3 years ago

Nvm, a few people seem to have had this error now. I will investigate what might cause this.

3urobeat commented 3 years ago

Update: I found out that this can be caused by a second empty line in the lastcomment.db file. I will implement a check for that in the next update.

Edit: The lastcomment.db file in the master branch seems to have had an empty line in it which caused this error for people who just downloaded the bot. This empty line has been removed. I don't think anything else can cause this error as of now so I'm going to close this issue.

If this error occurs again (and therefore was caused by something else aswell) please reopen this issue or create a new one. Thanks!