Skip to content

arduino stuck on splash screen if proxy environment variable is configured #2319

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

Open
3 tasks done
mujungh opened this issue Dec 28, 2023 · 4 comments
Open
3 tasks done
Labels
type: imperfection Perceived defect in any part of project

Comments

@mujungh
Copy link

mujungh commented Dec 28, 2023

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

  1. Open a terminal (e.g., Windows PowerShell) in the Arduino IDE installation folder.

  2. 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)

  3. Invoke Arduino IDE

    • Linux:
      ./arduino-ide
      
    • macOS:
      "/Applications/Arduino IDE.app/Contents/MacOS/Arduino IDE"
      
    • Windows:
      & ".\Arduino IDE"
      

🐛 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

Workaround

Define an environment variable named no_proxy with the value localhost.

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details
@mujungh mujungh added the type: imperfection Perceived defect in any part of project label Dec 28, 2023
@tps800

This comment has been minimized.

@tps800

This comment was marked as off-topic.

@DRSDavidSoft
Copy link

DRSDavidSoft commented 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

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

4 participants