Obsidian does not save and get stuck in a limbo state

I just experienced this and lost several hours worth of writing. Here’s what happened:

  • I committed my changes to a file called set-for-life-2 to Github via Github Desktop.
  • I continued writing for about 2 hours in that file.
  • With set-for-life-2 still open in Obsidian, I tried to open a different file (set-for-life) in Obsidian from the file tree. I clicked set-for-life and nothing happened. I CMD-clicked it and it opened in a new pane with “No File” or something like that in the title bar. I closed it and tried again. Same problem.
  • I went to Mac Finder and opened the set-for-life file from there. It was fine.
  • I returned to Obsidian and did a Force Reload from the View menu. Obsidian reloaded, with vault loading bars, and opened with set-for-life-2 still open. At that point, I hadn’t noticed any data loss, but I’m pretty sure it had already happened. (It was at the top of the file, and the loss was at the bottom.)
  • I clicked set-for-life from the Obsidian file tree and it opened normally this time.
  • I hit the Back button in Obsidian to return to set-for-life-2. I scrolled down to the end of the document and discovered that my last 2 hours worth of work was gone.
  • I checked Github Desktop. No changes had been detected since my commit 2 hours ago.
  • My vault is in Dropbox, so I checked there. The file hadn’t been updated in 2 hours. I was in a zone and probably never hit CTRL-S during that whole time.

What appears to have happened is that everything I wrote was basically in Obsidian’s memory, but hadn’t actually been written to the file system during that two hours.

Because I did Force Reload instead of closing the file or Obsidian normally, whatever was in memory was dumped instead of being saved to the file.

Obviously, this is completely heartbreaking, because I can’t ever recover that lost work. I was completely in a state of flow.

It seems like the solution is to update Obsidian to autosave before reloading, but I don’t know if that is possible.

1 Like

Hi @wmbenedetto, I am sorry to hear about your data loss.
There are several point in your description that are at odds on how obsidian works.
Obsidian autosaves your file every two seconds. There’s not need to Ctrl-S. So I am surprised that Dropbox did not pickup anything. Was it active in the background?
Manually Reloading (formerly Ctrl-R), does lose data but it should be at most data since the last save (2 seconds at max).

You can try using settings>file recovery>view and see if our internal recovery system picked something.

Which plugins do you have active? did some of them cause obsidian to malfunction?

Are you on a Mac? Do you have icloud active on this vault?

It just happened again, and CTRL-R was not involved. First, let me answer your questions.

  • My experience is that Obsidian autosaves, which is part of what I love about it and why I was so surprised to see the data was lost. :stuck_out_tongue:
  • Dropbox was active and definitely did not pick up any of the changes between 4:01 PM and 5:21 PM. My Github commit was at 4:33 PM. The contents of the commit are identical to the 4:01 PM Dropbox version, so no changes were picked up by git after 4:01 PM either.

  • Your File Recovery suggestion gave me a brief ray of hope, but alas, it’s almost exactly the same problem. There’s a version at 4:01 PM and at 5:13 PM, nothing in between. 5:13 PM is when I did the reload.

  • Plugins: Admonition, Better Word Count, Collapse All, Command palette, File recovery, Find unlinked files and unresolved links, Kanban, Note Refactor, Page Preview, Sliding Panes (Andy’s Mode), Templates, Text Snippets, Zettelkasten Prefixer.

I also had Obsidian Dictionary installed, but uninstalled it before I started writing. I don’t think I restarted Obsidian after I uninstalled it. I installed that and Collapse All yesterday. All the others I have had installed for months with no problems.

  • I am on a Mac. No icloud though. The vault is in Dropbox, and I use Github Desktop to commit my md files.

Okay, now onto what just happened.

I was rewriting the lost content, being sure to hit CTRL-S every few minutes just in case. I was also periodically checking Dropbox to see that the saves were being uploaded. Everything seemed to be working fine. I finished rewriting the lost content and went to commit the changes. That’s when I realized that git hadn’t picked up about the last 20 minutes of changes. They were still live in Obsidian though, so I hadn’t lost anything yet. I went back to Obsidian and hit CTRL-S … and nothing happened. Still no changes picked up in git or Dropbox.

I went into the Mac finder and opened the file in a different markdown editor. The changes weren’t in the file. I went back to Obsidian, copied the changes to the clipboard, pasted them into the file in the other editor, and hit CTRL-S from there. Then the file saved, the changes showed up in git, and Dropbox synced.

