NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.58k stars 13.74k forks source link

Obsidian fails to start on first open, second open cannot load previously made vaults #321468

Open robcohen opened 3 months ago

robcohen commented 3 months ago

Describe the bug

On first open, Obsidian fails to open window, but is running as process. On second open, Obsidian Vault Selector window opens, but when Vault is selected, nothing happens. Only way to actually see the vault is to create a new vault from sync. I can open the newly made vault as usual, but once I reboot

Steps To Reproduce

Steps to reproduce the behavior:

  1. Run obsidian from commandline
  2. Run Obsidian from commandline again

Expected behavior

I should be able to click a saved vault and have it open

Screenshots

None

Additional context

> obsidian
2024-06-21 08:53:38 Loading main app package /nix/store/n98vg1m284gqx924r5jwx1vys9w3fxf1-obsidian-1.6.3/share/obsidian/obsidian.asar
[84767:0621/105338.238057:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/portal/desktop: org.freedesktop.DBus.Error.InvalidArgs: No such interface “org.freedesktop.portal.FileChooser”
[84767:0621/105338.238116:ERROR:select_file_dialog_linux_portal.cc(290)] Failed to read portal version property
MESA: error: ZINK: failed to choose pdev
libEGL warning: egl: failed to create dri2 screen
2024-06-21 08:53:38 Checking for update using Github
[84995:0621/105338.334117:ERROR:viz_main_impl.cc(198)] Exiting GPU process due to errors during initialization
2024-06-21 08:53:38 Success.
2024-06-21 08:53:38 Latest version is 1.6.3
2024-06-21 08:53:38 App is up to date.
MESA: error: ZINK: failed to choose pdev
libEGL warning: egl: failed to create dri2 screen
[85063:0621/105338.449691:ERROR:viz_main_impl.cc(198)] Exiting GPU process due to errors during initialization
[85008:0621/105338.512636:ERROR:command_buffer_proxy_impl.cc(131)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.
[85055:0621/105338.513048:ERROR:command_buffer_proxy_impl.cc(131)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.
[85009:0621/105338.513085:ERROR:command_buffer_proxy_impl.cc(131)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.

Notice it does not exit, but it also does not pop up the Select Vault window.

second run in another terminal:

$ obsidian
2024-06-21 08:54:38 Loading main app package /nix/store/n98vg1m284gqx924r5jwx1vys9w3fxf1-obsidian-1.6.3/share/obsidian/obsidian.asar
[85343:0621/105438.775050:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/portal/desktop: org.freedesktop.DBus.Error.InvalidArgs: No such interface “org.freedesktop.portal.FileChooser”
[85343:0621/105438.775099:ERROR:select_file_dialog_linux_portal.cc(290)] Failed to read portal version property
2024-06-21 08:54:38 Checking for update using Github

With the second run it shows the Vault Selector window.

If I select the previously opened vault, the window simply closes.

It appears the vault is opening in the background, but I cannot get the actual Obsidian window to show me the contents of the vault.

Notify maintainers

@CrackTC

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.33, NixOS, 24.05 (Uakari), 24.05.20240619.dd457de`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.2`
 - channels(root): `"home-manager-23.11.tar.gz, nixos-24.05"`
 - channels(user): `""`
 - nixpkgs: `/nix/store/2lvj8bm21ymxra61dqrc4xpzr8njgywj-source`

robcohen commented 3 months ago

I forgot to mention, I am installing Obsidian from Unstable.

TomSeestern commented 2 months ago

Faced the same issue today, turns out it was the "tray" plugin hiding the vault after startup. It can be disabled by removing the respective entry in "\<pathToYourVault>/.obsidian/community-plugins.json"

Also worth trying deleting the GPU cache: https://github.com/NixOS/nixpkgs/issues/270699#issuecomment-1838088569

robcohen commented 2 months ago

Great ill give this a try