Description
Describe the problem
Users may access the Internet via a proxy server.
There is a common convention of providing proxy configuration to applications via the http_proxy
and https_proxy
environment variables:
https://about.gitlab.com/blog/2021/01/27/we-need-to-talk-no-proxy/
So some users who access the Internet through a proxy server will have these environment variables set.
Arduino IDE communicates with some of its components via an internal TCP/IP port in your computer on "localhost".
🐛 If the http_proxy
and/or https_proxy
environment variables are set, Arduino IDE will attempt to use the proxy for the localhost
communication, which is likely to fail. This will cause the IDE to hang on the startup screen.
To reproduce
-
Open a terminal (e.g., Windows PowerShell) in the Arduino IDE installation folder.
-
Define an environment variable named
http_proxy
with the configuration for your proxy server:- Linux/macOS:
export http_proxy="http://<username>:<password>@<proxy address>:<proxy port>/"
- Windows:
$Env:http_proxy = "http://<username>:<password>@<proxy address>:<proxy port>/"
(where
<username>
,<password>
,<proxy address>
, and<proxy port>
are placeholders for your proxy server configuration) - Linux/macOS:
-
Invoke Arduino IDE
- Linux:
./arduino-ide
- macOS:
"/Applications/Arduino IDE.app/Contents/MacOS/Arduino IDE"
- Windows:
& ".\Arduino IDE"
- Linux:
🐛 Startup hangs, with a message of this form shown in the terminal logs:
2024-12-13T12:48:00.596Z root ERROR E Failed to connect to localhost:50653 through proxy 37.19.211.248:10001 with status 403
2024-12-13T12:48:00.597Z root ERROR Uncaught Exception: Error: 14 UNAVAILABLE: No connection established
2024-12-13T12:48:00.597Z root ERROR Error: 14 UNAVAILABLE: No connection established
at t.callErrorFromStatus (C:\arduino-tools\261-2.3.4\resources\app\lib\backend\main.js:2:921712)
at Object.onReceiveStatus (C:\arduino-tools\261-2.3.4\resources\app\lib\backend\main.js:2:947033)
at Object.onReceiveStatus (C:\arduino-tools\261-2.3.4\resources\app\lib\backend\main.js:2:942911)
at Object.onReceiveStatus (C:\arduino-tools\261-2.3.4\resources\app\lib\backend\main.js:2:942356)
at C:\arduino-tools\261-2.3.4\resources\app\lib\backend\main.js:2:1028497
at process.processTicksAndRejections (node:internal/process/task_queues:77:11)
for call at
at s.makeUnaryRequest (C:\arduino-tools\261-2.3.4\resources\app\lib\backend\main.js:2:946574)
at s.create (C:\arduino-tools\261-2.3.4\resources\app\lib\backend\main.js:2:1013389)
at instance (C:\arduino-tools\261-2.3.4\resources\app\lib\backend\main.js:2:776656)
at new Promise (<anonymous>)
at v.createClient (C:\arduino-tools\261-2.3.4\resources\app\lib\backend\main.js:2:776633)
at v.create (C:\arduino-tools\261-2.3.4\resources\app\lib\backend\main.js:2:775541)
at C:\arduino-tools\261-2.3.4\resources\app\lib\backend\main.js:2:774437
at C:\arduino-tools\261-2.3.4\resources\app\lib\backend\main.js:2:1221089
at i.invoke (C:\arduino-tools\261-2.3.4\resources\app\lib\backend\main.js:2:1221179)
at s.fire (C:\arduino-tools\261-2.3.4\resources\app\lib\backend\main.js:2:1222982)
Expected behavior
Arduino IDE does not use the http_proxy
or https_proxy
environment variable configuration for localhost
communication.
- OR -
Arduino IDE clearly communicates the problem to the user when localhost
communication fails due to the http_proxy
or https_proxy
environment variable configuration being used for this communication.
Arduino IDE version
Original report
2.2.1
Last verified with
2.3.4
Operating system
Windows
Operating system version
- 10
- 11
Additional context
Additional reports
- IDE doesn't start when proxy configuration is required to access network #1438
- https://forum.arduino.cc/t/arduino-2-0-wont-start/1038193
- https://forum.arduino.cc/t/ide-hangs-on-startup-failed-to-connect-to-proxy/1300985
Workaround
Define an environment variable named no_proxy
with the value localhost
.
Issue checklist
- I searched for previous reports inI verified the problem still occurs when using the latestMy report contains all necessary details
Activity
tps800 commentedon Jan 2, 2024
tps800 commentedon Jan 2, 2024
DRSDavidSoft commentedon Oct 28, 2024
I believe that this is a serious problem when the console clearly says there is an error, meaning there is no hope of the application loading up at all, which confuses the user at being stuck on the loading screen forever.
I am curious about the series of decisions that was made that resulted in this situation. The problem arises when the splash screen is displayed, and it only ever goes away when the IDE reaches a success state, while it should also check for startup errors.
A part of the poor user experience is that the console is not displayed by default. In order to address this, there could be a small link to display the startup logs, when clicked upon.
Lastly, I am interested to find out whether this problem is part of the Theia IDE in general, or only part of how the Arduino IDE's architecture is designed.
PaulStoffregen commentedon Oct 28, 2024