Dirt simple, on first run have the software check for Internet access and remind the user it needs to download files to begin rather than just sitting there. It's kinda more than little patronizing or maybe it's condescending the way it works right now, plus this is basic online app functionality we've had for the last 25yrs, who dropped the ball?
Hi @jugglinggentleman . The Arduino IDE developers are tracking the bug of Arduino IDE hanging on startup on the first run if there isn't Internet access here:
opened 12:42AM - 04 May 23 UTC
topic: code
type: imperfection
### Describe the problem
On the first run after a fresh installation, Arduino I… DE downloads some files from the Internet:
- The `builtin:serial-discovery` [pluggable discovery](https://arduino.github.io/arduino-cli/latest/pluggable-discovery-specification/) tool
- The `builtin:mdns-discovery` pluggable discovery tool
- The Library Manager index
- The primary Boards Manager package index
🐛 If the download of these files is not possible due to lack of Internet access, or some other problem (e.g., https://github.com/arduino/arduino-ide/issues/2606), the startup hangs.
This is a change from Arduino IDE 1.x, which is in a fully functional state from the start with no hard dependency on an Internet connection (though obviously Library/Boards Manager can't be used).
### To reproduce
1. Select **File > Quit** from the Arduino IDE menus if it is running.
1. Rename or delete (:warning: cautiously) the following folder to effectively simulate the environment of a first run:
- **If you are using Windows:**
```text
C:\Users\<username>\AppData\Local\Arduino15
```
(where `<username>` is your Windows username)
- **If you are using Linux:**
```text
~/.arduino15
```
- **If you are using macOS:**
```text
~/Library/Arduino15
```
1. Disconnect your computer from the Internet.
1. Start Arduino IDE.
🐛 Startup hangs at the startup animation.
🐛 The cause of the hang is not communicated to the user.
### Expected behavior
Complete startup even when the essential resources could not be installed.
This is important because, once it has started up, Arduino IDE shows notifications that communicate the Internet access dependency to the user.
- Record whether the `arduino:avr` and "Arduino_BuiltIn" installations were successful, and if not then retry on subsequent startups.
- Note: This must be done based on a dedicated record, and not on the presence/absence of these installations because users may have later removed unwanted installations after they were successfully installed automatically.
### Arduino IDE version
097c92d904ca9b126e54b6a58030b5f4c650f075
### Operating system
Windows
### Operating system version
11
### Additional context
The regression was introduced at https://github.com/arduino/arduino-ide/commit/a36524e02ab5fbc2ef333ff67a047dfe5718b306
---
The logs include this:
```text
2023-05-03T23:57:19.823Z root ERROR Uncaught Exception:
2023-05-03T23:57:19.823Z 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\per\AppData\Local\Arduino15\package_index.json: open C:\Users\per\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\per\AppData\Local\Arduino15\library_index.json: The system cannot find the file specified.
at isIndexUpdateRequiredBeforeInit (C:\arduino-tools\193-097c92d\resources\app\node_modules\arduino-ide-extension\lib\node\core-client-provider.js:388:11)
at CoreClientProvider.evaluateErrorStatus (C:\arduino-tools\193-097c92d\resources\app\node_modules\arduino-ide-extension\lib\node\core-client-provider.js:200:16)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async ClientReadableStreamImpl.<anonymous> (C:\arduino-tools\193-097c92d\resources\app\node_modules\arduino-ide-extension\lib\node\core-client-provider.js:184:31)
```
#### Related
- https://github.com/arduino/arduino-ide/issues/784
- https://github.com/arduino/arduino-ide/issues/786
#### Additional reports:
- https://github.com/arduino/arduino-ide/issues/2306
- https://github.com/arduino/arduino-ide/issues/2471
- https://github.com/arduino/arduino-ide/issues/2606
- https://forum.arduino.cc/t/arduino-2-0-will-not-start-past-the-loading-screen/1049023/1
- https://forum.arduino.cc/t/arduino-2-0-will-not-start-past-the-loading-screen/1049023/31
- https://forum.arduino.cc/t/arduino-2-0-will-not-start-past-the-loading-screen/1049023/56
- https://forum.arduino.cc/t/arduino-2-0-will-not-start-past-the-loading-screen/1049023/101
- https://forum.arduino.cc/t/arduino-ide-wont-start-on-the-windows-10/1052335
- https://forum.arduino.cc/t/arduino-ide-doesnt-get-any-further-than-splash-screen/1084721
- https://forum.arduino.cc/t/arduino-is-not-starting-hangs-on-launch-up-animation/1093871
- https://forum.arduino.cc/t/arduino-ide-2-04-not-starting-up-stuck-on-logo/1102153
- https://forum.arduino.cc/t/stuck-on-loading-screen-on-arduino-2-0-4/1101395
- https://forum.arduino.cc/t/arduino-2-0-4-not-starting/1097641
- https://forum.arduino.cc/t/macos-m1-arduino-ide-2-0-3-is-not-working-anymore/1078952/11
- https://forum.arduino.cc/t/arduino-ide-2-1-1-not-running-after-installation-in-windows-10/1158693
- https://forum.arduino.cc/t/ide-wont-start-after-installation-on-computer-without-internet-connection/1168203/1
- https://forum.arduino.cc/t/ide-wont-start-after-installation-on-computer-without-internet-connection/1168203/9
- https://forum.arduino.cc/t/ide-wont-start-after-installation-on-computer-without-internet-connection/1168203/10
- https://forum.arduino.cc/t/arduino-2-0-3-stuck-on-loading-screen/1083198/1
- https://forum.arduino.cc/t/arduino-2-0-3-stuck-on-loading-screen/1083198/11
- https://forum.arduino.cc/t/arduino-2-0-3-stuck-on-loading-screen/1083198/15
- https://forum.arduino.cc/t/arduino-2-0-3-stuck-on-loading-screen/1083198/21
- https://forum.arduino.cc/t/ide-hangs-on-startup-error-loading-hardware-platform-discovery-builtin-serial-discovery-not-found/1188386
- https://forum.arduino.cc/t/ide-2-2-1-stuck/1165487
- https://forum.arduino.cc/t/arduino-2-1-1-0-stuck-at-start-up/1163600
- https://forum.arduino.cc/t/ide-dosnt-work/1198917
- https://forum.arduino.cc/t/ide-hangs-on-startup-discovery-builtin-serial-discovery-not-found/1188347
- https://forum.arduino.cc/t/ide-2-2-1-wont-load/1170617/1
- https://forum.arduino.cc/t/stuck-on-loading-screen-for-arduino-ide-2-1-0/1156448
- https://forum.arduino.cc/t/ide-hangs-on-startup-error-loading-hardware-platform-discovery-builtin-serial-discovery-not-found/1188383
- https://forum.arduino.cc/t/ide-hangs-on-startup-error-loading-hardware-platform-discovery-builtin-serial-discovery-not-found/1188371
- https://forum.arduino.cc/t/arduino-ide-2-04-not-starting-up-stuck-on-logo/1102153
- https://forum.arduino.cc/t/arduino-is-not-starting-hangs-on-launch-up-animation/1093871
- https://forum.arduino.cc/t/ide-hangs-on-startup-error-loading-hardware-platform-discovery-builtin-serial-discovery-not-found/1188362
- https://forum.arduino.cc/t/ide-hangs-on-startup-dial-tcp-lookup-downloads-arduino-cc-no-such-host/1261340
- https://forum.arduino.cc/t/arduino-ide-su-laptop/1305303
- https://forum.arduino.cc/t/ide-hangs-on-startup-dial-tcp-lookup-downloads-arduino-cc-no-such-host/1309661
- https://forum.arduino.cc/t/arduino-ide-cant-open/1325884
- https://forum.arduino.cc/t/feeback-on-latest-2-x-ide-w-win11/1333594
- https://forum.arduino.cc/t/ide-hangs-on-startup-appdata-local-arduino15-library-index-json-the-system-cannot-find-the-file-specified/1355546
- https://forum.arduino.cc/t/ide-hangs-on-startup-connectex-an-attempt-was-made-to-access-a-socket-in-a-way-forbidden-by-its-access-permissions/1390245
- https://forum.arduino.cc/t/ide-hangs-on-startup-wsarecv-an-existing-connection-was-forcibly-closed-by-the-remote-host/1392433
- https://forum.arduino.cc/t/ide-improvement-suggestion/1402672
### Issue checklist
- [X] I searched for previous reports in [the issue tracker](https://github.com/arduino/arduino-ide/issues?q=)
- [X] I verified the problem still occurs when using the latest [nightly build](https://www.arduino.cc/en/software#nightly-builds)
- [X] My report contains all necessary details
If you have a GitHub account, you can subscribe to that thread to get notifications of any new developments related to this subject:
Please only comment on the GitHub issue thread if you have new technical information that will assist with the resolution. General discussion and support requests are always welcome here on the Arduino Forum.