My .canvas file got corrupted. Is it recoverable?

What I’m trying to do

I am trying to recover a .canvas file that got corrupted. When I try to open it, it shows the following error:

‘Failed to load “Nature.canvas”. Unexpected token in JSON at position 0’

The issue happened after my PC shut down abruptly while I was working on the file.

Things I have tried

I googled and found only one similar case to this issue. The solution that was proposed was to delete the .obsidian/workspace file and reload Obsidian. But that did not work.

I am unable to attach the file to this post since the .canvas extension is not supported.

I am a rookie at using Obsidian and I had done a lot of work on the file. So any help would be appreciated!

You could try to compress the canvas so it becomes a zip file, which are allowed as an attachment.

Have a look in Settings > File Recovery > Snapshots > View and enter the canvas name. Hopefully there’s a good version.

Normally you’d just copy and paste the contents into a new note within Obsidian, but you’ll need to use a text editor here (notepad++, VSCode, Sublime Text, etc.) as it’s a .canvas file. Paste the contents into the editor and save the file in your vault as something.canvas. I’d make multiple .canvas files from the different snapshots if the first one doesn’t work. :crossed_fingers:t3:

I didn’t think of that. Thank you!

Thank you so much! I found a good file version and it worked.

Very happy you were able to recover the file! Now is a great time to review or put in place your backup plan.

1 Like

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