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
Automated responses for Dor (112043686556155904)
Key Details for SMMDebug-2024-12-14-11-23-07.zip
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.
(the server is always stopped when this happens)
When you say the next time in SMM, you mean you restart SMM, or leave it open and come back later?
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.
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
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.
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
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
sftp_servermustbestopped
You should shut down the dedicated server executable before trying to install mods on it.
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.
Are you using AMP to manage the server?
Yes, that is correct
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 onSo 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.
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
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
Hmm, so "file does not exist" should actually be "directory not empty"?
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
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
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.
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 thatI 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:
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)
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:
Mh I checked now and sftp should be skipping those already https://github.com/pkg/sftp/blob/fb0652cf58a5dec0a399756c4c5e0753fc028985/client.go#L370
This is the path it's saying doesn't exist

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
Well, this patch to go sftp does fix it

So via SSH when I execute rm the following appears:
But well then it mainly uses shell commands
I assumed SFTP also uses the shell commands internally, but apparently not

I must confess, I have never used rmdir, I always work with “rm -r” 😉
This is in a sftp shell, not ssh
And a sane ssh/sftp server, not claiming the folder doesn't exist if you try the wrong command on it

Yes, that's both true 😉
And I thought only FTP was the Fucking Trash Protocol because noone actually follows the specs

0/2 on following the specs so far
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
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...
I can well imagine that they use a library so that they don't have to do it themselves.
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
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?
I can make a build now, got sidetracked trying to find how rebex returns that
Path not found.
messageYes, 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
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 chainsad 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! 😃🔥
Heh, no worries 😄
Danke, vielen Dank