Nextcloud sync app sometimes ignores whole folders after compilation of tex files

I work a lot with LaTeX and also automatically sync my files. This typically means that often files change while being uploaded. Most of the time this works without any problems. Sometimes though this leads to an odd behavior of the sync client with risk of losing files: The sync client reports file version conflicts and stops syncronizing the whole folder. So also a random file copied to that folder will not be syncronized. If this happens unnoticed, I have acutually different file versions on different systems. When I resolve all error notifications and (seeming) version conflicts this problem remains (!): The sync app does not show an any errors but simply does not syncronize the folder anymore. Shutting down the nextcloud client, rebooting and so on does not change it.

I did not find a way yet to easily reproduce it but it is obviously connected to the work with LaTeX and happens regularly. Stopping syncronization while working with it might solve the problem but means that users might forget to turn synrconization back on.

What’s the problem here?

I don’t know if you can set things up that you have in one folder the source files (text, image, …) and a dedicated folder where you put the compiled results. This compiled result folder, you could put in the ignore list of the client.

For the conflicts, that is usually when you write a file, and the version on the server has changed as well. If you just do modification on one client, and then sync everything to the server, this should in theory not happen. Not sure if there might be a problem that when it syncs the file, and during this sync process you start to save the file as well. It can also depend on clients, if they update a file, or if they delete/move the old one and then create a new one with the same name.

To provoke more conflict to get logs etc, larger files might make it more likely, or if you limit the upload speed of the desktop client.

Not syncronising the compilation results is not a good idea (and also not feasible, I think).

What should not happen in theory seems to be haapening unfortunately. This is a problem that can happen with only one sync client.

How is it possible that the client starts to ignore the whole folder as a results of some conflict?

You could create a bug report, because the conflict is created by the Nextcloud client itself (and not because users edited a file at the same time, or their editing overlapped).

I have not inner knowledge about the sync logic of the client and what exactly is going wrong. The bug tracker might give you some ideas, especially if these are things why something was decided like this in the past (if you have specific massages, you can search for them in the code, check when they were changed and find the corresponding pull requests with discussions).