gitbutler
gitbutler copied to clipboard
[wsl] Failed to create a temp folder for icon: Os
On Ubuntu 22.04 in WSL2 (Windows 11).
Installed git-butler from deb file, and then ran sudo apt install -y -f
as recommended here
Running git-butler
results in this error message:
thread 'main' panicked at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tao-0.16.2/src/platform_impl/linux/system_tray.rs:46:51:
Failed to create a temp folder for icon: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Here's the backtrace:
stack backtrace:
0: rust_begin_unwind
at /rustc/503e129328080e924c0ddfca6abf4c2812580102/library/std/src/panicking.rs:645:5
1: core::panicking::panic_fmt
at /rustc/503e129328080e924c0ddfca6abf4c2812580102/library/core/src/panicking.rs:72:14
2: core::result::unwrap_failed
at /rustc/503e129328080e924c0ddfca6abf4c2812580102/library/core/src/result.rs:1649:5
3: core::result::Result<T,E>::expect
at /rustc/503e129328080e924c0ddfca6abf4c2812580102/library/core/src/result.rs:1030:23
4: tao::platform_impl::platform::system_tray::SystemTrayBuilder::build
at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tao-0.16.2/src/platform_impl/linux/system_tray.rs:46:7
5: tao::system_tray::SystemTrayBuilder::build
at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tao-0.16.2/src/system_tray.rs:87:5
6: tauri_runtime_wry::system_tray::create_tray
at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tauri-runtime-wry-0.14.3/src/system_tray.rs:123:14
7: <tauri_runtime_wry::Wry<T> as tauri_runtime::Runtime<T>>::system_tray
at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tauri-runtime-wry-0.14.3/src/lib.rs:2138:25
8: tauri::app::tray::SystemTray::build
at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tauri-1.5.4/src/app/tray.rs:448:40
9: tauri::app::Builder<R>::build
at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tauri-1.5.4/src/app.rs:1675:9
10: gitbutler_app::main::{{closure}}
at /home/runner/work/gitbutler/gitbutler/gitbutler-app/src/bin.rs:31:13
11: <tracing::instrument::Instrumented<T> as core::future::future::Future>::poll
at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tracing-0.1.40/src/instrument.rs:321:9
12: tokio::runtime::park::CachedParkThread::block_on::{{closure}}
at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/park.rs:281:63
13: tokio::runtime::coop::with_budget
at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/coop.rs:107:5
14: tokio::runtime::coop::budget
at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/coop.rs:73:5
15: tokio::runtime::park::CachedParkThread::block_on
at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/park.rs:281:31
16: tokio::runtime::context::blocking::BlockingRegionGuard::block_on
at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/context/blocking.rs:66:9
17: tokio::runtime::scheduler::multi_thread::MultiThread::block_on::{{closure}}
at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/scheduler/multi_thread/mod.rs:87:13
18: tokio::runtime::context::runtime::enter_runtime
at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/context/runtime.rs:65:16
19: tokio::runtime::scheduler::multi_thread::MultiThread::block_on
at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/scheduler/multi_thread/mod.rs:86:9
20: tokio::runtime::runtime::Runtime::block_on
at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/runtime.rs:350:45
21: gitbutler_app::main
at /home/runner/work/gitbutler/gitbutler/gitbutler-app/src/bin.rs:17:5
22: core::ops::function::FnOnce::call_once
at /rustc/503e129328080e924c0ddfca6abf4c2812580102/library/core/src/ops/function.rs:250:5
I haven't figured out where it's trying to create a temporary folder. AFAIK my filesystem permissions are all default, and /tmp
has the normal 777
permissions.
This appears to be due to the system tray icon attempting to be created, these are the paths it's attempting to use: https://github.com/tauri-apps/tao/commit/ce209d39ab21e493ba98bab83aa7827fa05d7050#diff-b4d52f37e7d6ca7856f2be3e842adc85275e9973dfb85316a5ed1910dccbd368R108
For me, I had to unset XDG_RUNTIME_DIR
.
I also noticed that /tmp/tao
had files owned by root. You may want to fiddle with the permissions there.
im considering removing the tray icon altogether as it's not very valuable as it stands. will ping here with an update
resolved in https://github.com/gitbutlerapp/gitbutler/pull/2785