Unable to `doppler login` through the command line

Getting the error:
Doppler Exception: runtime error: slice bounds out of range [308:282]
when running doppler login.

Machine: WSL/Ubuntu
Doppler Version: 3.20

Step to reproduce:

  • Execute doppler login.
  • Go through the UI flow succesfully.
  • When back on the command line, error is Doppler Exception: runtime error: slice bounds out of range [308:282]

EDIT:
Downgraded to version 3.15.0 with sudo apt-get install doppler=3.15.0 and its working now. Something is broken in a newer minor version.

Hi Jay, thanks for reporting this error. This is the first time we’re seeing this. I’m currently unable to reproduce on Ubuntu, but I’m going to work on setting up a WSL environment later today to test. My guess is that the issue is in some way related to running on WSL.

Could you repeat the process with the --debug flag (i.e. doppler login --debug) and post the full terminal output?

Hey Thomas. Unfortunately its not my machine (its one of our engineers). I’ll loop him in and get you the output asap.

Hi, I am the one that was having issues. Here is the print log. The same commands work on older versions.

$ doppler login
Warning: You have already logged in.

Would you like to scope your new login to the current directory, or overwrite the existing global login?
? Select an option: Scope login to current directory ([current directory])
? Open the authorization page in your browser? Yes
Unable to launch a browser
Complete authorization at https://dashboard.doppler.com/workplace/auth/cli
Your auth code is:
date_maryland_viper_quail_phosphorus

Waiting...
Doppler Exception: runtime error: slice bounds out of range [308:282]
$ doppler login --debug
Debug: Using config file /home/nathan/.doppler/.doppler.yaml
Debug: Reading config file
Warning: You have already logged in.

Would you like to scope your new login to the current directory, or overwrite the existing global login?
? Select an option: Scope login to current directory ([current directory])
Debug: Performing HTTP GET to https://api.doppler.com/v3/auth/cli/generate?arch=64-bit&hostname=[desktop-ID]&os=linux&version=v3.20.1
Debug: Request ID 7aab993b-fed7-4c31-be80-a9bfd112a67d
? Open the authorization page in your browser? Yes
Unable to launch a browser
Doppler Error: exec: "xdg-open": executable file not found in $PATH
Complete authorization at https://dashboard.doppler.com/workplace/auth/cli
Your auth code is:
seal_cleveland_nail_connecticut_femtometer

Waiting...
Debug: Performing HTTP POST to https://api.doppler.com/v3/auth/cli/authorize
Debug: Request ID b106752b-9644-4f18-bcc3-cb0625abca41
Debug: Performing HTTP POST to https://api.doppler.com/v3/auth/cli/authorize
Debug: Request ID 21202243-5478-4d84-8830-ae19c197d36c
Debug: Performing HTTP POST to https://api.doppler.com/v3/auth/cli/authorize
Debug: Request ID e604a57b-35aa-4f32-ba21-7d701b059b3f
Debug: Performing HTTP POST to https://api.doppler.com/v3/auth/cli/authorize
Debug: Request ID b8208eea-4e23-43fd-acfe-c5b3bb53c2f4
Debug: Performing HTTP POST to https://api.doppler.com/v3/auth/cli/authorize
Debug: Request ID 167c93e8-15be-488e-bd15-a722d1e30376
Debug: Performing HTTP POST to https://api.doppler.com/v3/auth/cli/authorize
Debug: Request ID ef48d840-38a9-45c6-b199-61398d018ecc
Debug: Saving token to system keyring
Doppler Exception: runtime error: slice bounds out of range [308:282]
$ doppler --version
v3.20.1

Thanks for sharing those debug logs. Would you be able to test with CLI versions 3.16.0 and 3.19.0? That would help narrow down my search, as those releases include changes that I suspect could be causing this. Once we’ve narrowed down the changes to a specific release it should be much easier to identify the problematic change.

It appears it may be related to the CLI saving to the system keyring. This feature was added in CLI v3.16.0. I’m going to do some more testing and will follow up.

I’m able to reproduce this bug using Ubuntu 20.04 on WSL. Ubuntu 18.04 on WSL is not impacted by this. I’ve also confirmed that this is related to our use of the system keyring and have created an issue upstream with the keyring package we use. I’ll update this thread as we make progress.

Doppler CLI v3.20.2 was just released and contains a fix for this issue. You can install the latest version via doppler update. Please let me know if you run into any issues with this new version.

Getting the error:
Unable to fetch auth token Doppler Error: Your account does not have access..

Machine: m1 mac
Doppler Version: 3.31.1

Step to reproduce:

  • Execute doppler login.
  • Go through the UI flow succesfully.
  • When back on the command line, error is Unable to fetch auth token Doppler Error: Your account does not have access.

I’m having a similar issue when running doppler login.
I get the following:

Waiting...
Unable to fetch auth token
Doppler Error: Post "https://api.doppler.com/v3/auth/cli/authorize": dial tcp: lookup api.doppler.com on 192.xxx.xx.x:xx: no such host

Machine: mackbook pro 2020 i7
Doppler Version: 3.54.0

From: networking - dial tcp: lookup xxx.xxx.xxx.xxx: no such host - Stack Overflow

Editing the DNS nameserver in /etc/resolv.conf file helped me.

Change your existing nameserver to google nameserver i.e., x.x.x.x to 8.8.8.8

Comment your nameserver IP and add something like this :

#nameserver x.x.x.x
nameserver 8.8.8.8  

should work.

Hi @mendes-develop!

Welcome to the Doppler Community!

Unfortunately, this is a fairly common problem people run into occasionally that usually stems from unreliable ISP nameservers. As per your solution, we always recommend our users to switch their routers and machines over to using either Google Public DNS (8.8.8.8, 8.8.4.4) or Cloudflare’s public DNS (1.1.1.1, 1.0.0.1). Either of those two are generally much more reliable and you’ll have fewer issues!

For anyone wondering if this is their problem in the future, our CLI also has a --enable-dns-resolver flag that will bypass the OS DNS resolver. If using that gets things working again, then the issue is definitely a DNS problem.

Regards,
-Joel