Skip to content

Vague error message "folder marker missing" #5207

Description

@nikoss

The error "folder marker missing" is kind of vague.
Looking around, it means that the " .stfolder " file is missing.

So, why doesn't the error message say so?

the file ".stfolder" is missing from the folder

Activity

  1. AudriusButkevicius commented on Sep 17, 2018

    @AudriusButkevicius
    Member

    Sure, open a pull request, yet the market can be called whatever these days, and it still doesn't explain what the user needs to do about it, what it means or why it's there to start with.

  2. imsodin commented on Sep 17, 2018

    @imsodin
    Member

    Because it is not just a file (it's a directory anyway, but that's not what I am getting at): This means something is potentially very wrong with your shared folder (it's gone missing) and thus further syncing would lead to data loss. I.e. if the data is actually missing, we don't want the user to blindly recreate that file without thinking, we want them to know what's its purpose and if the data is fine (e.g. .stfolder was accidentally removed), then recreate it. I agree though it's vague and it would benefit from a link to documentation explaining about .stfolder.

  3. calmh commented on Sep 18, 2018

    @calmh
    Member

    Yeah what imsodin says. "folder marker missing" might not say exactly what the marker is, etc, but it indicates there's something wrong with the folder and is googleable. ".stfolder is missing" on the other hand leads to the obvious though "well, duh, create it then" which is the wrong response...

  4. nikoss commented on Sep 19, 2018

    @nikoss
    Author

    Well, then, maybe a link to a specific part of the documentation would be a better option.

    Because I had this problem a couple of times in the past... I did googled it... and, always, my (wrong?) response was to recreate the missing file...

    Maybe the links provided by Google said something about not, just, creating the missing file, and I missed it. Or, maybe, it was mentioned in the 50th comment, and I didn't even read it.

  5. Zcehtro commented on Sep 26, 2018

    @Zcehtro

    I've had this problem as well.
    Some users have access to hidden files and folders, see the .stfolder marker on the network drive and remove it because they don't know what it is.

    Instead of simply getting the error message when this is the case, it would be useful to be pointed to the proper documentation in order to correctly address the issue and resolve it.

    Also, usually the user can solve this, but maybe there could be a feature where the WEBUI or GUI offers a dialog box to let the user decide how to fix it but the application handles the fixing procedure? ie. .stfolder marker is missing, so the UI says "If you have removed it, would you like to recreate it? Doing so will ignore all changes and perform an initial folder merge once again." or something similar according to the situation; basically user is always accountable. Maybe other options would be to start off with a mirror copy of the global state, or set the global state according to the local state.

    This would speed up many accidental messups solve it with a few clicks.

  6. calmh commented on Sep 27, 2018

    @calmh
    Member

    basically user is always accountable

    Nonetheless, suggesting a one click option that will delete everything everywhere in a common case (folder not mounted) is unfriendly.

    I’m all for somehow linking to relevant documentation however. Someone just needs to write it.

  7. deleted a comment from on Oct 7, 2018
  8. added
    enhancement
    on Oct 18, 2018
  9. RichardMyersGV commented on Feb 14, 2019

    @RichardMyersGV

    I feel that Zechtro's suggestion is not unfriendly at all, but very useful and very friendly. The "one button" fix clearly explains the implications and allows choices. Perhaps the "common case (folder not mounted)" can be suggested as a possible problem as well, along with the implications ("delete everything everywhere") of clicking the fix.

  10. Ferroin commented on Feb 15, 2019

    @Ferroin

    @calmh @RichardMyersGV Might I suggest an alternative approach?

    If we have Syncthing actually look at the folder, we can have it behave a bit more sensibly here. I can think of four cases that are pretty easy to differentiate that matter here:

    • Permissions are screwed up at the top level: Easily checked, and should just be reported to the user as such, and tell the user they need to fix it.
    • Folder is unmounted: Nothing will be visible in the folder, and permissions should still look like the user has proper access to list the folder. In this case, we should just report things as such, and tell the user they need to fix it themselves just like for permissions issues
    • User removed the marker, but made no other changes: The folder should still match the index, and in this case it makes sense to just offer the proposed one-button solution.
    • Marker is missing, and the folder differs from the index: Essentially, none of the above. Offer the one-button fix, but prompt for confirmation when doing so, and put some big warnings in to make sure that the user knows it may be dangerous.
  11. DictumMortuum commented on Oct 9, 2019

    @DictumMortuum

    Hello,

    I've set up a shared folder that I share on my phone, on my girlfriend's phone and our PCs to distribute photos easily.

    Syncthing works great for this and it's easy to use for a non-technical person once set up. However, I think that on her mobile she's using some kind of cleanup program that deletes the .stfolder, because they are empty and they are marked as trash files.

    I don't want her to tell her how to use her phone, so is there any way to make this work? Currently she's having exactly the same issue when opening syncthing on her phone, "folder marker missing", which is alarming for a non-technical person.

    Can I create, for instance, a couple of dummy files in the .stfolder to prevent it from being deleted, or it's going to mess up with syncthing? Or maybe alter the permissions on the folder?

    Regards,
    Dimitris

  12. calmh commented on Oct 9, 2019

    @calmh
    Member

    You can do either of those. And please use the forum for support.

  13. changed the title [-]vague arror message: "folder marker missing"[/-] [+]Vague error message "folder marker missing"[/+] on Oct 9, 2019
  14. DavidGP commented on Jan 16, 2020

    @DavidGP

    Since the "folder marker missing" issue easily can have catastrophic consequences, there really is a need for clarification (at least something like a highly visible link to a list of possible causes, and possible remedies/consequences).

    Thanks!

  15. 1 remaining item

  16. AndrewSav commented on Apr 7, 2021

    @AndrewSav

    "search docs/forum to get information about how to proceed" is not good either. It should contain a link to the documentation page which explains the situation in details. Even if the information was easy to find, there is no possible benefit in making the user search (and finding something wrong on occasions).

    I just typed in "folder marker missing" in google, the first link was this: https://forum.syncthing.net/t/stopping-folder-path-exists-but-folder-marker-missing/1749 It says:

    The file is literally supposed to be named .stfolder. I am not sure you can create this from Explorer on Windows.
    

    And then people who followed that advice face unexpected mass file deletion as can be seen here: https://forum.syncthing.net/t/folder-marker-missing-re-created-it-file-mass-deletion/14346

    Even after reading those two threads it is not clear, how to recover. For example, I lost a disk to hard drive failure, I replaced it with a new one, and re-created the folder where syncthing is expecting me to have it. I get the error message in the title. What do I do? Search, find The file is literally supposed to be named .stfolder. I am not sure you can create this from Explorer on Windows. create the marker, which causes complete data wipe and then I'm told in so many words that this is my own damn fault:

    What happened here is you’ve overridden the safety measures built in to prevent exactly this kind of situation, and got shot in the foot as the result.

    ...

    Seeing no files in it, and no folder marker, Syncthing stopped its operation. Then you manually recreated the folder marker, so now Syncthing could see it, but still couldn’t see the files, so Syncthing interpreted the situation in the only possible logical way: there is the directory, it is accessible, but there are no files in it, which means the user (you) has deleted all the files while Syncthing was stopped. So, these files were reported as deleted by you to the other machine, and the other machine acted accordingly.

    In the scenario I described above, the steps that would work are:

    • Delete the folder from the syncthing
    • Wait a few minutes, until the folder comes back from the peer and you are prompted to add it
    • Add it with the old path and it will start syncing from the peer

    Another possible remedy in the same scenario is to set the folder to receive only, re-create the marker, then go to the peer which would display "Out of Sync" and press "Override".

  17. shulist commented on Nov 24, 2021

    @shulist

    To add some more context to this issue the documentation actually says:

    One possible message is “folder marker missing”. This means that the root directory of this folder does not contain a file or directory called .stfolder (marker). Syncthing stops when this marker goes missing to prevent data loss e.g. when the folder path was unmounted. If the marker was deleted accidentally, just recreate it and press the rescan button in the UI.

    @AndrewSav Where exactly is the override option? I have a folder that remains Out Of Sync but looks good to me. I cannot find an option to Overide the folder. Any help is appreciated.

  18. AndrewSav commented on Nov 25, 2021

    @AndrewSav

    @shulist I think that if the reason for "Out of Sync" is not that you have a send/only receive-only folder, the button will not be displayed because the sync will keep retrying automatically. This is just a guess though, I really don't know.
    2021-11-25_17-01-56

  19. lamont-granquist commented on Dec 29, 2021

    @lamont-granquist

    What do you do if you've locally deleted the folder for whatever reason (in my case I migrated a laptop which was not backing up the syncthing folders so none of them were recreated, so it needs to be resynchronized from the desktop (yes, which does have time machine backups)) and what you want to do is to re-add the folder like it was a newly introduced machine? Removing the folder in the UI and then trying to re-add it winds up with the same problem so there state buried somewhere else that needs to get nuked to forget about the folder entirely and resynchronize from the other machine. Google is not pulling up useful results for me, and most threads seem to assume that the problem is an unmounted drive, so just fix it by mounting it. I want the laptop to forget it ever knew about the folder and go sync all the content it needs.

    I guess I could tarball it across and then start synchronization with both sides having the content, but doing an out of band file transfer seems fussy.

  20. AndrewSav commented on Dec 30, 2021

    @AndrewSav

    @lamont-granquist I described above two ways that worked for me personally,

  21. cauerego commented on Jan 28, 2022

    @cauerego

    Another possible remedy in the same scenario is to set the folder to receive only, re-create the marker, then go to the peer which would display "Out of Sync" and press "Override".

    great advice, @AndrewSav

    in my case, i have had problems with this folder many times (i keep forgetting i shouldn't delete it) and i always just recreate the folder...

    but my remedy is: always have versioning on. trashcan is plenty enough for my case (and probably your case too, if you don't know what versioning is, dear reader).

    basically, before anything gets deleted, it goes to trash first, where you can readily recover them on your file system, with no need to go through syncthing recovery ui (which is terrible for large amount of files).

    you can even set it up as a default for all newly created folders.

    hope this helps.

    cheers!

  22. solarkraft commented on Jan 31, 2022

    @solarkraft

    IDK, man. I just stumbled upon this issue because it would throw this error on a newly created directory (and the UI wouldn't help at all). An option for "I don't care about my local state, just force re-sync" would be very welcome in my view, also to solve "out of sync"-issues, which I occasionally/frequently get).
    Do you really want to require your users to have a detailed understanding of Syncthing's inner workings to be able to use it?

  23. imsodin commented on Jan 31, 2022

    @imsodin
    Member

    I am locking this issue, there is a lot of good information early on and there's already a clear, actionable goal here: Have a more helpful error message that links to docs with more details about potential causes, remedies and associated danger. A lot of the later information is tangential at best - please use https://forum.syncthing.net to discuss any such issues.

  24. locked and limited conversation to collaborators on Jan 31, 2022
  25. added a commit that references this issue on Jun 18, 2022
    664e2c1
  26. added theissue type on May 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions