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

Cannot register or login #504

Closed
oo00spy00oo opened this issue Aug 19, 2022 · 6 comments
Closed

Cannot register or login #504

oo00spy00oo opened this issue Aug 19, 2022 · 6 comments

Comments

@oo00spy00oo
Copy link

I got the message when tried to register

❯ atuin register -u <USERNAME> -p <PASSWORD>
Please enter email: <EMAIL>
Error: failed to register user

Location:
    /private/tmp/atuin-20220606-67432-rpf7h8/atuin-0.10.0/atuin-client/src/api_client.rs:61:9
@conradludgate
Copy link
Collaborator

Are you trying to use the public sync server, or a private one?

@conradludgate
Copy link
Collaborator

This makes me realise though that we have bad error messages in this path, I'll submit a patch later

@ellie
Copy link
Member

ellie commented Oct 8, 2022

Hey @oo00spy00oo, if you try again with the latest Atuin (v11):

  1. does the error still occur?
  2. if so, could you please share the error message? It should be more helpful now :)

@mzfr
Copy link

mzfr commented Nov 20, 2022

@conradludgate @ellie I tried both v11 and v12 and I'm getting different error on both of them

I used the docker-compose.yml on my raspi to start the atuin server and it worked without any issue.

Then on raspi(atuin v11) I got the following:

$ atuin register -u myuser -e [email protected] -p password
Error: failed to register user

Location:
    /build/atuin/src/atuin-11.0.0/atuin-client/src/api_client.rs:61:9

On my local system(atuin v12) I got:

$ atuin register -u myuser -e [email protected] -p password
Error: error decoding response body: expected value at line 1 column 1

Caused by:
    expected value at line 1 column 1

Location:
    /home/runner/work/atuin/atuin/atuin-client/src/api_client.rs:62:21

In both cases the only thing that I have modified inside ~/.config/atuin/config.toml is the sync_address

sync_address = "http://MY_IP_ADDRESS:8888/"

Inside docker, atuin is running v12

Fix

The error is because of / in the end of the URL. If sync_address ends with / it will throw the above-mentioned errors but if it doesn't then all good.

  • Error(s)
sync_address = "http://MY_IP_ADDRESS:8888/"
  • No error(s)
sync_address = "http://MY_IP_ADDRESS:8888"

Notice no / at the end of the URL

@conradludgate
Copy link
Collaborator

Thanks for the report and the investigation. That should be an easy fix by parsing the Url early and using the proper push methods instead of string manipulation

@conradludgate
Copy link
Collaborator

dupe of #389 and being fixed in #979

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

4 participants