keyring-rs icon indicating copy to clipboard operation
keyring-rs copied to clipboard

keyring failing weirdly on a remote vm

Open PFC-developer opened this issue 4 years ago • 2 comments

I've built a package that utilizes 0.1.x and it works fine on WSL linux. I upgraded to 1.1.2, and it returns

[2022-02-22T10:46:09Z ERROR terra_rust] Platform secure storage failure: zbus error: I/O error: No such file or directory (os error 2)
[2022-02-22T10:46:09Z ERROR terra_rust] because: zbus error: I/O error: No such file or directory (os error 2)
[2022-02-22T10:46:09Z ERROR terra_rust] because: I/O error: No such file or directory (os error 2)
[2022-02-22T10:46:09Z ERROR terra_rust] because: No such file or directory (os error 2)

also.. when using either on a remote linux vm, both fail. I'm assuming it is a configuration issue on my end. but I have no idea where to start looking.

TIA

PFC-developer avatar Feb 22 '22 11:02 PFC-developer

if it helps this is the output of 'secret-service-rs` on both machines

/secret-service-rs$ cargo run --example example
   Compiling secret-service v2.0.1 (/mnt/disks/data.2/dev/secret-service-rs)
    Finished dev [unoptimized + debuginfo] target(s) in 2.27s
     Running `target/debug/examples/example`
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: NoResult', examples/example.rs:18:50
stack backtrace:

and

 cargo run --example example
    Finished dev [unoptimized + debuginfo] target(s) in 0.02s
     Running `target/debug/examples/example`
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Zbus(Io(Os { code: 2, kind: NotFound, message: "No such file or directory" }))', examples/example.rs:15:56
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

PFC-developer avatar Feb 22 '22 11:02 PFC-developer

Hi @PFC-developer, sorry to take so long getting back to you. I'm not really the Linux expert on the development team: @hwchen is. I work exclusively in Ubuntu, and can't reproduce this failure there. Can you try running again with the environment variable RUST_BACKTRACE=1 set as suggested in the error message? I might be able to help if I can see where in the call stack the failure occurs.

As to the remote linux failures, in my experience you have to unlock they keyring explicitly when working with remote login sessions. See my answer on the Unix stack exchange for a detailed procedure that does this.

brotskydotcom avatar Mar 28 '22 04:03 brotskydotcom

I am seeing this under Ubuntu in WSL, I think it might be related to a missing dbus?

sytten@DESKTOP:~/projects/test-keyring$ secret-tool store --label='mytest' test-stuff myvalue
Password:
secret-tool: Cannot autolaunch D-Bus without X11 $DISPLAY

Sytten avatar Aug 31 '22 17:08 Sytten

@Sytten Yes, that's exactly what it's about. I've updated this project's README to explain how to get keyring to work on headless linux boxes. I'm going to close this bug request as a fixed documentation request for now, and mark it as cannot repro because I haven't gotten logs from @PFC-developer .

brotskydotcom avatar Sep 06 '22 17:09 brotskydotcom

sorry for the tardiness @brotskydotcom .. I haven't gotten back to this, as I stopped using the tool I was writing.

PFC-developer avatar Sep 06 '22 18:09 PFC-developer