Referring to File Recovery, you can see that it was saving every 5 minutes until 7:41 PM, and then there were no saves until 8:05 PM. I was writing that whole time.

So, there’s definitely something weird happening with Obsidian where the changes aren’t being written.

One other thing of note: After this latest issue, I went to the Community Plugins with the intention of uninstalling anything new I had installed. I hit Check For Updates. There were four updates pending. I hit Update All. It updated Admonition, but then it stalled. It didn’t update any more plugins – the progress bar kept cycling – and I had to restart Obsidian before it would let me uninstall Collapse All (which was the only new one still installed).

I’m going to try and repro this issue on a clean file with fewer variables to see if I can isolate the issue. I’ll let you know if I figure anything else out.

If it happens again, can you check the console for errors cmd-opt-i and take a screenshot?

After this, can you try to run obsidian in safe mode?

Where are your files stored exactly? Is it an SSD?

I moved your report to separate thread.

I’m using a late 2017 Macbook Pro with Touchbar on Catalina 10.15.7. Storing to the internal SSD. I just spent 15 mins trying to repro the error with a clean md file. No luck so far. If the issues happen again, I’ll gather as much info as I can from the console. I’m a JS developer by the way, so if there’s anything specific I can do to help debug, let me know.

Oh, I just realized that I only listed the plugins that have an entry in the sidebar. Here’s a full list:

  • Admonition 4.4.0
  • Advanced Tables 0.12.4 (inactive)
  • Auto Link Title 1.2.3
  • Better Word Count 0.6.1
  • Collapse All 1.0.0
  • Excalidraw 1.1.7 (inactive)
  • Find unlinked files and unresolved links 1.2.1
  • Footnote Shortcut 0.0.7
  • Fountain 0.2.1 (inactive)
  • Fullscreen mode plugin 0.1.0
  • Kanban 0.3.12
  • Kindle Highlights 0.2.11 (inactive)
  • Note Refactor 1.6.1
  • Obsidian TODO 0.1.0
  • Sliding Panes (Andy’s Mode) 3.2.3
  • Tag Wrangler 0.4.4
  • Text Snippets 0.0.3
  • Tidy Footnotes 0.1.0

Quick update. I continued writing for several more hours last night, and again all day today. So far, I haven’t experienced this problem again. Updates are consistently being detected by Dropbox and git, autosave seems to be working as expected, and the Obsidian snapshots are happening reliably every five minutes.

My best guess is that Obsidian got in to a bad state, possibly by my uninstallation of Obsidian Dictionary. That’s the only variable I can think of that might have caused the issues. I’ll update this thread again if the problem reoccurs, but it seems to be resolved for now.

Thanks for your quick responses!

Hi, the same thing happened to me this evening ad some days ago.

Today I’ve jotted down some thoughts in today’s daily note in Obsidian on my iPhone.

This evening I opened Obsidian on the Mac and I wrote some more in the daily note to expand those thoughts (it was correctly synchronized).

I wrote for about an hour, then I opened the daily note for the previous day. When I’ve reopened today’s note, all my writing was gone! It just showed what I wrote on the iPhone, just like when I started writing on the Mac.

The last version saved was the one before I started writing.

The vault is on my home directory, I’ve time machine and BackBalze running in background, but non of them has a version of the file with more data.

What do you use for syncing? Obsidian Sync or Icloud?

Do you have anything saved by Settings>File Recovery>View?

I use Obsidian Sync. The last version in File Recovery was created before I started writing.

What plugins are you using, if any?

It happens again, can you enter console cmd-opt-i and see if there are error?

Have you ever experienced a kernel panic while using obsidian?

Occasionally, when I quit Obsidian this will result in data loss in the note to seemingly a previous (recent) save point. Command + S will not work to save the note, and I can tell when the note is in this state when I try to open another note through the quick switcher and it won’t let me.

Steps to reproduce

None that I am aware of. This seems to happen every once in a while, seemingly when I have had Obsidian open and am returning to using it.

Expected result

I expect it to save when I type Command + S or quit the app.

Actual result

Data loss to seemingly a recent save in the note.

