Snap Obsidian doesn't open

Steps to reproduce

Try to run Snap Obsidian (I’m using revision 33) on Ubuntu 24.04 LTS with the command snap run obsidian.

Did you follow the troubleshooting guide? [Y/N] Y

I tried, but again, the application doesn’t open.

Expected result

Obsidian opening.

Actual result

Obsidian doesn’t open and just return exit code 1.

Environment

Not possible because the application doesn’t open.


Additional information

I added to the first two init scripts, desktop-init.sh and desktop-common.sh, the option -x to the shebang and got the log attached. The script is crashing in the desktop-common.sh file, I think it’s trying to remove ~/Documents but the directory contains files and rmdir doesn’t remove recursively.

The logs:

It works for me.

I don’t see any logs attached. That’s a script.

That’s a console log from terminal. The first line is the command I executed.

I found this useful discussion: File picker with classic Snap · Issue #19818 · electron/electron · GitHub it’s shows a classic snap should have the launcher scripts a little different from a restrict snap.

The problem with the scripts Obsidian uses today is that they are designed to run on a confined snap, like for instance we have HOME and REALHOME variables, but with a classic snap that are the same directory.
I confess I lost some empty folders that were part of xdg-user-dirs, like ~/Templates and ~/Music. Since they were empty, there was no problem. Thankfully, the script stopped when it was trying to delete the ~/Documents folder.

This explains how to provide the debug information:

Please consider that all these steps require the Obsidian to open, and mine doesn’t open at all, so no access to command palette.

1 Like

@WhiteNoise Another evidence. I tried to execute Obsidian in a VM I built using Ubuntu 24.04 LTS. It shows in the first execution that messages. You need to understand the code for start the application is in the snap today was made for confined snaps, where the home of the user is really under ~/snap. In the case of a snap with classic confinement, the real home directory is used ( /home/ubuntu in my case), and it’s trying to remove the directories (they were empty in my case).

I tested again today. Snap Obsidian runs fine on Ubuntu 24.04 and does not delete the home folder.

There’s something specific about what you do or your setup, otherwise this forum would be exploding with complains.