IDE hangs on startup: "connectex: A connection attempt failed because the connected party did not properly respond ..."

Installed Arduino on my work computer, Windows 10.
Firewalls probably preventing the download of some files

PS C:\Program Files\Arduino IDE> & ".\Arduino IDE"
PS C:\Program Files\Arduino IDE>
Arduino IDE 2.3.2
Checking for frontend application configuration customizations. Module path: C:\Program Files\Arduino IDE\resources\app\lib\backend\electron-main.js, destination 'package.json': C:\Program Files\Arduino IDE\resources\app\package.json
Setting 'theia.frontend.config.appVersion' application configuration value to: "2.3.2" (type of string)
Setting 'theia.frontend.config.cliVersion' application configuration value to: "0.35.3" (type of string)
Setting 'theia.frontend.config.buildDate' application configuration value to: "2024-02-20T10:04:35.814Z" (type of string)
Frontend application configuration after modifications: {"applicationName":"Arduino IDE","defaultTheme":{"light":"arduino-theme","dark":"arduino-theme-dark"},"defaultIconTheme":"none","electron":{"windowOptions":{}},"defaultLocale":"","validatePreferencesSchema":false,"preferences":{"window.title":"${rootName}${activeEditorShort}${appName}","files.autoSave":"afterDelay","editor.minimap.enabled":false,"editor.tabSize":2,"editor.scrollBeyondLastLine":false,"editor.quickSuggestions":{"other":false,"comments":false,"strings":false},"editor.maxTokenizationLineLength":500,"editor.bracketPairColorization.enabled":false,"breadcrumbs.enabled":false,"workbench.tree.renderIndentGuides":"none","explorer.compactFolders":false},"appVersion":"2.3.2","cliVersion":"0.35.3","buildDate":"2024-02-20T10:04:35.814Z"}
Starting backend process. PID: 24920
Using browser-only version of superagent in non-browser environment
Configuration directory URI: 'file:///c%3A/Users/rauhkvi/.arduinoIDE'
Configuring to accept webviews on '^.+\.webview\..+$' hostname.
2024-05-02T18:49:08.630Z root INFO Backend Object.initialize: 4.0 ms [Finished 0.551 s after backend start]
2024-05-02T18:49:08.631Z root INFO Backend Object.configure: 3.1 ms [Finished 0.551 s after backend start]
2024-05-02T18:49:08.631Z root INFO Backend s.onStart: 1.6 ms [Finished 0.551 s after backend start]
2024-05-02T18:49:08.631Z root INFO Backend s.configure: 0.3 ms [Finished 0.573 s after backend start]
2024-05-02T18:49:08.632Z root INFO Backend d.onStart: 0.2 ms [Finished 0.573 s after backend start]
2024-05-02T18:49:08.632Z root INFO Backend d.configure: 0.1 ms [Finished 0.573 s after backend start]
2024-05-02T18:49:08.633Z root INFO Backend d.initialize: 22.3 ms [Finished 0.574 s after backend start]
2024-05-02T18:49:08.633Z root INFO Backend c.onStart: 0.2 ms [Finished 0.574 s after backend start]
2024-05-02T18:49:08.634Z root INFO Backend a.configure: 1.3 ms [Finished 0.575 s after backend start]
2024-05-02T18:49:08.635Z config INFO >>> Initializing CLI configuration...
2024-05-02T18:49:08.635Z root INFO Backend c.initialize: 0.5 ms [Finished 0.575 s after backend start]
2024-05-02T18:49:08.636Z root INFO Backend R.onStart: 0.6 ms [Finished 0.576 s after backend start]
2024-05-02T18:49:08.636Z config INFO Loading CLI configuration from c:\Users\rauhkvi\.arduinoIDE\arduino-cli.yaml...
2024-05-02T18:49:08.637Z daemon INFO Starting daemon from C:\Program Files\Arduino IDE\resources\app\lib\backend\resources\arduino-cli.exe...
2024-05-02T18:49:08.637Z root INFO Backend a.initialize: 0.3 ms [Finished 0.577 s after backend start]
2024-05-02T18:49:08.637Z root INFO Backend w.onStart: 1.1 ms [Finished 0.577 s after backend start]
2024-05-02T18:49:08.637Z root INFO Backend r.configure: 1.7 ms [Finished 0.577 s after backend start]
2024-05-02T18:49:08.637Z discovery-log INFO start
2024-05-02T18:49:08.637Z discovery-log INFO start new deferred
2024-05-02T18:49:08.637Z root INFO Backend d.initialize: 0.4 ms [Finished 0.578 s after backend start]
2024-05-02T18:49:08.637Z root INFO Backend y.onStart: 2.1 ms [Finished 0.580 s after backend start]
2024-05-02T18:49:08.637Z root INFO Backend r.configure: 1.8 ms [Finished 0.580 s after backend start]
2024-05-02T18:49:08.637Z root INFO Backend a.onStart: 0.5 ms [Finished 0.581 s after backend start]
2024-05-02T18:49:08.637Z root INFO Backend h.configure: 0.4 ms [Finished 0.581 s after backend start]
2024-05-02T18:49:08.637Z root INFO Backend s.configure: 0.1 ms [Finished 0.581 s after backend start]
2024-05-02T18:49:08.637Z root INFO Backend l.configure: 0.1 ms [Finished 0.581 s after backend start]
2024-05-02T18:49:08.640Z root INFO Theia app listening on http://127.0.0.1:54053.
2024-05-02T18:49:08.640Z root INFO Finished starting backend application: 2.9 ms [Finished 0.584 s after backend start]
2024-05-02T18:49:08.646Z root WARN The local plugin referenced by local-dir:/c%3A/Users/rauhkvi/.arduinoIDE/extensions does not exist.
2024-05-02T18:49:08.646Z root WARN The local plugin referenced by local-dir:/c%3A/Users/rauhkvi/.arduinoIDE/plugins does not exist.
2024-05-02T18:49:08.646Z root WARN The local plugin referenced by local-dir:C:\Users\rauhkvi\.arduinoIDE\plugins does not exist.
2024-05-02T18:49:08.660Z config INFO Loaded CLI configuration: {"board_manager":{"additional_urls":[]},"build_cache":{"compilations_before_purge":10,"ttl":"720h0m0s"},"daemon":{"port":"50051"},"directories":{"data":"C:\\Users\\rauhkvi\\AppData\\Local\\Arduino15","downloads":"C:\\Users\\rauhkvi\\AppData\\Local\\Arduino15\\staging","user":"C:\\Users\\rauhkvi\\Documents\\Arduino"},"library":{"enable_unsafe_install":false},"logging":{"file":"","format":"text","level":"info"},"metrics":{"addr":":9090","enabled":true},"output":{"no_color":false},"sketch":{"always_export_binaries":false},"updater":{"enable_notification":true}}
2024-05-02T18:49:08.660Z config INFO 'directories.data' and 'directories.user' are set in the CLI configuration model.
2024-05-02T18:49:08.660Z config INFO Loaded the CLI configuration.
2024-05-02T18:49:08.716Z config INFO Mapped the CLI configuration: {"dataDirUri":"file:///c%3A/Users/rauhkvi/AppData/Local/Arduino15","sketchDirUri":"file:///c%3A/Users/rauhkvi/Documents/Arduino","additionalUrls":[],"network":"none","locale":"en"}
2024-05-02T18:49:08.716Z config INFO Validating the CLI configuration...
2024-05-02T18:49:08.717Z config INFO The CLI config is valid.
2024-05-02T18:49:08.717Z config INFO <<< Initialized the CLI configuration.
2024-05-02T18:49:08.738Z root INFO Resolve plugins list: 102.1 ms [Finished 0.682 s after backend start]
2024-05-02T18:49:08.746Z daemon INFO time="2024-05-02T14:49:08-04:00" level=info msg="Using config file: c:\\Users\\rauhkvi\\.arduinoIDE\\arduino-cli.yaml"
time="2024-05-02T14:49:08-04:00" level=info msg="arduino-cli.exe version 0.35.3"
2024-05-02T18:49:08.746Z daemon INFO time="2024-05-02T14:49:08-04:00" level=info msg="Executing `arduino-cli daemon`"
2024-05-02T18:49:08.755Z daemon INFO Daemon is now listening on 127.0.0.1:54055
{"IP":"127.0.0.1","Port":"54055"}
2024-05-02T18:49:08.755Z daemon INFO Daemon is running.
2024-05-02T18:49:08.775Z daemon INFO time="2024-05-02T14:49:08-04:00" level=info msg="Updating libraries index"
2024-05-02T18:49:08.781Z daemon INFO time="2024-05-02T14:49:08-04:00" level=info msg="Starting download" url="https://downloads.arduino.cc/libraries/library_index.tar.bz2"
Opening channel for service path '/services/electron-window'.
Opening channel for service path '/services/ide-updater'.
2024-05-02T18:49:10.965Z root WARN Frontend a.configure took longer than the expected maximum 100 milliseconds: 303.7 ms [Finished 2.179 s after frontend start]
2024-05-02T18:49:10.965Z root WARN A command editor.action.toggleStickyScroll is already registered.
2024-05-02T18:49:11.263Z root WARN Frontend D.onStart took longer than the expected maximum 100 milliseconds: 197.5 ms [Finished 2.523 s after frontend start]
2024-05-02T18:49:12.100Z root INFO Deploy plugins list: 102.1 ms [Finished 4.044 s after backend start]
2024-05-02T18:49:50.967Z root ERROR Detected an error response during the gRPC core client initialization: code: 3, message: Error downloading index 'https://downloads.arduino.cc/libraries/library_index.tar.bz2': Get "https://downloads.arduino.cc/libraries/library_index.tar.bz2": dial tcp 104.18.10.21:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
2024-05-02T18:49:50.968Z root ERROR Detected an error response during the gRPC core client initialization: code: 9, message: Loading index file: loading json index file C:\Users\rauhkvi\AppData\Local\Arduino15\package_index.json: open C:\Users\rauhkvi\AppData\Local\Arduino15\package_index.json: The system cannot find the file specified.
2024-05-02T18:49:50.969Z root ERROR Detected an error response during the gRPC core client initialization: code: 9, message: Error loading hardware platform: discovery builtin:serial-discovery not found
2024-05-02T18:49:50.970Z root ERROR Detected an error response during the gRPC core client initialization: code: 9, message: Error loading hardware platform: discovery builtin:mdns-discovery not found
2024-05-02T18:49:50.970Z root ERROR Detected an error response during the gRPC core client initialization: code: 9, message: Loading index file: reading library_index.json: open C:\Users\rauhkvi\AppData\Local\Arduino15\library_index.json: The system cannot find the file specified.
2024-05-02T18:49:50.980Z root ERROR The primary packages indexes are missing. Running indexes update before initializing the core gRPC client The index of the cores and libraries must be updated before initializing the core gRPC client.
The following problems were detected during the gRPC client initialization:
[platform-index] - code: 9, message: Loading index file: loading json index file C:\Users\rauhkvi\AppData\Local\Arduino15\package_index.json: open C:\Users\rauhkvi\AppData\Local\Arduino15\package_index.json: The system cannot find the file specified.
[platform-index] - code: 9, message: Error loading hardware platform: discovery builtin:serial-discovery not found
[platform-index] - code: 9, message: Error loading hardware platform: discovery builtin:mdns-discovery not found
[library-index] - code: 9, message: Loading index file: reading library_index.json: open C:\Users\rauhkvi\AppData\Local\Arduino15\library_index.json: The system cannot find the file specified.

