Graph view is broken for Flatpak version of Obsidian

Steps to reproduce

  1. Install Obsidian flatpak verison.
  2. Create some notes that has connections.
  3. Open global graph view (There is no filter applied). => Look the snapshot for bug.
  4. Open local graph for a note (There is no filter applied). => There is no dots or arrows in view. Look the snapshot for bug.

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

Y

I tried either Sandbox vault or with Annupuchin theme and Style Settings community plugin.

Expected result

I tried Obsidian (AppImage) and there is no problem, it is normal.

Actual result


Environment

SYSTEM INFO:
Obsidian version: v1.4.14
Installer version: v1.4.14
Operating system: #28 SMP PREEMPT_DYNAMIC Wed Aug 23 20:17:32 UTC 2023 6.2.0-10022-tuxedo
Login status: logged in
Catalyst license: none
Insider build toggle: off
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: AnuPpuccin v1.4.4
Snippets enabled: 3
Restricted mode: off
Plugins installed: 38
Plugins enabled: 30
1: Dataview v0.5.59
2: Natural Language Dates v0.6.1
3: Zotero Integration v3.0.10
4: QuickAdd v1.3.0
5: Excalidraw v1.9.19
6: Advanced Tables v0.19.1
7: Tag Wrangler v0.5.13
8: Text Format v2.2.8
9: Tasks v4.8.1
10: Plugin Update Tracker v1.5.2
11: Trash Explorer v1.2.2
12: Table Generator v1.4.1
13: Reference Map v1.2.3
14: Recent Files v1.3.8
15: Obsidian42 - Strange New Worlds (SNW) v1.2.2
16: Various Complements v9.0.0
17: Reading Time v1.1.1
18: Editor Syntax Highlight v0.1.3
19: Stille v1.3.3
20: Scroll Offset v1.0.4
21: Hover Editor v0.11.14
22: obsidian echarts v0.0.3
23: Obsidian Charts v3.7.2
24: Charts View v1.2.5
25: Plotly v0.0.6
26: Obsidian Git v2.22.0
27: Outliner v4.8.0
28: Completr v3.2.0
29: Metadata Menu v0.5.2
30: Style Settings v1.0.7

RECOMMENDATIONS:
Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets.
Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.


Additional information

Debug info says ā€œSnippets enabled: 3ā€ but I have 2 of them. Maybe theme has a snippet, I donā€™t know.
All snippets that I have:

/* remove title and the table from the "Metatable" plugin */
.qda-document .markdown-embed-title,
.qda-document .obsidian-metatable {
  display: none !important;
}

/* Link icon */
.qda-document .markdown-embed-link,
.qda-document .file-embed-link {
  top: 0 !important;
  right: 0 !important;
  left: unset !important;
  text-align: right !important;
  border: none !important;
  margin: 0 !important;
  width: 24px !important;
  height: 24px !important;
  color: var(--text-faint) !important;
  cursor: pointer !important;
}

/* for Ars Magna theme and others that change ::before */
.qda-document .markdown-embed-link::before,
.qda-document .file-embed-link::before {
  display: none !important;
}

/* Link icon size & hide */
.qda-document .file-embed-link svg,
.qda-document .markdown-embed-link svg {
  height: 24px !important;
  width: 24px !important;
  opacity: 0 !important;
  display: unset !important;
}

/* show on hover */
.qda-document .markdown-embed:hover .file-embed-link svg,
.qda-document .markdown-embed:hover .markdown-embed-link svg {
  opacity: 1 !important;
}

/* change background on hover, to exactly see whatā€™s embedded */
.qda-document .markdown-embed:hover,
.qda-document .file-embed:hover {
  background-color: var(--background-secondary) !important;
}

/* End link show/hide stuff */

