brianmiller / phvalheim-server

PhValheim backend server
GNU General Public License v2.0
26 stars 5 forks source link

The strangest bug, mods downloading and showing installed, but not installed (Also feature request) #50

Open gstrange42 opened 5 months ago

gstrange42 commented 5 months ago

This is an odd bug, it might be a one-off, or just very rare. A mod I use updated, the server downloaded the new version, didn't install it but deleted the old version from the world. No matter how many times I edited the mods removing it and adding it never installed.

I had to go into mods/ts folder and delete all the old archives in the cache and get it to download the archive again. Then it installed fine.

To this end, would adding a "Purge Mod Cache" button be possible so you can easily delete all the old archives in the mods/ts folder to force the server to re-download them if required. This solved my problem, and I wonder if a fresh download could solve some other issues people have.

gstrange42 commented 5 months ago

Just had a thought, could the archive it downloaded have corrupted, where it reports it has been installed, but never unpacks the archive. I couldn't find anything to suggest the archive was corrupt, deleting it so it could be re-downloaded fixed it.

brianmiller commented 5 months ago

ooh interesting. good idea.

we don't run a checksum after the archives are downloaded. I suspect you're correct that the file was corrupt. A purge or checksum option may be necessary.

gstrange42 commented 5 months ago

ooh interesting. good idea.

we don't run a checksum after the archives are downloaded. I suspect you're correct that the file was corrupt. A purge or checksum option may be necessary.

Both might be good options, though if someone has a lot of mods a purge will eat resources more. At least with a checksum, you only need to download and process 1 archive.