Expo Login Failed with 400 Error

I am behind a proxy server and expo login fails. I have correctly configured my proxy servers, npm works but expo does not. I have removed the expo-cli and reinstalled it about 4 times. I have removed node and reinstalled it yet, the problem persists.

zappy@Zap:~/Workspace/built/mobapp$ expo login

Fetching the user profile failed
Request failed with status code 400
Request failed with status code 400
Error: Request failed with status code 400
    at createError (/home/zappy/.nvm/versions/node/v16.13.0/lib/node_modules/expo-cli/node_modules/axios/lib/core/createError.js:16:15)
    at settle (/home/zappy/.nvm/versions/node/v16.13.0/lib/node_modules/expo-cli/node_modules/axios/lib/core/settle.js:17:12)
    at IncomingMessage.handleStreamEnd (/home/zappy/.nvm/versions/node/v16.13.0/lib/node_modules/expo-cli/node_modules/axios/lib/adapters/http.js:260:11)
    at IncomingMessage.emit (node:events:402:35)
    at endReadableNT (node:internal/streams/readable:1343:12)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)

Please help me.

Hey @noelzappy, are you able to share your proxy configuration as well as what proxy manager you are using?


I have a VPN connection on my phone and needed to share my internet from the phone, so I installed the Every Proxy app and got a proxy with which I made all the necessary configurations on my Ubuntu. Any other connection is successful through the proxy, git npm apt, wget, browser, but only Expo fails.


Strange. If I test it, expo does seem to make use of those environment variables.

I do not have a proxy running on localhost:8080. If I set http_proxy and https_proxy as if I do, and then try to run expo whoami I get a Connection refused error, indicating that expo is trying to connect to the nonexistent proxy:

$ http_proxy=http://localhost:8080/ https_proxy=http://localhost:8080/ expo whoami
Error: connect ECONNREFUSED
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1138:16)