opencode icon indicating copy to clipboard operation
opencode copied to clipboard

[Desktp/experimental] Fedora 42 crash to desktop

Open airtonix opened this issue 4 weeks ago • 7 comments

Description

DISPLAY set to
zinit v3.11.0-10-g1cb1df63 (linux-gnu_x86_64)

~
> which opencode
~/.local/share/mise/installs/ubi-sst-opencode/1.0.146/opencode

~
> cat /usr/share/applications/OpenCode.desktop
[Desktop Entry]
Categories=
Comment=A Tauri App
Exec="OpenCode Desktop"
StartupWMClass="OpenCode Desktop"
Icon=OpenCode Desktop
Name=OpenCode
Terminal=false
Type=Application

~
>

~
> OpenCode\ Desktop

thread 'main' (16890) panicked at /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tao-0.34.5/src/platform_impl/linux/event_loop.rs:218:53:
Failed to initialize gtk backend!: BoolError { message: "Failed to initialize GTK", filename: "/home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/gtk-0.18.2/src/rt.rs", function: "gtk::rt::init", line: 141 }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

~
x RUST_BACKTRACE=1 OpenCode\ Desktop

thread 'main' (16976) panicked at /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tao-0.34.5/src/platform_impl/linux/event_loop.rs:218:53:
Failed to initialize gtk backend!: BoolError { message: "Failed to initialize GTK", filename: "/home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/gtk-0.18.2/src/rt.rs", function: "gtk::rt::init", line: 141 }
stack backtrace:
   0: __rustc::rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::result::unwrap_failed
   3: glib::main_context::<impl glib::auto::main_context::MainContext>::with_thread_default
   4: tauri_runtime_wry::Wry<T>::init_with_builder
   5: opencode_lib::run
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

https://github.com/user-attachments/assets/35a35ccd-5b15-456c-97f0-27a73f681220

OpenCode version

https://github.com/sst/opencode/releases/download/v1.0.152/opencode-desktop-linux-x86_64.rpm

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

airtonix avatar Dec 12 '25 23:12 airtonix

I suspect there's something going on here with your build system:

  • i don't have a /home/runner (but i know github actions do)

airtonix avatar Dec 13 '25 13:12 airtonix

Got a bit further

~ took 7s
x sudo dnf install libcanberra-gtk3 libcanberra
Updating and loading repositories:
Repositories loaded.
Package "libcanberra-gtk3-0.30-37.fc42.x86_64" is already installed.
Package "libcanberra-gtk3-0.30-37.fc42.i686" is already installed.
Package "libcanberra-0.30-37.fc42.x86_64" is already installed.
Package "libcanberra-0.30-37.fc42.i686" is already installed.

Nothing to do.

~
> GDK_BACKEND=x11 OpenCode\ Desktop

thread 'main' (361879) panicked at /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tao-0.34.5/src/platform_impl/linux/event_loop.rs:218:53:
Failed to initialize gtk backend!: BoolError { message: "Failed to initialize GTK", filename: "/home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/gtk-0.18.2/src/rt.rs", function: "gtk::rt::init", line: 141 }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

~
x GDK_BACKEND=wayland OpenCode\ Desktop
opencode server listening on http://127.0.0.1:36863
Server ready after 456.394427ms
Gdk-Message: 00:27:10.215: Error 71 (Protocol error) dispatching to Wayland display.
ERROR: WebKit encountered an internal error. This is a WebKit bug.
/builddir/build/BUILD/webkitgtk-2.50.1-build/webkitgtk-2.50.1/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp(618) : void WebKit::WebLoaderStrategy::internallyFailedLoadTimerFired()
ERROR: WebKit encountered an internal error. This is a WebKit bug.
/builddir/build/BUILD/webkitgtk-2.50.1-build/webkitgtk-2.50.1/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp(618) : void WebKit::WebLoaderStrategy::internallyFailedLoadTimerFired()
ERROR: WebKit encountered an internal error. This is a WebKit bug.
/builddir/build/BUILD/webkitgtk-2.50.1-build/webkitgtk-2.50.1/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp(618) : void WebKit::WebLoaderStrategy::internallyFailedLoadTimerFired()
ERROR: WebKit encountered an internal error. This is a WebKit bug.
/builddir/build/BUILD/webkitgtk-2.50.1-build/webkitgtk-2.50.1/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp(618) : void WebKit::WebLoaderStrategy::internallyFailedLoadTimerFired()
ERROR: WebKit encountered an internal error. This is a WebKit bug.
/builddir/build/BUILD/webkitgtk-2.50.1-build/webkitgtk-2.50.1/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp(618) : void WebKit::WebLoaderStrategy::internallyFailedLoadTimerFired()

airtonix avatar Dec 13 '25 13:12 airtonix

Relevant https://github.com/tauri-apps/tauri/issues/10702#issuecomment-2327642878

WEBKIT_DISABLE_DMABUF_RENDERER=1  GDK_BACKEND=wayland OpenCode\ Desktop

https://github.com/user-attachments/assets/23bcdf59-ae97-4bfb-a049-3c9d0b4152b1

airtonix avatar Dec 13 '25 14:12 airtonix

Hi, I've got the same issue with the DEB package. Any ideas how to fix this?

$ sudo apt install --reinstall -y ~/Downloads/debs/opencode-desktop-linux-amd64.deb
Note, selecting 'open-code' instead of '/home/redtux/Downloads/debs/opencode-desktop-linux-amd64.deb'
Summary:                    
  Upgrading: 0, Installing: 0, Reinstalling: 1, Removing: 0, Not Upgrading: 0
  Download size: 0 B / 60.9 MB
  Space needed: 0 B / 326 GB available

Get:1 /home/redtux/Downloads/debs/opencode-desktop-linux-amd64.deb open-code amd64 1.0.163 [60.9 MB]
(Reading database ... 218241 files and directories currently installed.)
Preparing to unpack .../opencode-desktop-linux-amd64.deb ...
Unpacking open-code (1.0.163) over (1.0.163) ...
Setting up open-code (1.0.163) ...
Processing triggers for hicolor-icon-theme (0.18-2) ...
Processing triggers for desktop-file-utils (0.28-1) ...
Notice: Download is performed unsandboxed as root as file '/home/redtux/Downloads/debs/opencode-desktop-linux-amd64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
$ RUST_BACKTRACE=full OpenCode
Authorization required, but no authorization protocol specified


thread 'main' (20344) panicked at /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tao-0.34.5/src/platform_impl/linux/event_loop.rs:218:53:
Failed to initialize gtk backend!: BoolError { message: "Failed to initialize GTK", filename: "/home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/gtk-0.18.2/src/rt.rs", function: "gtk::rt::init", line: 141 }
stack backtrace:
   0:     0x55b271d53cf2 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h718e2d17a1928e63
   1:     0x55b271d6719f - core::fmt::write::h1d2246b072ea91eb
   2:     0x55b271d1bec3 - std::io::Write::write_fmt::haf55272405c09d9b
   3:     0x55b271d2a792 - std::sys::backtrace::BacktraceLock::print::h61c3bd81a9458a03
   4:     0x55b271d30c0f - std::panicking::default_hook::{{closure}}::haf1ffb5d1e33a97f
   5:     0x55b271d30a69 - std::panicking::default_hook::hc32245deb6eaa988
   6:     0x55b271d31295 - std::panicking::panic_with_hook::h43adc00fd0e494cb
   7:     0x55b271d3107a - std::panicking::panic_handler::{{closure}}::h44391079756da3e7
   8:     0x55b271d2a8d9 - std::sys::backtrace::__rust_end_short_backtrace::h934e1568393e5b8f
   9:     0x55b271d0f0cd - __rustc[d9b87f19e823c0ef]::rust_begin_unwind
  10:     0x55b271d70c20 - core::panicking::panic_fmt::h62031895f6e012da
  11:     0x55b271d6fd36 - core::result::unwrap_failed::h8e46864fd8bf13c6
  12:     0x55b27134453c - glib::main_context::<impl glib::auto::main_context::MainContext>::with_thread_default::hb4c607dfe6ebbd8b
  13:     0x55b2714d9855 - tauri_runtime_wry::Wry<T>::init_with_builder::h414ccaa38b97ca08
  14:     0x55b271346c36 - tauri::app::Builder<R>::build::h74b52dde275fd402
  15:     0x55b27132995c - opencode_lib::run::h1c108de711dc2dee
  16:     0x55b271328693 - std::sys::backtrace::__rust_begin_short_backtrace::he1005a3c06e35a3c
  17:     0x55b271328689 - std::rt::lang_start::{{closure}}::hd78949d170bca31a
  18:     0x55b271d1dc00 - std::rt::lang_start_internal::h00c7908c7c2f92b8
  19:     0x55b2713286d5 - main
  20:     0x7f3ade644f75 - <unknown>
  21:     0x7f3ade645027 - __libc_start_main
  22:     0x55b2713285a5 - _start
  23:                0x0 - <unknown>

$ echo $XDG_SESSION_TYPE
wayland

$ echo $DISPLAY
:0

redtux avatar Dec 16 '25 22:12 redtux

Okay, this was inside a distrobox container. Using xhost solved this in my case.

redtux avatar Dec 16 '25 22:12 redtux