doy / rbw

unofficial bitwarden cli
https://git.tozt.net/rbw
Other
573 stars 82 forks source link

Agent crashes when attempting to login #143

Open WxNzEMof opened 8 months ago

WxNzEMof commented 8 months ago

rbw login fails with rbw login: failed to parse message from agent: EOF while parsing a value at line 1 column 0.

With RUST_BACKTRACE=1 rbw login, in .local/share/rbw/agent.err:

[2023-10-18T20:47:02Z WARN  rbw_agent::agent] couldn't create clipboard context: XCB - couldn't establish conection: DisplayParsingError
thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap()` on an `Err` value: SystemCall(Os { code: 1, kind: PermissionDenied, message: "Operation not permitted" })', src/locked.rs:15:65
stack backtrace:
Warning: using insecure memory!
pinentry-curses: no LC_CTYPE known - assuming UTF-8
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::result::unwrap_failed
   3: <rbw::locked::Vec as core::default::Default>::default
   4: rbw::locked::Vec::new
   5: rbw::pinentry::getpin::{{closure}}
   6: rbw_agent::agent::handle_request::{{closure}}
   7: rbw_agent::agent::Agent::run::{{closure}}::{{closure}}
   8: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
   9: tokio::runtime::task::core::Core<T,S>::poll
  10: tokio::runtime::task::harness::Harness<T,S>::poll
  11: tokio::runtime::scheduler::multi_thread::worker::Context::run_task
  12: tokio::runtime::scheduler::multi_thread::worker::Context::run
  13: tokio::runtime::context::scoped::Scoped<T>::set
  14: tokio::runtime::context::runtime::enter_runtime
  15: tokio::runtime::scheduler::multi_thread::worker::run
  16: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
  17: tokio::runtime::task::core::Core<T,S>::poll
  18: tokio::runtime::task::harness::Harness<T,S>::poll
  19: tokio::runtime::blocking::pool::Inner::run
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
n-hass commented 8 months ago

Same issue here on macOS.

xusiai commented 7 months ago

Experiencing this as well on NixOS, regardless of whether I manage rbw's config via nix or not.

Samasaur1 commented 5 months ago

I get this same issue on macOS with rbw installed via Nix, though setting RUST_BACKTRACE=1 doesn't give me any more information

doy commented 2 months ago

can you give this a try with version 1.10.0? i updated the dependency in use here, which may help.

Samasaur1 commented 2 months ago

@doy I still see the same error

Samasaur1 commented 2 months ago

and the only entry in agent.err is

WARN  rbw_agent] failed to disable PTRACE_ATTACH, agent memory may be dumpable by other processes: unimplemented on this platform
doy commented 2 months ago

did this just start happening recently? or has it always crashed?

Samasaur1 commented 2 months ago

For me at least, this has always happened

doy commented 2 months ago

can you give me the output of ulimit -l and du -sh ~/.cache/rbw (or du -sh ~/Library/Caches/rbw if you're on macos)?

Samasaur1 commented 2 months ago
[sam](~)$ ulimit -l
unlimited
[sam](~)$ du -sh ~/Library/Caches/rbw
  0B    /Users/sam/Library/Caches/rbw
Samasaur1 commented 1 month ago

@doy I noticed that there were some new commits after v1.10.0, so I tried building that version, but still no luck (with the same error)