2024-05-02T18:49:50.981Z daemon INFO time="2024-05-02T14:49:50-04:00" level=info msg="Loading hardware from: C:\\Users\\rauhkvi\\AppData\\Local\\Arduino15\\packages"
time="2024-05-02T14:49:50-04:00" level=info msg="Loading libraries index file" index="C:\\Users\\rauhkvi\\AppData\\Local\\Arduino15\\library_index.json"
time="2024-05-02T14:49:50-04:00" level=info msg="Adding libraries dir" dir="C:\\Users\\rauhkvi\\AppData\\Local\\Arduino15\\libraries" location=ide
time="2024-05-02T14:49:50-04:00" level=info msg="Adding libraries dir" dir="C:\\Users\\rauhkvi\\Documents\\Arduino\\libraries" location=user
2024-05-02T18:49:50.981Z daemon INFO time="2024-05-02T14:49:50-04:00" level=info msg="Updating libraries index"
time="2024-05-02T14:49:50-04:00" level=info msg="Updating index" url="https://downloads.arduino.cc/packages/package_index.tar.bz2"
2024-05-02T18:49:50.983Z daemon INFO time="2024-05-02T14:49:50-04:00" level=info msg="Starting download" url="https://downloads.arduino.cc/packages/package_index.tar.bz2"
2024-05-02T18:49:50.985Z root INFO core-client-provider [platform-index] Downloading index: package_index.tar.bz2

2024-05-02T18:49:50.986Z root INFO core-client-provider [library-index] Downloading index: library_index.tar.bz2

2024-05-02T18:49:50.986Z daemon INFO time="2024-05-02T14:49:50-04:00" level=info msg="Starting download" url="https://downloads.arduino.cc/libraries/library_index.tar.bz2"
2024-05-02T18:50:33.004Z root ERROR Failed to update platform, library indexes. Error: 13 INTERNAL: Some indexes could not be updated.
    at t.callErrorFromStatus (C:\Program Files\Arduino IDE\resources\app\lib\backend\main.js:2:763461)
    at Object.onReceiveStatus (C:\Program Files\Arduino IDE\resources\app\lib\backend\main.js:2:791078)
    at Object.onReceiveStatus (C:\Program Files\Arduino IDE\resources\app\lib\backend\main.js:2:784102)
    at C:\Program Files\Arduino IDE\resources\app\lib\backend\main.js:2:870224
    at process.processTicksAndRejections (node:internal/process/task_queues:77:11)
for call at
    at s.makeServerStreamRequest (C:\Program Files\Arduino IDE\resources\app\lib\backend\main.js:2:790845)
    at s.updateIndex (C:\Program Files\Arduino IDE\resources\app\lib\backend\main.js:2:855121)
    at C:\Program Files\Arduino IDE\resources\app\lib\backend\main.js:2:623733
    at C:\Program Files\Arduino IDE\resources\app\lib\backend\main.js:2:624081
    at new Promise (<anonymous>)
    at E.doUpdateIndex (C:\Program Files\Arduino IDE\resources\app\lib\backend\main.js:2:624060)
    at E.updatePlatformIndex (C:\Program Files\Arduino IDE\resources\app\lib\backend\main.js:2:623705)
    at E.updateIndex (C:\Program Files\Arduino IDE\resources\app\lib\backend\main.js:2:623073)
    at E.initInstanceWithFallback (C:\Program Files\Arduino IDE\resources\app\lib\backend\main.js:2:621317)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2024-05-02T18:50:33.008Z daemon INFO time="2024-05-02T14:50:33-04:00" level=info msg="Updating libraries index"
2024-05-02T18:50:33.013Z daemon INFO time="2024-05-02T14:50:33-04:00" level=info msg="Starting download" url="https://downloads.arduino.cc/libraries/library_index.tar.bz2"
2024-05-02T18:51:15.366Z root ERROR Detected an error response during the gRPC core client initialization: code: 3, message: Error downloading index 'https://downloads.arduino.cc/libraries/library_index.tar.bz2': Get "https://downloads.arduino.cc/libraries/library_index.tar.bz2": dial tcp 104.18.10.21:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
2024-05-02T18:51:15.366Z root ERROR Detected an error response during the gRPC core client initialization: code: 9, message: Loading index file: loading json index file C:\Users\rauhkvi\AppData\Local\Arduino15\package_index.json: open C:\Users\rauhkvi\AppData\Local\Arduino15\package_index.json: The system cannot find the file specified.
2024-05-02T18:51:15.367Z root ERROR Detected an error response during the gRPC core client initialization: code: 9, message: Error loading hardware platform: discovery builtin:serial-discovery not found
2024-05-02T18:51:15.367Z root ERROR Detected an error response during the gRPC core client initialization: code: 9, message: Error loading hardware platform: discovery builtin:mdns-discovery not found
2024-05-02T18:51:15.367Z root ERROR Detected an error response during the gRPC core client initialization: code: 9, message: Loading index file: reading library_index.json: open C:\Users\rauhkvi\AppData\Local\Arduino15\library_index.json: The system cannot find the file specified.
2024-05-02T18:51:15.367Z daemon INFO time="2024-05-02T14:51:15-04:00" level=info msg="Loading hardware from: C:\\Users\\rauhkvi\\AppData\\Local\\Arduino15\\packages"
time="2024-05-02T14:51:15-04:00" level=info msg="Loading libraries index file" index="C:\\Users\\rauhkvi\\AppData\\Local\\Arduino15\\library_index.json"
time="2024-05-02T14:51:15-04:00" level=info msg="Adding libraries dir" dir="C:\\Users\\rauhkvi\\AppData\\Local\\Arduino15\\libraries" location=ide
time="2024-05-02T14:51:15-04:00" level=info msg="Adding libraries dir" dir="C:\\Users\\rauhkvi\\Documents\\Arduino\\libraries" location=user
2024-05-02T18:51:15.368Z root ERROR Uncaught Exception:  Error: The index of the cores and libraries must be updated before initializing the core gRPC client.
The following problems were detected during the gRPC client initialization:
[platform-index] - code: 9, message: Loading index file: loading json index file C:\Users\rauhkvi\AppData\Local\Arduino15\package_index.json: open C:\Users\rauhkvi\AppData\Local\Arduino15\package_index.json: The system cannot find the file specified.
[platform-index] - code: 9, message: Error loading hardware platform: discovery builtin:serial-discovery not found
[platform-index] - code: 9, message: Error loading hardware platform: discovery builtin:mdns-discovery not found
[library-index] - code: 9, message: Loading index file: reading library_index.json: open C:\Users\rauhkvi\AppData\Local\Arduino15\library_index.json: The system cannot find the file specified.

2024-05-02T18:51:15.368Z root ERROR Error: The index of the cores and libraries must be updated before initializing the core gRPC client.
The following problems were detected during the gRPC client initialization:
[platform-index] - code: 9, message: Loading index file: loading json index file C:\Users\rauhkvi\AppData\Local\Arduino15\package_index.json: open C:\Users\rauhkvi\AppData\Local\Arduino15\package_index.json: The system cannot find the file specified.
[platform-index] - code: 9, message: Error loading hardware platform: discovery builtin:serial-discovery not found
[platform-index] - code: 9, message: Error loading hardware platform: discovery builtin:mdns-discovery not found
[library-index] - code: 9, message: Loading index file: reading library_index.json: open C:\Users\rauhkvi\AppData\Local\Arduino15\library_index.json: The system cannot find the file specified.

    at C:\Program Files\Arduino IDE\resources\app\lib\backend\main.js:2:622877
    at E.evaluateErrorStatus (C:\Program Files\Arduino IDE\resources\app\lib\backend\main.js:2:622893)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async a.<anonymous> (C:\Program Files\Arduino IDE\resources\app\lib\backend\main.js:2:622563)

Hi @kevin12345678.

On the first run after a fresh installation, Arduino IDE downloads some additional essential components from the Internet and installs them. If it can't install those components then the startup fails. So the computer must have access to the Internet on the first startup.

