IDE hangs on startup: "Error loading hardware platform: discovery builtin:serial-discovery not found"

PS C:\Users\Dell\AppData\Local\Programs\Arduino IDE> & ".\Arduino IDE"
PS C:\Users\Dell\AppData\Local\Programs\Arduino IDE>
Arduino IDE 2.2.1
Checking for frontend application configuration customizations. Module path: C:\Users\Dell\AppData\Local\Programs\Arduino IDE\resources\app\lib\backend\electron-main.js, destination 'package.json': C:\Users\Dell\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: 9896
Using browser-only version of superagent in non-browser environment
Configuration directory URI: 'file:///c%3A/Users/Dell/.arduinoIDE'
Configuring to accept webviews on '^.+\.webview\..+$' hostname.
2023-10-29T07:42:49.553Z root INFO Backend Object.initialize: 6.7 ms [Finished 0.614 s after backend start]
2023-10-29T07:42:49.554Z root INFO Backend Object.configure: 5.5 ms [Finished 0.614 s after backend start]
2023-10-29T07:42:49.554Z root INFO Backend a.onStart: 2.1 ms [Finished 0.614 s after backend start]
2023-10-29T07:42:49.555Z root INFO Backend a.configure: 0.4 ms [Finished 0.648 s after backend start]
2023-10-29T07:42:49.556Z root INFO Backend u.onStart: 0.3 ms [Finished 0.648 s after backend start]
2023-10-29T07:42:49.557Z root INFO Backend d.configure: 0.1 ms [Finished 0.648 s after backend start]
2023-10-29T07:42:49.558Z root INFO Backend d.initialize: 33.7 ms [Finished 0.648 s after backend start]
2023-10-29T07:42:49.558Z root INFO Backend c.onStart: 0.3 ms [Finished 0.648 s after backend start]
2023-10-29T07:42:49.559Z root INFO Backend s.configure: 1.5 ms [Finished 0.650 s after backend start]
2023-10-29T07:42:49.561Z config INFO >>> Initializing CLI configuration...
2023-10-29T07:42:49.561Z root INFO Backend c.initialize: 0.5 ms [Finished 0.650 s after backend start]
2023-10-29T07:42:49.561Z root INFO Backend P.onStart: 1.0 ms [Finished 0.651 s after backend start]
2023-10-29T07:42:49.562Z config INFO Loading CLI configuration from c:\Users\Dell\.arduinoIDE\arduino-cli.yaml...
2023-10-29T07:42:49.563Z daemon INFO Starting daemon from C:\Users\Dell\AppData\Local\Programs\Arduino IDE\resources\app\lib\backend\resources\arduino-cli.exe...
2023-10-29T07:42:49.563Z root INFO Backend s.initialize: 0.4 ms [Finished 0.652 s after backend start]
2023-10-29T07:42:49.563Z root INFO Backend w.onStart: 1.3 ms [Finished 0.653 s after backend start]
2023-10-29T07:42:49.564Z root INFO Backend r.configure: 2.5 ms [Finished 0.654 s after backend start]
2023-10-29T07:42:49.564Z discovery-log INFO start
2023-10-29T07:42:49.564Z discovery-log INFO start new deferred
2023-10-29T07:42:49.564Z root INFO Backend d.initialize: 0.4 ms [Finished 0.654 s after backend start]
2023-10-29T07:42:49.564Z root INFO Backend y.onStart: 2.5 ms [Finished 0.657 s after backend start]
2023-10-29T07:42:49.565Z root INFO Backend r.configure: 2.3 ms [Finished 0.657 s after backend start]
2023-10-29T07:42:49.565Z root INFO Backend s.onStart: 0.7 ms [Finished 0.659 s after backend start]
2023-10-29T07:42:49.565Z root INFO Backend h.configure: 0.8 ms [Finished 0.659 s after backend start]
2023-10-29T07:42:49.566Z root INFO Backend a.configure: 0.7 ms [Finished 0.660 s after backend start]
2023-10-29T07:42:49.566Z root INFO Backend s.configure: 0.1 ms [Finished 0.661 s after backend start]
2023-10-29T07:42:49.566Z root INFO Backend l.configure: 0.1 ms [Finished 0.661 s after backend start]
2023-10-29T07:42:49.569Z root INFO Theia app listening on http://localhost:63192.
2023-10-29T07:42:49.570Z root INFO Finished starting backend application: 5.7 ms [Finished 0.665 s after backend start]
2023-10-29T07:42:49.592Z root WARN The local plugin referenced by local-dir:/c%3A/Users/Dell/.arduinoIDE/plugins does not exist.
2023-10-29T07:42:49.593Z root WARN The local plugin referenced by local-dir:/c%3A/Users/Dell/.arduinoIDE/extensions does not exist.
2023-10-29T07:42:49.602Z root WARN The local plugin referenced by local-dir:C:\Users\Dell\.arduinoIDE\plugins does not exist.
2023-10-29T07:42:49.650Z config INFO Loaded CLI configuration: {"board_manager":{"additional_urls":[]},"build_cache":{"compilations_before_purge":10,"ttl":"720h0m0s"},"daemon":{"port":"50051"},"directories":{"data":"C:\\Users\\Dell\\AppData\\Local\\Arduino15","downloads":"C:\\Users\\Dell\\AppData\\Local\\Arduino15\\staging","user":"C:\\Users\\Dell\\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-10-29T07:42:49.651Z config INFO 'directories.data' and 'directories.user' are set in the CLI configuration model.
2023-10-29T07:42:49.659Z config INFO Loaded the CLI configuration.
2023-10-29T07:42:49.661Z config INFO Mapped the CLI configuration: {"dataDirUri":"file:///c%3A/Users/Dell/AppData/Local/Arduino15","sketchDirUri":"file:///c%3A/Users/Dell/Documents/Arduino","additionalUrls":[],"network":"none","locale":"en"}
2023-10-29T07:42:49.661Z config INFO Validating the CLI configuration...
2023-10-29T07:42:49.662Z config INFO The CLI config is valid.
2023-10-29T07:42:49.663Z config INFO <<< Initialized the CLI configuration.
2023-10-29T07:42:49.686Z daemon INFO time="2023-10-29T08:42:49+01:00" level=info msg="Using config file: c:\\Users\\Dell\\.arduinoIDE\\arduino-cli.yaml"
time="2023-10-29T08:42:49+01:00" level=info msg="arduino-cli.exe version 0.34.0"
time="2023-10-29T08:42:49+01:00" level=info msg="Executing `arduino-cli daemon`"
2023-10-29T07:42:49.694Z daemon INFO Daemon is now listening on 127.0.0.1:63193
{"IP":"127.0.0.1","Port":"63193"}
2023-10-29T07:42:49.694Z daemon INFO Daemon is running.
2023-10-29T07:42:49.748Z daemon INFO time="2023-10-29T08:42:49+01:00" level=info msg="Updating libraries index"
2023-10-29T07:42:49.752Z daemon INFO time="2023-10-29T08:42:49+01:00" level=info msg="Starting download" url="https://downloads.arduino.cc/libraries/library_index.tar.bz2"
2023-10-29T07:42:49.757Z root INFO Resolve plugins list: 194.9 ms [Finished 0.852 s after backend start]
2023-10-29T07:42:49.777Z 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: lookup downloads.arduino.cc: no such host
2023-10-29T07:42:49.777Z root ERROR Detected an error response during the gRPC core client initialization: code: 9, message: Loading index file: loading json index file C:\Users\Dell\AppData\Local\Arduino15\package_index.json: open C:\Users\Dell\AppData\Local\Arduino15\package_index.json: The system cannot find the file specified.
2023-10-29T07:42:49.780Z 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-10-29T07:42:49.788Z 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-10-29T07:42:49.790Z 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\Dell\AppData\Local\Arduino15\library_index.json: The system cannot find the file specified.
2023-10-29T07:42:49.795Z 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\Dell\AppData\Local\Arduino15\package_index.json: open C:\Users\Dell\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\Dell\AppData\Local\Arduino15\library_index.json: The system cannot find the file specified.

2023-10-29T07:42:49.800Z daemon INFO time="2023-10-29T08:42:49+01:00" level=info msg="Loading hardware from: C:\\Users\\Dell\\AppData\\Local\\Arduino15\\packages"
time="2023-10-29T08:42:49+01:00" level=info msg="Loading libraries index file" index="C:\\Users\\Dell\\AppData\\Local\\Arduino15\\library_index.json"
time="2023-10-29T08:42:49+01:00" level=info msg="Adding libraries dir" dir="C:\\Users\\Dell\\AppData\\Local\\Arduino15\\libraries" location=ide
time="2023-10-29T08:42:49+01:00" level=info msg="Adding libraries dir" dir="C:\\Users\\Dell\\Documents\\Arduino\\libraries" location=user
time="2023-10-29T08:42:49+01:00" level=info msg="Updating libraries index"
time="2023-10-29T08:42:49+01:00" level=info msg="Updating index" url="https://downloads.arduino.cc/packages/package_index.tar.bz2"
2023-10-29T07:42:49.806Z root INFO core-client-provider [platform-index] Downloading index: package_index.tar.bz2

2023-10-29T07:42:49.808Z root ERROR Failed to update platform, library indexes. Error: 13 INTERNAL: Some indexes could not be updated.
    at t.callErrorFromStatus (C:\Users\Dell\AppData\Local\Programs\Arduino IDE\resources\app\lib\backend\main.js:2:726940)
    at Object.onReceiveStatus (C:\Users\Dell\AppData\Local\Programs\Arduino IDE\resources\app\lib\backend\main.js:2:754480)
    at Object.onReceiveStatus (C:\Users\Dell\AppData\Local\Programs\Arduino IDE\resources\app\lib\backend\main.js:2:747504)
    at C:\Users\Dell\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\Dell\AppData\Local\Programs\Arduino IDE\resources\app\lib\backend\main.js:2:754247)
    at a.updateIndex (C:\Users\Dell\AppData\Local\Programs\Arduino IDE\resources\app\lib\backend\main.js:2:818456)
    at C:\Users\Dell\AppData\Local\Programs\Arduino IDE\resources\app\lib\backend\main.js:2:587141
    at C:\Users\Dell\AppData\Local\Programs\Arduino IDE\resources\app\lib\backend\main.js:2:587489
    at new Promise (<anonymous>)
    at _.doUpdateIndex (C:\Users\Dell\AppData\Local\Programs\Arduino IDE\resources\app\lib\backend\main.js:2:587468)
    at _.updatePlatformIndex (C:\Users\Dell\AppData\Local\Programs\Arduino IDE\resources\app\lib\backend\main.js:2:587113)
    at _.updateIndex (C:\Users\Dell\AppData\Local\Programs\Arduino IDE\resources\app\lib\backend\main.js:2:586481)
    at _.initInstanceWithFallback (C:\Users\Dell\AppData\Local\Programs\Arduino IDE\resources\app\lib\backend\main.js:2:584725)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2023-10-29T07:42:49.813Z root INFO core-client-provider [library-index] Downloading index: library_index.tar.bz2

2023-10-29T07:42:49.820Z daemon INFO time="2023-10-29T08:42:49+01:00" level=info msg="Starting download" url="https://downloads.arduino.cc/packages/package_index.tar.bz2"
time="2023-10-29T08:42:49+01:00" level=info msg="Starting download" url="https://downloads.arduino.cc/libraries/library_index.tar.bz2"
2023-10-29T07:42:49.821Z daemon INFO time="2023-10-29T08:42:49+01:00" level=info msg="Updating libraries index"
2023-10-29T07:42:49.822Z daemon INFO time="2023-10-29T08:42:49+01:00" level=info msg="Starting download" url="https://downloads.arduino.cc/libraries/library_index.tar.bz2"
2023-10-29T07:42:49.829Z 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: lookup downloads.arduino.cc: no such host
2023-10-29T07:42:49.830Z root ERROR Detected an error response during the gRPC core client initialization: code: 9, message: Loading index file: loading json index file C:\Users\Dell\AppData\Local\Arduino15\package_index.json: open C:\Users\Dell\AppData\Local\Arduino15\package_index.json: The system cannot find the file specified.
2023-10-29T07:42:49.832Z 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-10-29T07:42:49.833Z 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-10-29T07:42:49.835Z 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\Dell\AppData\Local\Arduino15\library_index.json: The system cannot find the file specified.
2023-10-29T07:42:49.837Z 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\Dell\AppData\Local\Arduino15\package_index.json: open C:\Users\Dell\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\Dell\AppData\Local\Arduino15\library_index.json: The system cannot find the file specified.

2023-10-29T07:42:49.837Z 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\Dell\AppData\Local\Arduino15\package_index.json: open C:\Users\Dell\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\Dell\AppData\Local\Arduino15\library_index.json: The system cannot find the file specified.

    at C:\Users\Dell\AppData\Local\Programs\Arduino IDE\resources\app\lib\backend\main.js:2:586285
    at _.evaluateErrorStatus (C:\Users\Dell\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\Dell\AppData\Local\Programs\Arduino IDE\resources\app\lib\backend\main.js:2:585971)
2023-10-29T07:42:49.838Z daemon INFO time="2023-10-29T08:42:49+01:00" level=info msg="Loading hardware from: C:\\Users\\Dell\\AppData\\Local\\Arduino15\\packages"
time="2023-10-29T08:42:49+01:00" level=info msg="Loading libraries index file" index="C:\\Users\\Dell\\AppData\\Local\\Arduino15\\library_index.json"
time="2023-10-29T08:42:49+01:00" level=info msg="Adding libraries dir" dir="C:\\Users\\Dell\\AppData\\Local\\Arduino15\\libraries" location=ide
time="2023-10-29T08:42:49+01:00" level=info msg="Adding libraries dir" dir="C:\\Users\\Dell\\Documents\\Arduino\\libraries" location=user
2023-10-29T07:42:51.159Z root INFO Deploy plugins list: 194.9 ms [Finished 2.254 s after backend start]
Opening channel for service path '/services/electron-window'.
Opening channel for service path '/services/ide-updater'.
2023-10-29T07:42:51.600Z root WARN Frontend a.configure took longer than the expected maximum 100 milliseconds: 279.9 ms [Finished 1.872 s after frontend start]
2023-10-29T07:42:51.605Z root WARN A command editor.action.toggleStickyScroll is already registered.

Hi @electricalman. 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.

Thanks, it worked. Please I'm encountering another little problem here. I'm trying to install ESP32 library on my IDE but it keeps up popping this error message.

Failed to install platform: 'esp32:esp32:2.0.11'.
Error: 2 UNKNOWN: Get "https://objects.githubusercontent.com/github-production-release-asset-2e65be/66057540/6cd10a77-6200-41f6-bbe2-7263e70c4032?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20231029%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20231029T170341Z&X-Amz-Expires=300&X-Amz-Signature=42916b8f6ab71231194a5135894d62270b606f31c3f171d0486a0f30ad734777&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=66057540&response-content-disposition=attachment%3B%20filename%3Dxtensa-esp32s3-elf-gcc8_4_0-esp-2021r2-patch5-win64.zip&response-content-type=application%2Foctet-stream": read tcp 192.168.10.211:57831->185.199.111.133:443: wsarecv: 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.

You are welcome. I'm glad the IDE is able to start up now.

This problem might be caused by your firewall or some other network security system (e.g., proxy or VPN) interfering with Arduino IDE's ability to access the Internet.

Are you aware of anything special about the configuration of the network you connect to the Internet through that might interfere with Arduino IDE's access to the Internet?

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