atuin: missing field `history` when syncing new machine

Lovely piece of software! Been using for a little while, tried syncing a new machine today.

I get the following though (on the new computer):

jsmith@qgpu02 ~ $ atuin sync
Error: error decoding response body: missing field `history` at line 1 column 50

Caused by:
    missing field `history` at line 1 column 50

Location:
    /home/runner/work/atuin/atuin/atuin-client/src/api_client.rs:179:23

Login seemed fine, but syncing didn’t happen. Where to start looking for further debug information?

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 1
  • Comments: 15 (6 by maintainers)

Most upvoted comments

Apart from a manual build, that I would like to avoid doing, is the next release going to “automatically” take care of it?

I am very much hoping that the next release should automatically resolve this, worst case some manual steps

I might be able to help w this - i was debugging this exact same issue w ellie via discord a few days ago- it was a bug that has since been fixed in the latest version of main (bug has NOT been built into the current .deb packages yet though). Its a bug related to bash and its history file not having timestamps and/OR the usage of nanoseconds/milliseconds in PostgreSQL db- see the link at bottom

so you have the build the latest atuin from main (was patched 3-4 days ago), in MY case: (uninstall atunin): cargo install --git https://github.com/ellie/atuin.git --branch main

or to overwrite the atuin binary in-place: cargo install --git https://github.com/ellie/atuin.git --branch main --force

now the part im not sure on: is if u you need to fully start from fresh after doing this (ie if you are selfhosting the atuin server, like im doing, drop the DB, create a new DB, and then re-import each of your atuin clients.) < so i cant say if you can just update the atuin client and then try: atuin import auto then atuin sync OR if you need to fully start over / re-import on all of your atuin clients.

(Additionally- im not sure how you “fully start over” if using the public atuin sync server, one guess would be to atuin logout on all your clients, , wipe each clients local sqlLite DB, usually located in: ~/.local/share/atuin/history.db atuin register <a new/different account> , then on all clients: atuin import auto, atuin login <on the NEW account> , atuin sync.

that said- the solution to ur issue starts with using the very latest version of atuin, which addresses this bug: https://github.com/ellie/atuin/pull/970

Have either of you ever imported any Bash history?