/* remove border and scroll */
/* unfortunately needs !important for some themes */
.qda-document .markdown-embed,
.qda-document .file-embed {
  border-top: none !important;
  border-bottom: none !important;
  border-right: none !important;
  padding: 0 20px 0 5px !important;
  margin: 0 !important;
  width: fit-content !important;
  height: fit-content !important;
  display: inline-flex !important;
}

/*
.qda-document .markdown-embed .hided-field-on-embed {
  display: none !important;
}
*/

/* remove <br> between internal embeds */
.qda-document .markdown-embed .markdown-preview-section div > br {
  display: none !important;
}


/* remove vertical space added by markdown-preview-sizer */
.qda-document .markdown-preview-view.markdown-embed .markdown-preview-sizer, 
.qda-document .markdown-preview-view.is-readable-line-width .markdown-embed .markdown-preview-sizer {
  max-width: 100%;
  width: 100%;
  min-height: 0 !important;
  padding-bottom: 0 !important; 
}

.qda-document .markdown-embed .markdown-preview-section div:last-child p,
.qda-document .markdown-embed .markdown-preview-section div:last-child ul {
  margin-block-end: 2px; 
}
.reveal {
  font-size: 1em;
}

.reveal .slides {
  /* left-align all content in Slides */
  text-align: left;
  /* adds scrollbar */
  overflow-x: hidden !important;
  overflow-y: auto !important;
  pointer-events: auto !important;
}

.reveal img {
  height: auto;
  padding: 20px;
}

.reveal table, th, td {
  max-width: 100%;
  min-width: 20%;
}

/* hide scroll bar */
.slide ::-webkit-scrollbar {
  display: none !important;
}

.reveal h1 {
    text-align: left;
    text-transform: none;
}
.reveal h2 {
    text-align: left;
    text-transform: none;
}
.reveal h3 {
    text-align: left;
    text-transform: none;
}
.reveal h4 {
    text-align: left;
    text-transform: none;
}
.reveal h5 {
    text-align: left;
    text-transform: none;
}
.reveal h6 {
    text-align: left;
    text-transform: none;
}

.reveal p {
    text-align: justify;
    text-transform: none;
}

/* move left and right arrow button */
.reveal .navigate-right {
  bottom: 1.5em !important;
  right: 0.5em !important;
}
.reveal .navigate-left {
  bottom: 1.5em !important;
  right: 7.5em !important;
}

We donā€™t take bug reports involving the flatpak.
This may as well be a problem with X11, Xwayland, wayland, or hardware accelleration on/off.

I suggest you run the app in X11/Xwayland mode and try hardware accell on/off

Thank you, I think Obsidian give a flatpak version rather than .deb file. But I canā€™t decide that.
I look the config of Obsidian. And itā€™s not using Wayland now. So, itā€™s working on X11 or XWayland.


Iā€™am gonna try that unselect X11 in Socets and OBSIDIAN_USE_WAYLAND value to 1 in Environment. And viceversa.

Itā€™s works now, I think because of Iā€™am using wayland on my Desktop, but I didnā€™t do ā€œOBSIDIAN_USE_WAYLAND value to 1 in Environment.ā€ So itā€™s used the XWayland I guess. Now Iā€™am using with Wayland and problem solved. Thank you again.

What hardware and drivers are you using?

On another note, the build youā€™re using may have been using a buggy version of Electron:

EDIT: Re-built a couple of hours after the original release due to the original one using the wrong Electron version.

The builds had to be manually updated because of this:

Please update your Obsidian flatpak and see if the issue persists.

1 Like

image
All of them up to date.
Thanks.

I just notice something that cursor theme different from my system. Itā€™s not following my system cursor theme. Iā€™am using Breeze cursor theme and Obsidian uses windows-like cursor theme. I tried to set XCURSOR_PATH to /usr/share/icons but it didnā€™t work (I have also give the filesystem access).



Also cursorā€™s size bigger than normal.
Iā€™am using Obsidian with Wayland now.