Environment

  • Operating system: macOS Big Sur 11.3.1 Intel Iris Pro 1536 MB / NVIDIA GeForce GT 750M 2 GB

  • Obsidian version: v0.12.3


Additional information

PLUGINS

CORE

  • File explorer
  • Search
  • Quick switcher
  • Graph view
  • Backlinks
  • Outgoing links
  • Tag pane
  • Page preview
  • Command palette
  • Templates
  • Word count
  • Audio recorder
  • Open in default app
  • File recovery
  • Sync

COMMUNITY

  • Advanced Obsidian URI
  • Advanced Tables
  • Automatically reveal active file
  • Calendar
  • Contextual Typography
  • Dataview
  • DEVONlink
  • Find unlinked files and unresolved links
  • Hider
  • Hotkeys++
  • Kindle Highlights
  • macOS Keyboard Navigation
  • Markdown Prettifier
  • Mind Map
  • Note Refactor
  • Outliner
  • Paste URL into selection
  • Periodic Notes
  • Sliding Panes (Andy’s Mode)
  • Sort & Permute lines
  • Style Settings
  • System Dark Mode
  • Tag Wrangler
  • Tracker

THEME

California Coast
(Translucent window active)

I had a kernel panic just before I started working on that note (never had one of those before). Obsidian was open in that moment.

It happened again, this is what I found in the console:

app.js:1 Obsidian Developer Console
main.ts:27 loading markdown-table-editor plugin
main.ts:35 Dataview: Version 0.3.x Loaded
main.ts:15 loading Sort & Permute lines
main.ts:39 loading obsidian-tracker plugin
main.ts:17 Light mode active
main.ts:30 Loading Note Refactor plugin
VM297:3828 [Calendar] Trying to switch Moment.js global locale to it, got it
index.ts:338 Dataview: Parsed all file prefixes (0.002s)
index.ts:200 Dataview: Task & metadata parsing queued in 0.001s.
DevTools failed to load SourceMap: Could not parse content for app://obsidian.md/pickr.min.js.map: Unexpected end of JSON input

Then I tried to open another file:

app.js:1 Obsidian Developer Console
main.ts:27 loading markdown-table-editor plugin
main.ts:35 Dataview: Version 0.3.x Loaded
main.ts:15 loading Sort & Permute lines
main.ts:39 loading obsidian-tracker plugin
main.ts:17 Light mode active
main.ts:30 Loading Note Refactor plugin
VM297:3828 [Calendar] Trying to switch Moment.js global locale to it, got it
index.ts:338 Dataview: Parsed all file prefixes (0.002s)
index.ts:200 Dataview: Task & metadata parsing queued in 0.001s.
DevTools failed to load SourceMap: Could not parse content for app://obsidian.md/pickr.min.js.map: Unexpected end of JSON input
codemirror.js:536 [Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952
on @ codemirror.js:536
registerEventHandlers @ codemirror.js:7970
CodeMirror @ codemirror.js:7895
CodeMirror @ codemirror.js:7854
e @ app.js:1
t @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
o @ app.js:1
t.setViewState @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
o @ app.js:1
t.openFile @ app.js:1
t.onFileClick @ app.js:1
s @ app.js:1
codemirror.js:536 [Violation] Added non-passive event listener to a scroll-blocking 'touchmove' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952
on @ codemirror.js:536
registerEventHandlers @ codemirror.js:7983
CodeMirror @ codemirror.js:7895
CodeMirror @ codemirror.js:7854
e @ app.js:1
t @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
o @ app.js:1
t.setViewState @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
o @ app.js:1
t.openFile @ app.js:1
t.onFileClick @ app.js:1
s @ app.js:1
codemirror.js:536 [Violation] Added non-passive event listener to a scroll-blocking 'mousewheel' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952
on @ codemirror.js:536
registerEventHandlers @ codemirror.js:8016
CodeMirror @ codemirror.js:7895
CodeMirror @ codemirror.js:7854
e @ app.js:1
t @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
o @ app.js:1
t.setViewState @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
o @ app.js:1
t.openFile @ app.js:1
t.onFileClick @ app.js:1
s @ app.js:1

I had just switched from English to Italian

Do you remember if the kernel panic mentioned Obsidian Helper?

Can you not use plugins for a while and see if this happens?

The Mac rebooted before I could read the kernel panic error.

No problem for the plugins, I have to disable all
of them or just the community ones?

The community ones