Deletes files that should remain on the client.
rheimus opened this issue ยท 14 comments
Serversync Version:
3.2.0
Minecraft Version:
any
Issue:
Files are being deleted that should not be as they exist on the server.
I am seeing this too it downloads the things I didn't have then deletes the things I did have, I can repeat the process and swap back and forth between which half I have..
As a workaround I have everyone deleting the tracked folders before running serversync.. but like this its now only marginally better than our previous manual process.
That actually gives me something to go on, there is probably a logic error in the list of files that is gathered by the client durin sync.
Which versions are you running on the server & client?
I don't seem to be able to make a simple reproduction of this issue locally.
Could you provide the server logs, client logs & configuration file please.
logs can be found in logs/
I can't easily reproduce this on 3.1.1 either.
There it is :)
serversync-client.log
I have noticed this only on windows. I have not yet thoroughly tested on mac but the linux version seems to be fine
@fatlard1993 It's unlikley to be OS based, my testing has all been windows and I have not seen the issue. It's most likely to be an unhappy path problem, some sort of network issue that is not being handled well by ServerSync.
I really tried to get it to happen on my daily driver which is linux and nothing I did seemed to make it happen. Conversely on my windows machine (which I use just for games) I couldn't seem to get to get it to stop happening. You mention a path problem though and that sticks out a bit to me, on my linux machine I couldn't get it to load the config without running it from a terminal within the containing folder.
@fatlard1993 ServerSync is expecting the CWD to be where the jar file is, running from outside the containing folder will probably have the CWD set to wherever you started the command from.
I would be keen to have a way of knowing where the jar file actually is, but every method of doing so I have found ends up being an awful hack that will probably break at the slightest breeze. ๐ข
Apologies, by unhappy path I was referring to the testing/software idiom https://en.wikipedia.org/wiki/Happy_path
Though from the logs it looks like the process is just failing to remove entries from the map of client files, could potentially be something to do with java versions handling maps differently, or the paths coming from the server & client are in different formats.
Tried a different method of collecting which files have been processed and which files need to be deleted.
Built files can be found here: https://github.com/rheimus/ServerSync/actions/runs/67195459
These are all client-side changes, so you shouldn't need to update the server.
@fatlard1993 Looking closer at your logs it would seem that the server is sending unix style paths & the client is using windows style paths.
This might be as simple as sanitizing path strings to unix style.
Yep thats it, I can reproduce the issue by running my server in WSL and client in native windows.