Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Agent panics on startup on a headless system (clipboard can't find GUI) #227

Closed
tirsek opened this issue Dec 31, 2024 · 3 comments
Closed

Comments

@tirsek
Copy link

tirsek commented Dec 31, 2024

I have a similar problem as issue #143, but I think it's dissimilar enough to warrant its own issue. I'm running on a headless system (no GUI), so when the agent starts up and attempts to create a clipboard context, cli_clipboard::ClipboardContext::new() from within Agent::new fails, and the subsequent unwrap panics.

thread 'main' panicked at [...]/rbw/src/bin/rbw-agent/agent.rs:77:67:
called `Result::unwrap()` on an `Err` value: XcbConnect(DisplayParsingError)
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::result::unwrap_failed
   3: core::result::Result<T,E>::unwrap
             at ./usr/src/debug/rust/rustc-1.83.0-src/library/core/src/result.rs:1104:23
   4: rbw_agent::agent::Agent::new
             at [...]/rbw/src/bin/rbw-agent/agent.rs:77:28

(Irrelevant stack frames omitted)

It appears that commit 9ad4ac8 first introduced the problem. Prior to this, I just get a warning in the agent.err file:

[2024-12-31T18:19:54Z WARN  rbw_agent::agent] couldn't create clipboard context: XCB - couldn't establish conection: DisplayParsingError(DisplayNotSet)

For now I'll build a version without clipboard support (thank you for making it optional).

eatradish added a commit to AOSC-Tracking/rbw that referenced this issue Jan 2, 2025
@eatradish
Copy link
Contributor

Try #226 ?

@NickPancakes
Copy link

Running into this as well, and can confirm #226 works for me. Thanks!

@tirsek
Copy link
Author

tirsek commented Jan 2, 2025

Works for me; the panic is once again replaced with a warning:

[2025-01-02T15:15:50Z WARN  rbw_agent::agent] couldn't create clipboard context: Unknown error while interacting with the clipboard: X11 server connection timed out because it was unreachable

It also works fine on my Wayland system.

@doy doy closed this as completed in cffc98c Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants