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

IDE 2.2.1 stuck after launching, the Arduino logo keep flashing, unable to proceed to next step.

I am using WIN10 x64 bit.

power window screen capture as below.

.\Arduino : The term '.\Arduino' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1

  • .\Arduino IDE
  •   + CategoryInfo          : ObjectNotFound: (.\Arduino:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException

I have moved this to IDE 2.x category.... IDE 1.x isn't related to IDE 2.x.

@ptillisch is the expert on Arduino IDE related problems.

Hi @pcwedwin11. You had the right idea to start Arduino IDE from the PowerShell terminal. Your PowerShell command was not correctly formed so you got an error when you ran it instead of the intended result of starting the Arduino IDE application. The command must look exactly like this:

& ".\Arduino IDE"

I'll provide the full instructions for starting Arduino IDE from the PowerShell terminal and sharing the logs that are produced:

  1. Close all Arduino IDE windows if the IDE is already running.
  2. Start Windows "File Explorer".
  3. Open the Arduino IDE installation folder.
    The default installation location is at one of the following paths:
    • C:\Program Files\Arduino IDE
      
    • C:\Users\<username>\AppData\Local\Programs\Arduino IDE
      
      (where <username> is your Windows username)
      :exclamation: If looking for it with your file manager or command line, note that the AppData folder is hidden by default. On Windows "File Explorer", you can make it visible by opening the "View" menu, then checking the box next to "☐ Hidden items".
  4. In the folder listing of the Arduino IDE installation folder, hold the Shift key while clicking the right hand button on the mouse.
  5. From the context menu, click "Open PowerShell window here".
    Windows PowerShell will now open with the current directory set to the Arduino IDE installation folder.
  6. Type the following command:
    & ".\Arduino IDE"
    
  7. Press the Enter key.
    Debug output should now be printed to the PowerShell window as Arduino IDE starts.
  8. Wait until you are sure the IDE startup has gone into the hang state
    (as indicated by no additional output being printed to the terminal).
  9. Switch back to the PowerShell window if the Arduino IDE window took the focus.
  10. Right click on the title bar of the PowerShell window.
    This will open a context menu.
  11. Select Edit > Select All from the context menu.
    This will select all the text in the PowerShell window.
  12. Press Ctrl+C.
    This will copy the contents of the PowerShell window to the clipboard.
  13. Open a forum reply here by clicking the Reply button.
  14. Click the <CODE/> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
    Code tags icon on toolbar
  15. Press Ctrl+V.
    This will paste the output into the code block.
  16. Move the cursor outside of the code block markup before you add any additional text to your reply.
  17. Click the Reply button to post the output.

Please let me know if you have any questions or problems while following those instructions.

Don't forget the simplest thing to do ...
Ctrl+Alt+Del
Open your Task Manager
Close
Arduino CLI
and Close all other Instances of Arudino
then restart your computer.

this happens to me at times, this process always fixes it.

@ptillisch @anon76350110 thanks for the fast reply, i posted the power window capture below, please review and advise.


PS C:\Users\11084582\AppData\Local\Programs\Arduino IDE> & ".\Arduino IDE"
PS C:\Users\11084582\AppData\Local\Programs\Arduino IDE>
Arduino IDE 2.2.1
Checking for frontend application configuration customizations. Module path: C:\Users\11084582\AppData\Local\Programs\Arduino IDE\resources\app\lib\backend\electron-main.js, destination 'package.json': C:\Users\11084582\AppData\Local\Programs\Arduino IDE\resources\app\package.json
Setting 'theia.frontend.config.appVersion' application configuration value to: "2.2.1" (type of string)
Setting 'theia.frontend.config.cliVersion' application configuration value to: "0.34.0" (type of string)
Setting 'theia.frontend.config.buildDate' application configuration value to: "2023-08-31T14:35:44.802Z" (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.2.1","cliVersion":"0.34.0","buildDate":"2023-08-31T14:35:44.802Z"}
Starting backend process. PID: 22408
Using browser-only version of superagent in non-browser environment
Configuration directory URI: 'file:///c%3A/Users/11084582/.arduinoIDE'
Configuring to accept webviews on '^.+\.webview\..+$' hostname.
2023-09-06T05:55:49.197Z root INFO Backend Object.initialize: 12.6 ms [Finished 1.188 s after backend start]
2023-09-06T05:55:49.199Z root INFO Backend Object.configure: 10.5 ms [Finished 1.188 s after backend start]
2023-09-06T05:55:49.200Z root INFO Backend a.onStart: 4.0 ms [Finished 1.188 s after backend start]
2023-09-06T05:55:49.202Z root INFO Backend a.configure: 1.0 ms [Finished 1.278 s after backend start]
2023-09-06T05:55:49.204Z root INFO Backend u.onStart: 0.9 ms [Finished 1.278 s after backend start]
2023-09-06T05:55:49.208Z root INFO Backend d.configure: 0.3 ms [Finished 1.278 s after backend start]
2023-09-06T05:55:49.215Z root WARN Backend d.initialize took longer than the expected maximum 50 milliseconds: 90.4 ms [Finished 1.279 s after backend start]
2023-09-06T05:55:49.216Z root INFO Backend c.onStart: 0.9 ms [Finished 1.279 s after backend start]
2023-09-06T05:55:49.219Z root INFO Backend s.configure: 4.0 ms [Finished 1.284 s after backend start]
2023-09-06T05:55:49.227Z config INFO >>> Initializing CLI configuration...
2023-09-06T05:55:49.227Z root INFO Backend c.initialize: 1.6 ms [Finished 1.285 s after backend start]
2023-09-06T05:55:49.231Z root INFO Backend P.onStart: 2.8 ms [Finished 1.287 s after backend start]
2023-09-06T05:55:49.245Z config INFO Loading CLI configuration from c:\Users\11084582\.arduinoIDE\arduino-cli.yaml...
2023-09-06T05:55:49.248Z daemon INFO Starting daemon from C:\Users\11084582\AppData\Local\Programs\Arduino IDE\resources\app\lib\backend\resources\arduino-cli.exe...
2023-09-06T05:55:49.249Z root INFO Backend s.initialize: 1.3 ms [Finished 1.290 s after backend start]
2023-09-06T05:55:49.257Z root INFO Backend w.onStart: 8.3 ms [Finished 1.297 s after backend start]
2023-09-06T05:55:49.264Z root INFO Backend r.configure: 11.6 ms [Finished 1.298 s after backend start]
2023-09-06T05:55:49.272Z discovery-log INFO start
2023-09-06T05:55:49.276Z discovery-log INFO start new deferred
2023-09-06T05:55:49.278Z root INFO Backend d.initialize: 2.6 ms [Finished 1.302 s after backend start]
2023-09-06T05:55:49.285Z root INFO Backend y.onStart: 10.4 ms [Finished 1.310 s after backend start]
2023-09-06T05:55:49.290Z root INFO Backend r.configure: 9.9 ms [Finished 1.314 s after backend start]
2023-09-06T05:55:49.293Z root INFO Backend s.onStart: 2.7 ms [Finished 1.332 s after backend start]
2023-09-06T05:55:49.299Z root INFO Backend h.configure: 10.5 ms [Finished 1.340 s after backend start]
2023-09-06T05:55:49.309Z root INFO Backend a.configure: 13.6 ms [Finished 1.367 s after backend start]
2023-09-06T05:55:49.310Z root INFO Backend s.configure: 0.3 ms [Finished 1.376 s after backend start]
2023-09-06T05:55:49.311Z root INFO Backend l.configure: 0.3 ms [Finished 1.392 s after backend start]
2023-09-06T05:55:49.321Z root INFO Theia app listening on http://localhost:62398.
2023-09-06T05:55:49.325Z root INFO Finished starting backend application: 50.1 ms [Finished 1.404 s after backend start]2023-09-06T05:55:49.376Z root WARN The local plugin referenced by local-dir:/c%3A/Users/11084582/.arduinoIDE/plugins does not exist.
2023-09-06T05:55:49.380Z root WARN The local plugin referenced by local-dir:/c%3A/Users/11084582/.arduinoIDE/extensions does not exist.
2023-09-06T05:55:49.382Z root WARN The local plugin referenced by local-dir:C:\Users\11084582\.arduinoIDE\plugins does not exist.
2023-09-06T05:55:49.459Z config INFO Loaded CLI configuration: {"board_manager":{"additional_urls":[]},"build_cache":{"compilations_before_purge":10,"ttl":"720h0m0s"},"daemon":{"port":"50051"},"directories":{"data":"C:\\Users\\11084582\\AppData\\Local\\Arduino15","downloads":"C:\\Users\\11084582\\AppData\\Local\\Arduino15\\staging","user":"C:\\Users\\11084582\\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}}
2023-09-06T05:55:49.461Z config INFO 'directories.data' and 'directories.user' are set in the CLI configuration model.
2023-09-06T05:55:49.475Z config INFO Loaded the CLI configuration.
2023-09-06T05:55:49.478Z config INFO Mapped the CLI configuration: {"dataDirUri":"file:///c%3A/Users/11084582/AppData/Local/Arduino15","sketchDirUri":"file:///c%3A/Users/11084582/Documents/Arduino","additionalUrls":[],"network":"none","locale":"en"}
2023-09-06T05:55:49.478Z config INFO Validating the CLI configuration...
2023-09-06T05:55:49.490Z config INFO The CLI config is valid.
2023-09-06T05:55:49.490Z config INFO <<< Initialized the CLI configuration.
2023-09-06T05:55:49.534Z root INFO Resolve plugins list: 290.4 ms [Finished 1.615 s after backend start]
2023-09-06T05:55:50.183Z daemon INFO time="2023-09-06T13:55:49+08:00" level=info msg="Using config file: c:\\Users\\11084582\\.arduinoIDE\\arduino-cli.yaml"
time="2023-09-06T13:55:50+08:00" level=info msg="arduino-cli.exe version 0.34.0"
time="2023-09-06T13:55:50+08:00" level=info msg="Executing `arduino-cli daemon`"
Daemon is now listening on 127.0.0.1:62400
{"IP":"127.0.0.1","Port":"62400"}
2023-09-06T05:55:50.184Z daemon INFO Daemon is running.
2023-09-06T05:55:50.397Z daemon INFO time="2023-09-06T13:55:50+08:00" level=info msg="Updating libraries index"
time="2023-09-06T13:55:50+08:00" level=info msg="Starting download" url="https://downloads.arduino.cc/libraries/library_index.tar.bz2"
2023-09-06T05:55:52.065Z root INFO Deploy plugins list: 290.4 ms [Finished 4.148 s after backend start]
Opening channel for service path '/services/electron-window'.
Opening channel for service path '/services/ide-updater'.
2023-09-06T05:55:52.934Z root WARN Frontend a.configure took longer than the expected maximum 100 milliseconds: 413.8 ms [Finished 3.318 s after frontend start]
2023-09-06T05:55:52.954Z root WARN A command editor.action.toggleStickyScroll is already registered.
2023-09-06T05:55:53.065Z root WARN Frontend keybindings.onStart took longer than the expected maximum 100 milliseconds: 107.7 ms [Finished 3.482 s after frontend start]
2023-09-06T05:55:53.486Z root WARN Frontend D.onStart took longer than the expected maximum 100 milliseconds: 319.0 ms [Finished 3.926 s after frontend start]
2023-09-06T05:56:32.302Z 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.32.201: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.
2023-09-06T05:56:32.304Z root ERROR Detected an error response during the gRPC core client initialization: code: 9, message: Loading index file: loading json index file C:\Users\11084582\AppData\Local\Arduino15\package_index.json: open C:\Users\11084582\AppData\Local\Arduino15\package_index.json: The system cannot find the file specified.
2023-09-06T05:56:32.328Z daemon INFO time="2023-09-06T13:56:32+08:00" level=info msg="Loading hardware from: C:\\Users\\11084582\\AppData\\Local\\Arduino15\\packages"
time="2023-09-06T13:56:32+08:00" level=info msg="Loading libraries index file" index="C:\\Users\\11084582\\AppData\\Local\\Arduino15\\library_index.json"
time="2023-09-06T13:56:32+08:00" level=info msg="Adding libraries dir" dir="C:\\Users\\11084582\\AppData\\Local\\Arduino15\\libraries" location=ide
time="2023-09-06T13:56:32+08:00" level=info msg="Adding libraries dir" dir="C:\\Users\\11084582\\Documents\\Arduino\\libraries" location=user
2023-09-06T05:56:32.332Z 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
2023-09-06T05:56:32.338Z 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
2023-09-06T05:56:32.351Z 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\11084582\AppData\Local\Arduino15\library_index.json: The system cannot find the file specified.
2023-09-06T05:56:32.362Z 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\11084582\AppData\Local\Arduino15\package_index.json: open C:\Users\11084582\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\11084582\AppData\Local\Arduino15\library_index.json: The system cannot find the file specified.

2023-09-06T05:56:32.364Z daemon INFO time="2023-09-06T13:56:32+08:00" level=info msg="Updating libraries index"
2023-09-06T05:56:32.375Z root INFO core-client-provider [platform-index] Downloading index: package_index.tar.bz2

2023-09-06T05:56:32.376Z daemon INFO time="2023-09-06T13:56:32+08:00" level=info msg="Updating index" url="https://downloads.arduino.cc/packages/package_index.tar.bz2"
time="2023-09-06T13:56:32+08:00" level=info msg="Starting download" url="https://downloads.arduino.cc/packages/package_index.tar.bz2"
time="2023-09-06T13:56:32+08:00" level=info msg="Starting download" url="https://downloads.arduino.cc/libraries/library_index.tar.bz2"
2023-09-06T05:56:32.378Z root INFO core-client-provider [library-index] Downloading index: library_index.tar.bz2

2023-09-06T05:57:14.435Z root ERROR Failed to update platform, library indexes. Error: 13 INTERNAL: Error downloading index 'https://downloads.arduino.cc/libraries/library_index.tar.bz2': Get "https://downloads.arduino.cc/libraries/library_index.tar.bz2": dial tcp 172.64.155.55: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.
    at t.callErrorFromStatus (C:\Users\11084582\AppData\Local\Programs\Arduino IDE\resources\app\lib\backend\main.js:2:726940)
    at Object.onReceiveStatus (C:\Users\11084582\AppData\Local\Programs\Arduino IDE\resources\app\lib\backend\main.js:2:754480)
    at Object.onReceiveStatus (C:\Users\11084582\AppData\Local\Programs\Arduino IDE\resources\app\lib\backend\main.js:2:747504)
    at C:\Users\11084582\AppData\Local\Programs\Arduino IDE\resources\app\lib\backend\main.js:2:833048
    at process.processTicksAndRejections (node:internal/process/task_queues:77:11)
for call at
    at a.makeServerStreamRequest (C:\Users\11084582\AppData\Local\Programs\Arduino IDE\resources\app\lib\backend\main.js:2:754247)
    at a.updateLibrariesIndex (C:\Users\11084582\AppData\Local\Programs\Arduino IDE\resources\app\lib\backend\main.js:2:818456)
    at C:\Users\11084582\AppData\Local\Programs\Arduino IDE\resources\app\lib\backend\main.js:2:587296
    at C:\Users\11084582\AppData\Local\Programs\Arduino IDE\resources\app\lib\backend\main.js:2:587489
    at new Promise (<anonymous>)
    at _.doUpdateIndex (C:\Users\11084582\AppData\Local\Programs\Arduino IDE\resources\app\lib\backend\main.js:2:587468)
    at _.updateLibraryIndex (C:\Users\11084582\AppData\Local\Programs\Arduino IDE\resources\app\lib\backend\main.js:2:587268)
    at _.updateIndex (C:\Users\11084582\AppData\Local\Programs\Arduino IDE\resources\app\lib\backend\main.js:2:586542)
    at _.initInstanceWithFallback (C:\Users\11084582\AppData\Local\Programs\Arduino IDE\resources\app\lib\backend\main.js:2:584725)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2023-09-06T05:57:14.443Z daemon INFO time="2023-09-06T13:57:14+08:00" level=info msg="Updating libraries index"
2023-09-06T05:57:14.458Z daemon INFO time="2023-09-06T13:57:14+08:00" level=info msg="Starting download" url="https://downloads.arduino.cc/libraries/library_index.tar.bz2"
[948:0906/135748.026:ERROR:gpu_init.cc(523)] Passthrough is not supported, GL is disabled, ANGLE is
2023-09-06T05:57:56.498Z 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 172.64.155.55: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.
2023-09-06T05:57:56.501Z root ERROR Detected an error response during the gRPC core client initialization: code: 9, message: Loading index file: loading json index file C:\Users\11084582\AppData\Local\Arduino15\package_index.json: open C:\Users\11084582\AppData\Local\Arduino15\package_index.json: The system cannot find the file specified.
2023-09-06T05:57:56.508Z 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
2023-09-06T05:57:56.511Z 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
2023-09-06T05:57:56.520Z 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\11084582\AppData\Local\Arduino15\library_index.json: The system cannot find the file specified.
2023-09-06T05:57:56.534Z 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\11084582\AppData\Local\Arduino15\package_index.json: open C:\Users\11084582\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\11084582\AppData\Local\Arduino15\library_index.json: The system cannot find the file specified.

2023-09-06T05:57:56.535Z 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\11084582\AppData\Local\Arduino15\package_index.json: open C:\Users\11084582\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\11084582\AppData\Local\Arduino15\library_index.json: The system cannot find the file specified.

    at C:\Users\11084582\AppData\Local\Programs\Arduino IDE\resources\app\lib\backend\main.js:2:586285
    at _.evaluateErrorStatus (C:\Users\11084582\AppData\Local\Programs\Arduino IDE\resources\app\lib\backend\main.js:2:586301)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async s.<anonymous> (C:\Users\11084582\AppData\Local\Programs\Arduino IDE\resources\app\lib\backend\main.js:2:585971)
2023-09-06T05:57:56.537Z daemon INFO time="2023-09-06T13:57:56+08:00" level=info msg="Loading hardware from: C:\\Users\\11084582\\AppData\\Local\\Arduino15\\packages"
time="2023-09-06T13:57:56+08:00" level=info msg="Loading libraries index file" index="C:\\Users\\11084582\\AppData\\Local\\Arduino15\\library_index.json"
time="2023-09-06T13:57:56+08:00" level=info msg="Adding libraries dir" dir="C:\\Users\\11084582\\AppData\\Local\\Arduino15\\libraries" location=ide
time="2023-09-06T13:57:56+08:00" level=info msg="Adding libraries dir" dir="C:\\Users\\11084582\\Documents\\Arduino\\libraries" location=user

I see the problem here:

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.

@ptillisch

i was using secured wifi and i switched to private wifi able to complete the installation and able to launch.

thanks for support

1 Like

Looks like its fixed
well done

6 posts were split to a new topic: Hang on startup: "Error: 14 UNAVAILABLE: No connection established"

A post was split to a new topic: IDE startup hangs: "Error: write EPIPE"

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