I am doing a POC of Sentry for capturing errors in a new Vue.js application. When I run the application in Chrome on my Windows machine, I am able to get errors from the application to show up in the online Sentry service. But when I run “sentry-cli login” I get “Invalid token: API request failed”. I have tried setting all of SENTRY_DSN, SENTRY_LOG_LEVEL=info, SENTRY_ORG, SENTRY_PROJECT, and http_proxy but it still fails.
My organization has a network proxy. I suspect that the the proxy is being used automatically when the application uses the SDK to send an error to sentry.io – but that the proxy is not being applied correctly by sentry-cli. I set the proxy via “http_proxy=<domain name>:3128” but that didn’t help.
I set the log level to “info” but the output does not show the sentry-cli http requests and responses.
I do not have a .sentryclirc file.
I am stuck. Some questions:
Am I setting the http_proxy environment variable correctly? Is the port supported in the way that I entered it?
You may need to use a full URL for the value of http_proxy such as http_proxy=http://<domain name>:3128/. If it is an HTTPS proxy, you may need to disable SSL checks (not recommended) if the issuer CA is not installed system-wide. You can find more settings over at https://docs.sentry.io/cli/configuration/#configuration-file (note that some of these require the .sentryclirc config file.
Finally, SENTRY_LOG_LEVEL=debug should give you all the details around HTTP requests.
I have spent a good hour trying to respond but your system rejects my reply, whether sent via email or via this UI. It keeps saying that “new users are not allowed more than 2 links”. I tried to manually edit out all my links but it keeps saying that. So I cannot send you the comprehensive response that I created.
I believe:
My corporate proxy is blocking requests.
Turning on debug does not show any useful information.
My INI file may not have the correct format. The max retries value specified in the file is not being picked up by the sentry-cli application.