But, later I notice that drag and drop tabs doesnā€™t work. Then I enabled X11 and Wayland option and then I do that ā€œOBSIDIAN_USE_WAYLAND value to 0 in Environment.ā€. Now Itā€™s working because I updated Obsidian this morning. And there is no cursor issue anymore.

Drag-and-drop in Obsidian has never worked when itā€™s using native Wayland instead of XWayland:

I donā€™t think this will change until upstream Obsidian makes Wayland support a blocking issue. Thatā€™s why I implemented OBSIDIAN_USE_WAYLAND as an opt-in feature and is unlikely to be used by default for a long time.

1 Like

Thank you for the explanation. Soon, Wayland will be first option for Linux DE. Then Obsidian team would be handle it properly, I suppose.

Considering that upstream Gnome uses Wayland by default, upstream KDE is planning to make it the default session, and various toolkits and distributions now support it, itā€™s safe to say that native Wayland support is definitely an important feature for an optimal experience on Linux these days.

1 Like

We do not have platform specific code. The problems you are experiencing is either due to electron/chrome or Wayland itself or both.

They can set Wayland as default but that does mean itā€™s ready. My advice is to use x11 or xwayland until the upstream issues are ironed out.

1 Like

Thank you.
May I ask that why the Obsidian team chose distribute .deb file rather than flatpak format.

We do appimage too. And the flatpak is semi officially maintained by jstone. The problem is not flatpak, appimage or Deb. Itā€™s electron-Wayland.

There might not necessarily be platform-specific code from the app developerā€™s side since Electron is a runtime for web technologies, but that may be something in the tab management code thatā€™s not being presented correctly as a drag-and-drop event when running within a Wayland compositor. Some applications like Firefox have had to do some refactoring in order to reliably communicate state between windows and tabs so tabs could be split/merged and rearranged as an example.

How much of this can be fixed within Obsidian itself or in Electron, I canā€™t say for sure since I donā€™t have access to the code. However I have found other Electron apps like Discord have a similar concept of tab drag-and-drop, and Iā€™ve found that this behavior still works as expected under Wayland.

Since our code is cross platform (win-linux-mac) and we rely on electron/chrome for mouse events, this problem is either in electron or wayland or both. Thereā€™s no if windows do this if linux do that (nor we want to add it).

We are essentially a website in an app. Itā€™s not the websiteā€™s fault if it works on X11 but not on wayland. Itā€™s the browser or the OS. We operate at a fairly high level of the tech stack and this is a lower level problem.

I understand that wayland users are frustrated about this and they just want somebody to do something about it.

I understand that this issue not related to the Obsidian. I asked ā€œMay I ask that why the Obsidian team chose distribute .deb file rather than flatpak format.ā€ because when you distribute the .deb file rather than flatpak, there is OpenSuse and Fedora like popular distros that uses the .rpm package format. This distros can use Appimage format but itā€™s not popular like flatpak and itā€™s hard to set execute permission and add to the apps menu on your desktop. So for some people it is hard I think. For this, users should use an Appimage store app.
But when you distribute the flatpak format rather than .deb effort, Obsidian more reachable because most popular distros have flatpak enabled default and when users search with their app store they gonna install it very easly. And itā€™s more internet friendly when you update the app. I think, the only think negatif and necessary in this case that Obsidian team must be disabled the auto-update feature in the settings.
Shortly, I think the effort for the distribute the .deb file could be used on flatpak format. I wonder that what Obsidian members and community think about that. And really thank you all for patience.

I donā€™t believe this issue is intrinsic to Wayland, rather it might be an issue with Electronā€™s Wayland-specific code paths.

If you can, please file a Wayland bug with upstream Electron. I donā€™t have an understanding of Obsidianā€™s tab management logic to explain how itā€™s interacting with Electron, but I think itā€™s important enough to fix so that Obsidian can behave consistently between Wayland and X11.

Iā€™am using org.freedesktop.Platformā€™s 23.08.2 version and the graph issue happened again. I guess I installed the org.freedesktop.Platform update this morning.

