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

rbw login: failed to log in to bitwarden instance: failed to parse JSON: EOF while parsing a value at line 1 column 0 #159

Closed
TheNilesh opened this issue Feb 24, 2024 · 5 comments

Comments

@TheNilesh
Copy link

$ sudo dpkg -i rbw_1.9.0_amd64.deb
Selecting previously unselected package rbw.
(Reading database ... 219884 files and directories currently installed.)
Preparing to unpack rbw_1.9.0_amd64.deb ...
Unpacking rbw (1.9.0) ...
Setting up rbw (1.9.0) ...
$ rbw --version
rbw 1.9.0
$ rbw purge
$ rbw register
$ rbw config show
{
  "email": "xxxx@gmail.com",
  "base_url": "https://api.bitwarden.com",
  "identity_url": "https://identity.bitwarden.com",
  "notifications_url": "https://notifications.bitwarden.com",
  "lock_timeout": 3600,
  "sync_interval": 3600,
  "pinentry": "pinentry",
  "client_cert_path": null
}
$ rbw register
$ rbw login
rbw login: failed to log in to bitwarden instance: failed to parse JSON: EOF while parsing a value at line 1 column 0

The official bw cli works as expected using the same client_secrets. I have enabled 2FA recently.

  • How to get logs?
  • What is the location of a local copy of the password database so that I can manually inspect the file if it contains errors?
@Pablo12345678901
Copy link

Dear [TheNilesh], I had the same issue.

I checked the base_url through wget and it returned ERROR 404. Same on a browser...
So I tried to connect through a browser and noticed that the base_url was changed to "https://vault.bitwarden.com/".

I guess you found this solution since then but in case it can help for other users, I have written it.

Pablo12345678901 added a commit to Pablo12345678901/rbw that referenced this issue Mar 3, 2024
…ps://api.bitwarden.com' is not anymore valid and generate an error 'failed to log in to bitwarden instance: failed to parse JSON: EOF while parsing a value at line 1 column 0.' See issue doy#159.
@TheNilesh
Copy link
Author

$ rbw config set base_url "https://vault.bitwarden.com"
$ rbw login      
rbw login: failed to log in to bitwarden instance: error making api request: error sending request for url (https://identity.bitwarden.com/connect/token): error trying to connect: dns error: failed to lookup address information: Try again: error trying to connect: dns error: failed to lookup address information: Try again: dns error: failed to lookup address information: Try again: failed to lookup address information: Try again

@Pablo12345678901
Copy link

I am neither the project owner nor a developper of it but :

My configuration is the same as your except that as in the official documentation I have '/' at the end of each url :

{"email":"XXX@XXX", "base_url":"https://vault.bitwarden.com/", "identity_url":"https://identity.bitwarden.com/", "notifications_url":"https://notifications.bitwarden.com/", "lock_timeout":3600, "sync_interval":1800, "pinentry":"pinentry", "client_cert_path":null }

I tried to :
wget https://identity.bitwarden.com/connect/token -> ERROR 400: Bad Request
wget https://identity.bitwarden.com/connect/ -> ERROR 404: Not Found.
wget https://identity.bitwarden.com/ -> ERROR 404: Not Found.

I would advice you to :

  • retry adding a slash ('/') at end end of each url into the configuration file.
  • try to connect through Bitwarden website, note the base_url of the connection and test your login accesses to ensure.

Else I don't want to investigate the code that is not mine to help further.

@TheNilesh
Copy link
Author

@Pablo12345678901 Thanks! I retried rbw login without changing the config, today, and it worked. Maybe it was a temporary network/caching issue.

$ rbw config show
{
  "email": "xxxxx@gmail.com",
  "base_url": "https://vault.bitwarden.com",
  "identity_url": "https://identity.bitwarden.com",
  "notifications_url": "https://notifications.bitwarden.com",
  "lock_timeout": 3600,
  "sync_interval": 3600,
  "pinentry": "pinentry",
  "client_cert_path": null
}

@TheNilesh
Copy link
Author

I'm closing this issue with the solution:

 $ rbw config set base_url "https://vault.bitwarden.com/"

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

2 participants