Error managing mods via SFTP

I manage mods on a remote dedicated server via SFTP. I can add the server info into SMM and add/update/remove mods without issue (though slowly - mods extract to the remote server at like 50kbps). The next time I come back to SMM, however, if I try to add/update/remove a mod I always get the error "failed to get platform: failed to validate installation: failed reading FactoryGameSteam.exe: failed to check if file exists: connection lost". If I then remove the server SFTP info from SMM and re-add it using the exact same SFTP info it will generally start working again. Sometimes I need to do this twice in a row. In addition to be kind of annoying, this leads to problems where my local machine and remote server are out of sync on versions, causing all kinds of annoying issues. Any recommendations? I couldn't find many references to others with this issue.
51 Replies
FICSIT-Fred
FICSIT-Fred3mo ago
Automated responses for Dor (112043686556155904)
Key Details for SMMDebug-2024-12-14-11-23-07.zip
SMM Version: 3.0.3
SML Version: 3.8.0
Installed Mods: 19
Game: WindowsClient CL 384038 from steam
Path: `d:\SteamLibrary\steamapps\common\Satisfactory`
Command Line: cmd /C start steam://rungameid/526870-NO_EOS_OVERLAY
SMM Version: 3.0.3
SML Version: 3.8.0
Installed Mods: 19
Game: WindowsClient CL 384038 from steam
Path: `d:\SteamLibrary\steamapps\common\Satisfactory`
Command Line: cmd /C start steam://rungameid/526870-NO_EOS_OVERLAY
failedtodeletemoddirectory
It looks like SMM is failing to delete a mod directory. Make sure the server is stopped before trying to modify installed mods. -# Rule logic: https://regex101.com/r/omre0i/
sftp_servermustbestopped
You should shut down the dedicated server executable before trying to install mods on it.
Dor
DorOP3mo ago
(the server is always stopped when this happens)
Mircea
Mircea3mo ago
When you say the next time in SMM, you mean you restart SMM, or leave it open and come back later?
Dor
DorOP3mo ago
Either one, actually. Could be next session or later in the same session. I have not pinned down exactly how much later it has to be.
Mircea
Mircea3mo ago
{"time":"2024-12-13T20:01:24.4553116-08:00","level":"ERROR","msg":"failed to resolve dependencies","task":"checkForUpdates","error":"failed resolving profile dependencies: failed to solve dependencies: failed to make decision: failed to get package versions: failed to fetch mod WallPipeSupports: failed fetching all versions: Get \"https://api.ficsit.app/v1/mod/WallPipeSupports/versions/all\": dial tcp: lookup api.ficsit.app: getaddrinfow: The requested name is valid, but no data of the requested type was found."}
{"time":"2024-12-14T03:22:52.6393897-08:00","level":"INFO","msg":"saving profiles","path":"C:\\Users\\dores\\AppData\\Roaming\\ficsit\\profiles.json"}
{"time":"2024-12-14T03:22:52.6404091-08:00","level":"ERROR","msg":"failed to install","action":{"type":"install","item":"CurveBuilder"},"install":"d:\\SteamLibrary\\steamapps\\common\\Satisfactory","profile":"Satisfactory Mods","error":"failed to get platform: failed to validate installation: failed reading FactoryGameSteam.exe: failed to check if file exists: connection lost"}
{"time":"2024-12-14T03:22:52.6404091-08:00","level":"INFO","msg":"action failed","action":{"type":"install","item":"CurveBuilder"}}
{"time":"2024-12-14T03:23:13.7765268-08:00","level":"WARN","msg":"failed to add FactoryGame.log to debuginfo zip","path":"sftp://user:pass@******/ip_port","error":"failed to check if log exists: failed to check if file exists: connection lost"}
{"time":"2024-12-13T20:01:24.4553116-08:00","level":"ERROR","msg":"failed to resolve dependencies","task":"checkForUpdates","error":"failed resolving profile dependencies: failed to solve dependencies: failed to make decision: failed to get package versions: failed to fetch mod WallPipeSupports: failed fetching all versions: Get \"https://api.ficsit.app/v1/mod/WallPipeSupports/versions/all\": dial tcp: lookup api.ficsit.app: getaddrinfow: The requested name is valid, but no data of the requested type was found."}
{"time":"2024-12-14T03:22:52.6393897-08:00","level":"INFO","msg":"saving profiles","path":"C:\\Users\\dores\\AppData\\Roaming\\ficsit\\profiles.json"}
{"time":"2024-12-14T03:22:52.6404091-08:00","level":"ERROR","msg":"failed to install","action":{"type":"install","item":"CurveBuilder"},"install":"d:\\SteamLibrary\\steamapps\\common\\Satisfactory","profile":"Satisfactory Mods","error":"failed to get platform: failed to validate installation: failed reading FactoryGameSteam.exe: failed to check if file exists: connection lost"}
{"time":"2024-12-14T03:22:52.6404091-08:00","level":"INFO","msg":"action failed","action":{"type":"install","item":"CurveBuilder"}}
{"time":"2024-12-14T03:23:13.7765268-08:00","level":"WARN","msg":"failed to add FactoryGame.log to debuginfo zip","path":"sftp://user:pass@******/ip_port","error":"failed to check if log exists: failed to check if file exists: connection lost"}
Looks like your entire PC loses internet connection briefly, because even ficsit.app is unreachable Restarting SMM would reopen the connection the same way that removing and readding the server does, which is why I asked this
Dor
DorOP3mo ago
No noticeable drop in connectivity when it happens, and it persists indefinitely until I remove/re-add the SFTP info, so that's interesting. Just occurred again. Order of operations: 1. SMM has remained open since my last update this morning. 2. Stop dedicated server. 3. Attempt to update mod 'Persistent Paintables' - receive same error message as usual. Export debug logs. 4. Close and reopen SMM. 5. Local machine and remote server are now out of sync, no option to update the mod. 6. Uninstall mod via SMM. No error occurs. 7. Reinstall mod via SMM. No error, currently extracting to dedicated server. I could swear I have tried just restarting SMM many times in the past and it has not been successful, as that is the first and most obvious thing I would try. That said, it worked to reconnect to the dedicated server in this case.
Mircea
Mircea3mo ago
For the update thing, at the moment updates are specific to an install, so when you update mods you have to check for updates on both installs But other than that, if mods are out of sync you can press "mods on" to "verify" the mod install (it just reapplies the current profile, even if mods are already on) I will look into detecting if the connection is lost, and reestablishing it when that happens
FICSIT-Fred
FICSIT-Fred3mo ago
Automated responses for Be_Mann (556243639135633418)
Outdated mods found!
Production Stats can be updated to 1.0.19 Satisfactory Mod Loader can be updated to 3.9.0 SnapOn can be updated to 1.2.1 Just Pause can be updated to 1.1.6 Kyris Private Code Library can be updated to 3.1.0 Kyris Blueprint Function Library can be updated to 3.1.0 Kyris User Interface Library can be updated to 3.1.0 Cable Choices Plus can be updated to 1.1.2 Container Screens and more can be updated to 1.0.24 Efficiency Checker Mod can be updated to 2.5.10 Marcio Common Libs can be updated to 1.3.8 Modular Load Balancers can be updated to 1.13.6 Power Checker can be updated to 2.4.7 Fluid Extras can be updated to 1.0.9 Update these mods, there may be fixes for your issue in doing so.
pleasegeneratedebuginfo
It looks like you have not yet generated the debug info file! Please do as the mod manager requested. Click the "Generate debug info" button and send the zip file in <#1243688087578738770> otherwise we will not be able to help you!
Key Details for SMMDebug-2024-12-27-15-39-38.zip
SMM Version: 3.0.3
SML Version: 3.8.0
Installed Mods: 46
Game: WindowsServer CL 379322 from Island Chronicles
Path: `sftp://user:pass@******/`
SMM Version: 3.0.3
SML Version: 3.8.0
Installed Mods: 46
Game: WindowsServer CL 379322 from Island Chronicles
Path: `sftp://user:pass@******/`
sftp_servermustbestopped
You should shut down the dedicated server executable before trying to install mods on it.
Be_Mann
Be_Mann5w ago
Is there any news on this yet? Slowly we would really like to start playing on our dedicated server, but this is not possible with mods because the ModManager has problems.
Mircea
Mircea5w ago
Are you using AMP to manage the server?
Be_Mann
Be_Mann5w ago
Yes, that is correct
Mircea
Mircea5w ago
Then it's an issue with AMP's SFTP implementation, not with SMM. When SMM updates a mod it has to check if the mod is already installed, and delete the old mod folder. But what happens is that AMP says the folder exists when SMM checks, but when SMM tries to delete it just a fraction of a second later AMP says that it doesn't exist As a workaround, since your server is running on windows, you can use network shares (\\IP\Path\To\Satisfactory\Server) in SMM using the path option in the server manager, or manually delete the folders that it errors on
Be_Mann
Be_Mann5w ago
So I have logged in with Filezilla via FTP and both read and write permissions are correct, it can be deleted and only files/folders that exist are displayed. The server is not in the network, I will not do any network sharing over the Internet, Windows network sharing is too insecure for that. And deleting them manually via FTP with every update doesn't really make much sense if SMM is supposed to do it, because as I said, the authorizations are correct.
Mircea
Mircea5w ago
I am trying to see what's going on now, but AMP is being a pain to test without paying for a license And last time I tried to debug it, AMP just wouldn't work at all
Be_Mann
Be_Mann5w ago
If I can help to identify the problem just let me know, I am happy to help I think I just saw something, e.g. with PowerChecker, there is a folder Binaries/Win64 in the mod folder of PowerChecker which is empty, if I delete it, it seems to be fixed for this mod
failed to install mods: failed to install [email protected]: could not extract PowerChecker: failed to remove directory: \FactoryGame\Mods\PowerChecker: failed to delete path: file does not exist
failed to install mods: failed to install [email protected]: could not extract PowerChecker: failed to remove directory: \FactoryGame\Mods\PowerChecker: failed to delete path: file does not exist
Mircea
Mircea5w ago
Hmm, so "file does not exist" should actually be "directory not empty"?
Be_Mann
Be_Mann5w ago
So I have now deleted binaries including subfolders for all mods when Binaries/Win64 was empty and there were other errors with empty config folders or also with empty config/localization folders. There seems to be a query in SMM that blocks empty folders. But it keeps creating the empty folders. Also the update behavior is a bit strange
Mircea
Mircea5w ago
SMM is just using the golang SFTP client and calls the RemoveAll for a recursive delete https://github.com/pkg/sftp/blob/fb0652cf58a5dec0a399756c4c5e0753fc028985/client.go#L959-L994
Be_Mann
Be_Mann5w ago
Be_Mann
Be_Mann5w ago
Yes, RemoveAll is all well and good, but it creates empty folders that didn't exist before, especially in other mod folders, even though a mod is selected for updating.
Mircea
Mircea5w ago
It first computes the lockfile (list of all mods to be installed and their versions) and saves it, and then syncs the actual files to that, so if you tried to update Refined Power (or another mod that depends on it and caused it to update), that update is saved, but the install is out of sync with that because it errored before, so it now has to sync that mod too, not just the one you selected for update RemoveAll can't create directories though Finally got AMP to let me connect Looks like it fails to delete any folder that is empty, I had to delete every empty folder, one try at a time I wonder if it's returning . or .. as "files" in the directory, causing that
Be_Mann
Be_Mann5w ago
I have now completely emptied the mod folder, deactivated the mods and then reactivated them so that it starts synchronizing again. Oh that could be good, would be nothing unusual The result is:
failed to install mods: failed to install [email protected]: could not extract KPrivateCodeLib: failed to write to file: \FactoryGame\Mods\KPrivateCodeLib\Binaries\Win64\FactoryServer-KPrivateCodeLib-Win64-Shipping.pdb: failed to send packet: EOF
failed to install mods: failed to install [email protected]: could not extract KPrivateCodeLib: failed to write to file: \FactoryGame\Mods\KPrivateCodeLib\Binaries\Win64\FactoryServer-KPrivateCodeLib-Win64-Shipping.pdb: failed to send packet: EOF
Mircea
Mircea5w ago
Click mods on again and it will try again. Either a temporary network issue, or the connection was lost and you need to restart SMM (it doesn't try to reopen the connection at the moment)
Be_Mann
Be_Mann5w ago
Had to restart, but now we are back to the problem with the empty folder (failed to delete path: file does not exist) Here is an excerpt from the Filezilla debugging:
Befehl: ls
Status: Listing directory /FactoryGame/Mods
Auflistung: drwx------ 2 Satisfactory users 0 Feb 02 13:29 .
Auflistung: drwx------ 2 Satisfactory users 0 Feb 02 13:29 ..
Befehl: ls
Status: Listing directory /FactoryGame/Mods
Auflistung: drwx------ 2 Satisfactory users 0 Feb 02 13:29 .
Auflistung: drwx------ 2 Satisfactory users 0 Feb 02 13:29 ..
Mircea
Mircea5w ago
Mh I checked now and sftp should be skipping those already https://github.com/pkg/sftp/blob/fb0652cf58a5dec0a399756c4c5e0753fc028985/client.go#L370
Mircea
Mircea5w ago
This is the path it's saying doesn't exist
No description
Mircea
Mircea5w ago
Looks like filezilla sends a rmdir packet, but go's sftp sends a rm Oh, and AMP doesn't return a sshExFailure, or sshExFileIsADirectory, it just returns "doesn't exist", so go's sftp can't then try to use rmdir
Mircea
Mircea5w ago
Well, this patch to go sftp does fix it
No description
Be_Mann
Be_Mann5w ago
So via SSH when I execute rm the following appears:
rm Stats
rm: cannot remove `/FactoryGame/Mods/Stats': Is a directory
rm Stats
rm: cannot remove `/FactoryGame/Mods/Stats': Is a directory
But well then it mainly uses shell commands
Mircea
Mircea5w ago
I assumed SFTP also uses the shell commands internally, but apparently not
Mircea
Mircea5w ago
No description
Be_Mann
Be_Mann5w ago
I must confess, I have never used rmdir, I always work with “rm -r” 😉
Mircea
Mircea5w ago
This is in a sftp shell, not ssh
Mircea
Mircea5w ago
And a sane ssh/sftp server, not claiming the folder doesn't exist if you try the wrong command on it
No description
Be_Mann
Be_Mann5w ago
Yes, that's both true 😉
Mircea
Mircea5w ago
And I thought only FTP was the Fucking Trash Protocol because noone actually follows the specs
No description
Mircea
Mircea5w ago
0/2 on following the specs so far
Be_Mann
Be_Mann5w ago
So I am an advocate of the use of specifications or norms, this gives the possibility that others can work with his software without problems. If I may, I will save the picture of the specs and ask the developers of AMP if they have even read them xD
Mircea
Mircea5w ago
Lol I hope they are using some obscure sftp server and didn't implement it on their own Because if they did and didn't read the specs while doing so...
Be_Mann
Be_Mann5w ago
I can well imagine that they use a library so that they don't have to do it themselves.
Mircea
Mircea5w ago
I found a reference to Rebex.FileServer, and for some reason that name rings a bell Ah, right, it's from the first time AMP's SFTP was completely broken https://discord.com/channels/555424930502541343/555782140533407764/1231985554523160677 AMP is paying for the Rebex SFTP server library
Be_Mann
Be_Mann5w ago
But the question is also whether they addressed them correctly or whether Rebex messed it up But it is always professional when function names such as “Delete”, ‘Remove’ and “Trash” appear within a DLL file. Just out of curiosity, can you estimate when a hotfix or alternative build would be available?
Mircea
Mircea5w ago
I can make a build now, got sidetracked trying to find how rebex returns that Path not found. message
Be_Mann
Be_Mann5w ago
Yes, that would be great, but I haven't found the “Path not found” in the libraries yet either. I have also already looked in the FileManagerPlugin.dll
Mircea
Mircea5w ago
It's in Rebex.Common in the function pjcti.rilnk.vriuy which converts some error code to the message But dotpeek doesn't find usages of that error code enum, so it's harder to track down the call chain
Be_Mann
Be_Mann5w ago
sad rebex is 26 in business and still doesn't master standards 😉 Not all heroes wear capes – some write bug fixes for problems they didn’t even cause! And if we’re impatiently waiting, it’s only because what you’ve created is just that awesome! 😃🔥
Mircea
Mircea5w ago
Heh, no worries 😄
Be_Mann
Be_Mann5w ago
Danke, vielen Dank

Did you find this page helpful?