Opening a file during indexing will replace and remove the file

Steps to reproduce
You need to put the Obsidian folder in iCloud and use it as a sync. An attempt is made to open an existing link on the main page while the file is being synced and indexed. Then the opened link is overwritten with the contents of the main page.

Expected result
The link’s page should be fully open.

Actual result
The page of the link is overwritten and opened corrupted. The original file disappears forever and is not even in the .trash folder.

Environment
Operating system: Windows 10
Obsidian version: 0.12.16

Additional information
No plugins or CSS snippets active.
This bug was first discovered yesterday around 20:30 PM EST time, and this bug was discovered again around today 07:30 AM EST.
I’m not an English speaker, so I’m sorry that the sentences aren’t smooth as it was written with a translator.

I am not sure if indexing has anything to do with this.

If this happens again, see if there are any errors in console (cmd-opt-i).
Maybe make a screen recording too.

Thank you for the reply.
I’ll try it and let you know the results.

I tried to reproduce the same phenomenon over the past week, but it only happened once, and even that failed to be recorded and could not be captured.
I still don’t know what the cause is. I’ll reply right away if I have the same problem later.

Came here to report a similiar issue that might be the same as OPs. I started using iCloud for the mobile sync as well, three times now I’ve noticed a file missing a few days after opening Obsidian. I’ll describe the last one in detail below. For context, after the first two I installed a git backup plugin to recover the files.

  1. Created a dozen files, pure text, longest 1,000 or so words.
  2. Two days later, one of the dozen files is missing
  3. File is not in local trash
    3a. File is not recoverable via iCloud’s recovery function
    3b. File is not recoverable via iCloud drive’s deleted files
  4. Check git commits
    4a. last commit on day of file creation includes file
    4b. next commit, made on vaulting opening two days later, shows file removed.

I don’t know if these helps but I have been VERY lucky to not lose anything irreplaceable thus far and it’s a pretty severe bug. If I should submit this account of it separately, just let me know.

I don’t think you have the same problem. Even assuming Obsidian deleted the file, it should be recoverable by Icloud recovery function. I believe this is an Icloud problem. I suggest you do more into this and open a new bug report if you find this is Obsidian’s problem.

You can also check Settings>File Recovery and see if/when the file was deleted according to Obsidian’s record.

It’s a little out of the way, but the problem has reoccurred before, and I found a condition that occurs in a few patterns.(my obsidian version now is v0.12.17)
However, it cannot be said to be a perfect reproduction because a third-party plug-in is being used during subsequent use. No custom css is specified, only themes are specified and used.

  1. Put the obsidian folder in icloud and use it
  2. Run obsidian and all loading bars will pass
  3. After the workspace is loaded, the indexing box at the top right should disappear.
  4. Next, a window appears stating that it is syncing with icloud in the windows environment. At this time, if you try to open another link, the link on that page disappears.

I’m not sure, but i also think icloud is the cause. iCloud’s slow sync speed seems to provide an opportunity for bugs.

The picture is after the result occurred. (The daily page is modified after the bug occurs, so there is a slight difference.) The daily page is set as the main and there is a link for testing there. When a bug occurs, the outgoing page is overwritten by the arriving page.

There are several issues with what you are describing.

  1. Indexing should only happen once. The fact that it pops up every time you open obsidian is strange. Do you let it finish indexing?
    Again indexing is a read-only process and should not be related to this issue.
  2. Do you see errors in console (ctrl-shift-i) when this happens?
  3. Do you have iclould configure to download all you files locally?
  4. Does this problem happen if you keep you vault out of icloud?
  5. Does this problem happen without third-party plugins?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.