refi64 / zypak

Run Electron binaries in a sandboxed Flatpak environment
BSD 3-Clause "New" or "Revised" License
113 stars 5 forks source link

Obsidian app fails to download data from Github #27

Closed joshua-stone closed 1 year ago

joshua-stone commented 1 year ago

The Obsidian app seems to have encountered a networking issue where it cannot successfully reach Github which is impacting its ability to download OTA updates and information about available community plugin despite having network access in the sandbox:

https://github.com/flathub/md.obsidian.Obsidian/issues/95

Debug: Will run Obsidian with the following arguments: 
Debug: Additionally, user gave: 
2022-12-20 07:13:26 Loading main app package /app/resources/obsidian.asar
LaunchProcess: failed to execvp:
xdg-settings
Gtk-Message: 15:13:26.368: Failed to load module "canberra-gtk-module"
Gtk-Message: 15:13:26.368: Failed to load module "pk-gtk-module"
Gtk-Message: 15:13:26.368: Failed to load module "canberra-gtk-module"
Gtk-Message: 15:13:26.368: Failed to load module "pk-gtk-module"
[13:1220/151326.377834:ERROR:bus.cc(397)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: 没有那个文件或目录
[13:1220/151326.377864:ERROR:bus.cc(397)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: 没有那个文件或目录
2022-12-20 07:13:26 Checking for update using Github
2022-12-20 07:13:26 Failed to check for update using Github (net::ERR_CONNECTION_REFUSED)
Error: net::ERR_CONNECTION_REFUSED
    at SimpleURLLoaderWrapper.<anonymous> (node:electron/js2c/browser_init:101:7169)
    at SimpleURLLoaderWrapper.emit (node:events:390:28)
2022-12-20 07:13:26 Checking for update using obsidian.md
2022-12-20 07:13:29 Success.
2022-12-20 07:13:29 Latest version is 1.0.3
2022-12-20 07:13:29 App is up to date.
refi64 commented 1 year ago

I...don't think the processes in question actually run in a network sandbox? You could patch out the lines that disable networking in the sandbox from spawn_launcher_delegate.cc (where it adds kNoNetwork to the spawn flags) & mimc_launcher_delegate.cc (where it adds --no-network to the CLI args)...but I'm a tad skeptical it's tied to it.

joshua-stone commented 1 year ago

I'm going to mark this as closed to due how difficult it's been to replicate. It's most likely caused by an outside issue that's not intrinsic to zypak.