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

[Bug]: could not login due to version mismatch #2030

Open
1 task done
newro opened this issue May 18, 2024 · 2 comments · May be fixed by #2076
Open
1 task done

[Bug]: could not login due to version mismatch #2030

newro opened this issue May 18, 2024 · 2 comments · May be fixed by #2076
Labels
bug Something isn't working

Comments

@newro
Copy link

newro commented May 18, 2024

What did you expect to happen?

succeed login and sync ok

What happened?

[2024-05-18T13:17:19Z DEBUG reqwest::connect] starting new connection: https://api.atuin.sh/
[2024-05-18T13:17:19Z DEBUG hyper::client::connect::dns] resolving host="api.atuin.sh"
[2024-05-18T13:17:19Z DEBUG hyper::client::connect::http] connecting to 172.67.70.19:443
[2024-05-18T13:17:19Z DEBUG hyper::client::connect::http] connected to 172.67.70.19:443
[2024-05-18T13:17:19Z DEBUG rustls::client::hs] No cached session for DnsName("api.atuin.sh")
[2024-05-18T13:17:19Z DEBUG rustls::client::hs] Not resuming any session
[2024-05-18T13:17:19Z DEBUG rustls::client::hs] Using ciphersuite TLS13_AES_256_GCM_SHA384
[2024-05-18T13:17:19Z DEBUG rustls::client::tls13] Not resuming
[2024-05-18T13:17:19Z DEBUG rustls::client::tls13] TLS1.3 encrypted extensions: [ServerNameAck, Protocols([ProtocolName(6832)])]
[2024-05-18T13:17:19Z DEBUG rustls::client::hs] ALPN protocol is Some(b"h2")
[2024-05-18T13:17:19Z DEBUG h2::client] binding client connection
[2024-05-18T13:17:19Z DEBUG h2::client] client connection bound
[2024-05-18T13:17:19Z DEBUG h2::codec::framed_write] send frame=Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384 }
[2024-05-18T13:17:19Z DEBUG h2::proto::connection] Connection; peer=Client
[2024-05-18T13:17:19Z DEBUG h2::codec::framed_write] send frame=WindowUpdate { stream_id: StreamId(0), size_increment: 5177345 }
[2024-05-18T13:17:19Z DEBUG hyper::client::pool] pooling idle connection for ("https", api.atuin.sh)
[2024-05-18T13:17:19Z DEBUG h2::codec::framed_write] send frame=Headers { stream_id: StreamId(1), flags: (0x4: END_HEADERS) }
[2024-05-18T13:17:19Z DEBUG h2::codec::framed_write] send frame=Data { stream_id: StreamId(1), flags: (0x1: END_STREAM) }
[2024-05-18T13:17:19Z DEBUG h2::codec::framed_read] received frame=Settings { flags: (0x0), max_concurrent_streams: 100, initial_window_size: 65536, max_frame_size: 16777215 }
[2024-05-18T13:17:19Z DEBUG h2::codec::framed_write] send frame=Settings { flags: (0x1: ACK) }
[2024-05-18T13:17:19Z DEBUG h2::codec::framed_read] received frame=WindowUpdate { stream_id: StreamId(0), size_increment: 2147418112 }
[2024-05-18T13:17:19Z DEBUG h2::codec::framed_read] received frame=Settings { flags: (0x1: ACK) }
[2024-05-18T13:17:19Z DEBUG h2::proto::settings] received settings ACK; applying Settings { flags: (0x0), enable_push: 0, initial_window_size: 2097152, max_frame_size: 16384 }
[2024-05-18T13:17:19Z DEBUG h2::codec::framed_read] received frame=Headers { stream_id: StreamId(1), flags: (0x4: END_HEADERS) }
[2024-05-18T13:17:19Z DEBUG h2::codec::framed_read] received frame=Data { stream_id: StreamId(1) }
[2024-05-18T13:17:19Z DEBUG h2::codec::framed_read] received frame=Data { stream_id: StreamId(1), flags: (0x1: END_STREAM) }
Atuin version mismatch! In order to successfully sync, the server needs to run a newer version of Atuin
Client: 18.2.0
Server: 17.1.0
Error: could not login due to version mismatch

Atuin doctor output

Atuin Doctor
Checking for diagnostics


Please include the output below with any bug reports or issues

atuin:
  version: 18.2.0
  sync: null
shell:
  name: zsh
  default: zsh
  plugins: []
system:
  os: Darwin
  arch: x86_64
  version: 14.4.1
  disks:
  - name: Macintosh HD
    filesystem: apfs
  - name: Macintosh HD
    filesystem: apfs

Code of Conduct

  • I agree to follow this project's Code of Conduct
@newro newro added the bug Something isn't working label May 18, 2024
@newro
Copy link
Author

newro commented May 18, 2024

browser to https://api.atuin.sh

// 20240518220340
// https://api.atuin.sh/

{
"homage": ""Through the fathomless deeps of space swims the star turtle Great A'Tuin, bearing on its back the four giant elephants who carry on their shoulders the mass of the Discworld." -- Sir Terry Pratchett",
"version": "18.2.0",
"total_history": 108852245
}

@xvello
Copy link
Contributor

xvello commented Jun 2, 2024

17.1.0 is the default when no header is found in the response, so I'm guessing the issue here was that the API was temporary unavailable and returned a gateway error or other network error.

Retrying at a later time should fix it. This header has been introduced 6 months ago, so the code could be reworked to:

  • only run ensure_version if the status code is 200
  • not fallback into a version, but error with an explicit "no version header"

@xvello xvello linked a pull request Jun 2, 2024 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants