Repository navigation
Description
This one is hard to describe, reproduce, and everything in between.
The situation:
Eventually, RimSort or SteamCMD, tries to restore deleted mods (but only their complete folder structure with no content inside, not even in the about folder).
I'm uncertain if it tries to restore mods deleted by the user in file explorer in the past, or deleted via right clicking within RimSort, since I do both actions.
What I do know is this:
Behavior does not happen on a fresh installation, and it takes a week or so, or so many amount of mod download/updating/deletions for it to even trigger but it eventually does happen. I did notice last time I had this issue that the DepotCache folder in SteamCMD had a lot of files by the time it started troubling my mod folder, and that cleaning it up did remove the issue albeit maybe cleaning it up does mess with how RimSort figures what mods need updating since workshop mods suffer a lot from no changelogs or version data in them.
This shouldn't cause big issues but it does cause an issue where you don't know if the invalid folder is due to this event, or an actual mod you use (or made) that was corrupted somehow (this happened to me recently when a locally modified mod was just "validated" I guess and everything within removed).
Also, this happens even if you have never modified any mod manually (as this has been a problem since before I started "fixing" broken mods locally).
Finally, the replication does happen after you run a SteamCMD action like updating mods. Last time it happened to me 4 mods where updated then 60 "invalid mods" popped and upon looking at one of them via their steam ID I noticed they were all deleted mods I no longer wanted.
Edit:
Just another clarification for something I know will pop as common sense to ask: Are there any .dds files inside as remnants of previous optimization?
No, the mod that gets repopulated is 0 bytes in size. Every folder inside is empty, but it has the complete folder tree structure of the working mod. I have checked many to be sure there is no phantom residues and there is none. I also have by default the show hidden files enabled in Windows, the file extension to make sure they are indeed folders with no file extension and this is on RimSort 1.0.8 (Intel i7 8750h processor if that matters).
Activity
v-evets commentedon Jun 26, 2024
This has happened to me repeatedly, and seems to be triggered by failures (for which there is apparently no useful debugging output) of steamcmd to download a mod.
The most recent example was an update of "Smarter deconstruction and mining" (3261302741), which produced the (very helpful) message "Failed" in the steamcmd window and "Mod name not found!" from RimSort.
The moment that happened (i.e. before the steamcmd queue even finished), Rimsort started adding a large number of "Invalid Item" into the mod list.
A "Refresh" in the main RimSort window changed all those "invalid"s into mods long ago uninstalled or old (not 1.5.x compatible) versions of installed mods.
I have a hunch (just a hunch mind, I don't really speak snake) that this may have something to do with the 1.5 update and the proliferation of "1.5 update" mod forks with the same names and / or IDs as the originals... IOW, I have only seen this occur with mods that have both an original release and an updated/"continued" fork with very similar names.
As for the steamcmd download failure that triggered this, it really doesn't provide enough information to speculate, at least not the way RimSort calls it.
My quick-and-dirty "redownload everything" shell script (uses find to get workshop IDs from subdirectory names in 'game/Mods' and generate a list for steamcmd +runscript) has no such problem.
testhake commentedon Jun 28, 2024
A quick fix that seems to be working for me it's just to close Rimsort and delete the steamCMD install folder (steam and steamcmd folders) and just redownload steamCMD through Rimsort whenever I delete mods and download new ones.
Raizanad commentedon Jul 5, 2024
Yes, this isn't actually RimSort fault, but steamCMD self validation protocol or something. No need to delete the whole SteamCMD just a specific folder and file, but doing so also loses track of when you last updated your mods if no "version" field is properly set by the mod maker.
Edit: For the rimsort team, I think cleaning up cachedepot is the solution to this. I know how essential the .cp file is to tracking what app needs updating or not right now.
v-evets commentedon Jul 6, 2024
While it may not technically be RimSort at fault, this bug does have the effect of rendering it almost useless as a reliable tool for managing a modlist of any size.
I don't see any integrated option to back up/restore the mod directory, so the only thing standing between the user and a bunch of manual cleanup is remembering to make a full backup by hand before lighting the fuse on e.g. the "update workshop mods" bomb... Which explodes about 70% of the time IME.
IMO, step one should be calling steamcmd on a temporary dirtectory rather than the active mods directory, followed by some sanity checking before moving new/updated items over and updating rimsort's cache. Anything else is asking for problems.
Ideally there'd also be a detaiiled list of proposed changes in a confirmation dialog before touching the active mods directory at all, and an option to rollback to prior state.
Letting external binaries ( "or something" 🙄 ) loose on live files with no backup mechanism and no safe error handling is just dumb.
Additionally, I'll point out again that a simple shell script is quite capable of downloading every mod I have installed without errors and without making a mess, where rimsort fails with uninformative messages on seemingly random items and trashes the Mods directory...
The prime difference of course being that the former just crawls the filesystem tree, and the latter uses its own database of installed mods to generate a steamcmd command list.
If rimsort actually provided the command list for inspection before doing whatever it does I'd compare the two... but of course it doesn't, it's kept out of view of the end user in much the same way you have "upload log to random pastebin" but no "view log file" in the UI.
Raizanad commentedon Jul 7, 2024
Why so agressive on the topic? I just said thiings as they are, precisely because people are too overly focused on blaming instead of circumventing or actually helping the project. Feel free to contribute, I'm sure in the time you wrote that long ass post about how things shoulld be and how easy they are on your .sh script you may have made a pull request instead. Clean the steam depotcache if you don't plan to contribute and wish to blame someone else over something I ALREADY TOLD YOU HOW TO FIX in the meantime they work on it. Deleting a folder content is not that complicated.
LionelColaso commentedon Jul 7, 2024
I could reproduce the issue , so hopefully i will try to push a logixal fix soon
If anyone already has made a fix Pull request are always appreciated
Even if its RimSorts fault or not regardless its an issue since non techniical users will have a hard time figuring it out (deleting the steamcmd folder is a quick fix)
Raizanad commentedon Jul 7, 2024
Not sure if your fix is deleting the steamCMD folder is your solution from that comment (instead of mine band-aid), but if it is, then just do the depotcache IMO. It will clean space, while not deleting the whole directory will save data/ssd writes if it is done on every steamcmd run.
LionelColaso commentedon Jul 7, 2024
not thought of a fix at the moment but definately deleting the steamcmd folder is not what i am thinking
hk21702 commentedon Aug 21, 2024
So SteamCMD does have its own logs that it produces. I think the failure most people are getting is indeed the validation step during downloading, and steamcmd gets a "missing file" error.
I need to confirm it is caused by the depotcache. RimSort itself I don't think uses the depotcache at all. Thats all SteamCMD stuff. If this is the fix, we can implement an option to have RimSort clear the depotcache after SteamCMD runs.
hk21702 commentedon Aug 26, 2024
So after some additional exploration, it looks like it may be required to also delete the .acf file in addition to the depotcache? At least for the failed download due to failing to update the depot error.
Still inconclusive because this revelation is only based off of one instance. It could be that only the acf needs to be deleted. Or it really is just the depotcache but something just went wrong this one time. Needs more investigation.
Unfortunately, I haven't been able to personally duplicate the issues related to this.
twstagg commentedon Sep 29, 2024
@Raizanad
Hey there, thanks for the feedback. I assume you guys are getting something like this?
I have personally managed a collection of the ENTIRE workshop (38,000+ mods by my last count) by PublishedFileID via SteamCMD for the Steam Workshop Database with 0 issues. Every once in awhile, I have to completely delete a mod and allow SteamCMD to redownload it if it gets corrrupted - but that usually happened when i forgot to plug my laptop in while downloading and my battery died.
There is one thing you might check. In Settings, under the SteamCMD tab there is a validation option for SteamCMD. This adds an additional parameter to the download script which you can toggle additional validation in SteamCMD itself. I have had mixed luck with this and am unsure of what it actually does reliably for all platforms. If having that checkbox disabled doesn't work or still causes issues for you, you can check SteamCMD logs yourself at
'C:\Users\<username>\AppData\Local\RimSort\instances\Default\steamcmd\logs- particularly the fileworkshop_log.txtwill have some information. For example, when I reproduced the issue i shared above, you can see in my log file:There's already a button in settings called "Delete .acf" under the SteamCMD tab that should suffice for most people. I don't really think something needs to be added to wipe SteamCMD install itself, as the "Setup SteamCMD" button will detect if it is already existing in the instance andprompt the user to reinstall. This does in-fact blow away the entire SteamCMD installation (including depotcache and executable) and reinstall the script fresh so that it can redownload the actual executable itself, while still preserving the "Workshop install dir" - which is the
<RimSort AppData>/steam/steamapps/common/workshop/294100/{*.acf,content,download,temp}structure. That is always preserved, outside of the aforementioned "Delete .acf" button in Settings. I don't believe there is really anything else we can offer to the user outside of the link to contact Steam Support. @hk21702 might have some ideas for the future however.For the most part, you guys should be fine if you don't delete SteamCMD mods a lot.
twstagg commentedon Sep 29, 2024
@v-evets
RimSort has a log file, as well as a DEBUG mode which you can toggle in settings. Please to the "File" -> "Shortcuts" menu to find the log files on-disk. You can view / share these to ascertain plenty of useful debugging output.
Almost all of the output you will see in the "steamcmd window" is directly from SteamCMD executable. If you have the watchdog feature enabled under Settings -> Advanced, and can reproduce this weird issue with the "Invalid Item" please do share a log file with any relevant info in a bug report. This should not happen, but i have seen it happen on Windows before with Watchdog, and that might be a bug i have yet to fix.
Unfortunately, as I stated above, almost all of the output you will see in the "steamcmd window" is directly from SteamCMD executable.
RE: "integrated option to back up/restore the mod directory": Feel free to clone / backup an Instance with RimSort. It should even handle SteamCMD for you reliably.
RE: your general issues using SteamCMD: Use what i have shared with you above to report your bad experiences to us. There is no use in complaining without providing any relevant information to the actual issue you have experienced.
This is something that SteamCMD is responsible for. Let's be serious here... If SteamCMD chows on one of your mods, and you don't have a "backup" of it... Just redownload the mod like everybody else? This problem you speak of is not unique to RimSort, and even RimPy will have it's issues with SteamCMD sometimes. RimSort is not reponsible for mod backups outside of the Instance-level mechanisms provided, and also requires YOU to use it this way... It's a mod manager. It's not a magic genie that reads your mind and guesses what you want it to do for you. Pick up the hammer and hit the nail.
Again... RimSort is not trashing your mods. Something with the way you are using SteamCMD is causing it to happen. Who knows, it could be a SteamCMD bug. But it's definitely SteamCMD causing it.
The SteamCMD window literally tells you where the text that it generates to feed the download list into SteamCMD. SteamCMD supports feeding in text files as a sort of "script" of SteamCMD sub-commands to execute when passed to the SteamCMD executable:
Please... your feedback is what has allowed us to build what we have built so far. Don't just complain and talk down on our work. Give us the information we need to address it. This is a good start, but if you have additional issues in spite of the information in have provided you, feel free to file a bug report.
twstagg commentedon Sep 29, 2024
Check out branch
attempt-to-address-451with some changes during SteamCMD mod deletion