The errors indicate Arduino IDE is not able to access the Internet. If it is not already, please connect your computer to the Internet, close the Arduino IDE window, then start Arduino IDE again. This time it should start up successfully.

After that first run, an Internet connection is not required. However, there are some supplemental features such as "Library Manager" that have an inherent dependency on the Internet. Those features will not be usable while your computer is offline. But the essential functionality of editing, compiling, and uploading sketches will be available even without an Internet connection.

My computer is connected to the internet, but the companies firewalls block most applications from downloading or accessing the internet

You can contact your IT department and request the firewall be adjusted to allow Arduino IDE to access the Internet.


As a workaround, you could temporarily connect your computer to the Internet via an alternative network (e.g., mobile hotspot, take your laptop home and use the network there). Once Arduino IDE has been able to make the installations required on first run, you can then use it on the corporate network (keeping in mind that the Internet-dependent features won't be usable). Of course you should only do this if it is allowed by the company's security policies.


An alternative solution would be to use Arduino IDE 1.x, the installation of which is self contained, including all the tools required to use any of the boards of the "Arduino AVR Boards" platform (e.g., UNO R3, Mega 2560, Leonardo). You can also install support for other boards in Arduino IDE 1.x via the Arduino IDE Boards Manager, but that requires the IDE to have access to the Internet. The download links for Arduino IDE 1.x are listed here:

https://www.arduino.cc/en/software#legacy-ide-18x

Specific URLs will be needed for IT to grant access to. Are the github pages what Arduino IDE needs access to, to download the needed packages?
i.e.

No, that is only where the codebases are hosted. By default, the URLs that must be accessed are all under Arduino's download server at downloads.arduino.cc.

Built-in Tools and Boards Platforms

The specific URLs of the tools Arduino IDE must install on startup are defined in an index file here:

https://downloads.arduino.cc/packages/package_index.json

This index is also used by the Arduino IDE Boards Manager. The URLs of the files that are downloaded when you install a platform via Boards Manager are listed in that index. Arduino IDE automatically attempts to install the foundational "Arduino AVR Boards" platform on the first run, downloading those files from the URLs specified by the index.

Boards Manager also supports installing 3rd party boards platforms. The user must add the URL of the 3rd party's package index to the "Additional Boards Manager URLs" field in the IDE preferences. So if you want to install such 3rd party boards platforms, the IDE must also have access to the URL of that package index as well as to the URLs of the files specified in the package index.

Library Manager

The Arduino IDE Library Manager also depends on this index:

https://downloads.arduino.cc/libraries/library_index.json

The URLs of the files that are downloaded when a library is installed (including the fundamental "built-in" libraries Arduino IDE automatically tries to install on the first run) are listed in that index file.

Auto-Update

Arduino IDE automatically checks to see if a newer version is available. It uses this URL:

https://downloads.arduino.cc/arduino-ide/stable.yml

If a newer version is available, it will display a dialog offering the update. This dialog includes a changelog. The changelog filename is take from this URL:

https://downloads.arduino.cc/arduino-ide/changelog/latest.txt

Then downloaded from this URL:

https://downloads.arduino.cc/arduino-ide/changelog/<changelog filename>

(where <changelog filename> is the filename from https://downloads.arduino.cc/arduino-ide/changelog/latest.txt)

Firmware Updater

Arduino IDE has a "Firmware Updater" feature, which is used to update the firmware on the supplemental modules present on some Arduino boards. Arduino IDE determines whether newer versions of the firmwares are available using this index:

https://downloads.arduino.cc/arduino-fwuploader/boards/plugin_firmware_index.json

It then downloads the firmware from the URLs in that index.

Was able to use proxy settings on Arduino IDE 1 to get it working. Is it possible to set proxy settings in Arduino IDE 2.0 from launch? Before it tries to download the support packages?

Proxy info can be added as described here: Arduino 2.0 won't start

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.