Does it happen on both wayland and xwayland?

You can try rolling back to see if itā€™s a bug in the runtime:

$ flatpak remote-info --log flathub org.freedesktop.Platform//23.08
        ID: org.freedesktop.Platform
       Ref: runtime/org.freedesktop.Platform/x86_64/23.08
      Arch: x86_64
    Branch: 23.08
Collection: org.flathub.Stable
  Download: 224.1 MB
 Installed: 589.1 MB

    Commit: 77c76ae3945175d2a48d8458f7e1129bb7102e41aae5a4eaf3228988a992e721
    Parent: dc6f68f20795a2fbae706657fd32c5f3ae2d18f1bd911894e27b9d73c936da35
   Subject: Export org.freedesktop.Platform
      Date: 2023-10-04 01:32:57 +0000
   History: 

    Commit: dc6f68f20795a2fbae706657fd32c5f3ae2d18f1bd911894e27b9d73c936da35
   Subject: Export org.freedesktop.Platform
      Date: 2023-09-21 15:57:23 +0000

    Commit: 5ebc2c3c6adb7c9321e7d5c38a72223f23916a7f38849f43c4319b6371204994
   Subject: Export org.freedesktop.Platform
      Date: 2023-09-04 18:44:22 +0000
$ flatpak update org.freedesktop.Platform//23.08 --commit=5ebc2c3c6adb7c9321e7d5c38a72223f23916a7f38849f43c4319b6371204994
Looking for updatesā€¦


        ID                                Branch          Op          Remote           Download
 1.     org.freedesktop.Platform          23.08           u           flathub          < 224.2 MB

Proceed with these changes to the system installation? [Y/n]: 

I tried both xwayland and wayland and the graph issue happened.
I did this:
flatpak remote-info --log flathub org.freedesktop.Platform//23.08
result:

        ID: org.freedesktop.Platform
       Ref: runtime/org.freedesktop.Platform/x86_64/23.08
      Arch: x86_64
    Branch: 23.08
Collection: org.flathub.Stable
  Download: 224,1 MB
 Installed: 589,1 MB

    Commit: 77c76ae3945175d2a48d8458f7e1129bb7102e41aae5a4eaf3228988a992e721
    Parent: dc6f68f20795a2fbae706657fd32c5f3ae2d18f1bd911894e27b9d73c936da35
   Subject: Export org.freedesktop.Platform
      Date: 2023-10-04 01:32:57 +0000
   History: 

    Commit: dc6f68f20795a2fbae706657fd32c5f3ae2d18f1bd911894e27b9d73c936da35
   Subject: Export org.freedesktop.Platform
      Date: 2023-09-21 15:57:23 +0000

    Commit: 5ebc2c3c6adb7c9321e7d5c38a72223f23916a7f38849f43c4319b6371204994
   Subject: Export org.freedesktop.Platform
      Date: 2023-09-04 18:44:22 +0000

then I choose 2023-09-21;
sudo flatpak update org.freedesktop.Platform//23.08 --commit=dc6f68f20795a2fbae706657fd32c5f3ae2d18f1bd911894e27b9d73c936da35
then I open the app and issue doesnā€™t solved.

then I choose 2023-09-04;
sudo flatpak update org.freedesktop.Platform//23.08 --commit=5ebc2c3c6adb7c9321e7d5c38a72223f23916a7f38849f43c4319b6371204994
then I open the app and issue doesnā€™t solved.
then I logged out and in;
then I open the app and issue doesnā€™t solved.

Then I tried 2023-09-21 and this time, I logged out and in;
then I open the app and issue doesnā€™t solved.

And I tried all with xwayland.

Then I enabled wayland with 2023-09-21. Didnā€™t work either.
Then I with wayland and 2023-09-04. Didnā€™t work either. But this time when app I clicked the app icon to open, first I think it didnā€™t open then I clicked another time then 2 window opened.