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

sync -f "Failed to decrypt history!" error #1850

Open
plars opened this issue Mar 11, 2024 · 1 comment
Open

sync -f "Failed to decrypt history!" error #1850

plars opened this issue Mar 11, 2024 · 1 comment

Comments

@plars
Copy link

plars commented Mar 11, 2024

I'm trying to sync history between two different devices and wasn't seeing the same history on each. Both are logged into the same account successfully.
I registered the account on one device, then logged into a second device. On the second device, I synced history, then on the first I synced history, but they still only see their own history - not the other.
So I decided to try atuin sync -f and got this error:

thread 'main' panicked at /tmp/atuin-20240226-9218-rw12ap/atuin-18.0.2/atuin-client/src/sync.rs:74:38:
failed to decrypt history! check your key: could not encrypt

Location:
    atuin-client/src/encryption.rs:143:22
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Here's the output with backtrace enabled:

thread 'main' panicked at /tmp/atuin-20240226-9218-rw12ap/atuin-18.0.2/atuin-client/src/sync.rs:74:38:
failed to decrypt history! check your key: could not encrypt

Location:
    atuin-client/src/encryption.rs:143:22
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::result::unwrap_failed
   3: <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::fold
   4: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter
   5: atuin_client::sync::sync::{{closure}}
   6: atuin::command::client::Cmd::run_inner::{{closure}}
   7: tokio::runtime::scheduler::current_thread::CoreGuard::block_on
   8: tokio::runtime::context::runtime::enter_runtime
   9: tokio::runtime::runtime::Runtime::block_on
  10: atuin::command::AtuinCmd::run
  11: atuin::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
@plars
Copy link
Author

plars commented Mar 11, 2024

fwiw, I sorted out that I needed to run atuin store rekey and specify the key of the other one so that they are using the same key now. But it still might be worth catching that error and giving some nicer output

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

1 participant