Hi, I'm using the new Arduino IDE 2.0.0
Version: 2.0.0-nightly-20220922
Date: 2022-09-22T03:51:53.395Z
CLI Version: 0.27.1 [a900cfb2]
I would like to use the IDE offline, i.e. without internet connection: someone could tell me if it is possible and possibly what to do to avoid connecting to the network for this type of IDE.
Hi @Pippo_75 . There is a requirement that the IDE has access to the Internet on the first run after installation so that it can download additional assets:
opened 07:42AM - 28 Jan 22 UTC
type: enhancement
topic: code
### Describe the problem
On the first run, Arduino IDE must download some fil… es from the Internet:
- `builtin:serial-discovery`
- `builtin:mdns-discovery`
- `builtin:ctags`
- The "Arduino AVR Boards" platform
- The standard libraries
If the IDE does not have Internet access at that time, it can not reach a functional state. There is currently no communication to the user in this situation.
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. Quit the IDE if it is running.
1. Rename or delete (:warning: cautiously) the following folders to simulate the environment of a first run:
- Windows:
```
C:\Users\<username>\.arduinoIDE
```
```
C:\Users\<user name>\AppData\Local\Arduino15
```
```
C:\Users\<user name>\AppData\Roaming\arduino-ide
```
```
C:\Users\<user name>\Documents\Arduino
```
- Linux:
```
~/.arduinoIDE
```
```
~/.arduino15
```
```
~/.config/arduino-ide
```
```
~/Arduino
```
- macOS:
```
~/.arduinoIDE
```
```
~/Library/Arduino15
```
```
~/Library/Application Support/arduino-ide
```
```
~/Arduino
```
1. Disconnect your computer from the Internet.
1. Start the Arduino IDE.
1. Wait as long as you need to feel confident the IDE has finished doing all first run procedures.
1. Connect an Arduino board to your computer.
1. Open the board/port selector.
:bug: Notice that the board and port are not listed.
1. Select **Tools > Board** from the Arduino IDE menus.
:bug: Notice that the expected "Arduino AVR Boards" menu item is not present.
1. Open the **Tools > Port** menu.
:bug: Notice that the port of your board is not listed.
1. Open the **Sketch > Include Library** menu.
:bug: Notice that there are no libraries.
After you connect to the Internet and restart the IDE, the discoveries will be installed, so the missing ports issue will resolve itself at that time 🙂. However, the missing "Arduino AVR Boards" platform and libraries condition is persistent :bug: because this is only attempted on the first run, whether or not it fails.
### Expected behavior
- Communicate to the user when resources could not be installed on first run.
- 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
2.0.0-rc3-snapshot.1d88263
### Operating system
Windows
### Operating system version
10
### Additional context
At one time, the IDE showed a notification when there was no Internet connection (https://github.com/arduino/arduino-ide/pull/266), which was cryptic but at least gave some feedback:
```
Request loadSketch failed with message: 2 UNKNOWN: downloading builtin:ctags@5.8-arduino11 tool: Get "https://downloads.arduino.cc/tools/ctags-5.8-arduino11-pm-i686-mingw32.zip": dial tcp: lookup downloads.arduino.cc: no such host
```
But that notification is no longer shown (probably because the system has been made more tolerant of error conditions).
---
Additional reports:
- https://forum.arduino.cc/t/arduino-ide-2-not-working/1077381
### 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
opened 12:33PM - 20 Jun 22 UTC
closed 07:17AM - 05 Oct 22 UTC
conclusion: resolved
topic: code
type: imperfection
topic: CLI
### Describe the problem
[Package indexes](https://arduino.github.io/arduino-… cli/dev/package_index_json-specification/) are used by the Arduino Boards Manager system to track the [Arduino boards platforms](https://arduino.github.io/arduino-cli/dev/platform-specification/) that are available for installation.
These come from two types of sources:
- The official [primary package index](https://downloads.arduino.cc/packages/package_index.json)
- URLs specified by the user via the "**Additional Boards Manager URLs**" field of the IDE's "**Preferences**" dialog
The package indexes are downloaded from these URLs by Arduino IDE 2.x on startup.
🐛 Under the following conditions, the IDE is non-functional:
- A package index cannot be downloaded from its URL
- The package index is not already present in `directories.data`
### To reproduce
1. Select **File > Preferences...** from the Arduino IDE menus.
1. Add the following to the "**Additional Boards Manager URLs**" field:
```text
https://downloads.arduino.cc/packages/package_nonexistent_index.json
```
**ⓘ** The issue is not specific to this URL. Any URL that does not provide a package index URL download can be used.
1. Click the <kbd>**OK**</kbd> button.
1. Select **File > Quit** from the Arduino IDE menus.
1. Start the Arduino IDE.
1. Open the "Board Selector" menus.
🐛 No boards are shown.
1. Open the **Tools** menu.
🐛 There is no "**Boards**" menu.
1. Open the "**Boards Manager**" view.
🐛 The view is empty, not even showing the currently installed platforms.
1. Open the "**Library Manager**" view.
🐛 The view is empty.
🐛 The only way for the user to identify the problem is searching through the logs.
### Expected behavior
Clearly communicate to the user that there was a problem with downloading the package index.
It would probably also make sense to retain general functionality of the Arduino IDE (though of course the Boards Manager functionality that relies on the missing package index in particular will not be available).
### Arduino IDE version
2.0.0-rc7-snapshot-a715da3
### Operating system
Windows
### Operating system version
10
### Additional context
I bisected the issue to https://github.com/arduino/arduino-ide/commit/4c55807392b3b724e2c5912280c621f9ed8db5e6 (does not occur with the build from https://github.com/arduino/arduino-ide/commit/cb50d3a70d1dc34d46bb1373f9aa4678f14f7133)
---
The logs contain the following:
```text
root ERROR Uncaught Exception:
root ERROR Error: 13 INTERNAL: Error downloading index 'https://downloads.arduino.cc/packages/package_nonexistent_index.json': Server responded with: 404 Not Found
at Object.callErrorFromStatus (C:\ide 2\tip\48-a715da3\resources\app\node_modules\@grpc\grpc-js\build\src\call.js:31:26)
at Object.onReceiveStatus (C:\ide 2\tip\48-a715da3\resources\app\node_modules\@grpc\grpc-js\build\src\client.js:349:49)
at Object.onReceiveStatus (C:\ide 2\tip\48-a715da3\resources\app\node_modules\@grpc\grpc-js\build\src\client-interceptors.js:328:181)
at C:\ide 2\tip\48-a715da3\resources\app\node_modules\@grpc\grpc-js\build\src\call-stream.js:187:78
at processTicksAndRejections (node:internal/process/task_queues:78:11)
```
---
Even though it is most likely to occur with package indexes provided by via the "**Additional Boards Manager URLs**" preference (whether by user error, no connection to Internet, or transient network outage on the server), it does also occur even with the primary package index so long as the conditions described previously are present.
---
Originally reported at https://github.com/arduino/arduino-ide/issues/1036#issuecomment-1152531289
I mistakenly claimed that issue had been fixed by https://github.com/arduino/arduino-ide/pull/1045 because I did not realize at that time that the package index's absence from `directories.data` was a required condition to reproduce it.
---
Related:
- https://forum.arduino.cc/t/arduino-2-0-0-rc-7-no-board-manager-or-library-manager/1004131/6
- https://forum.arduino.cc/t/ide-2-0-0-rc8-missing-tools-board-and-other-menus/1007606
### 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://github.com/arduino/arduino-ide#nightly-builds)
- [X] My report contains all necessary details
However, after that is done the core functionality of the IDE should be usable even without an Internet connection. This leaves out the supplemental features such as "Boards Manager " and "Library Manager ", which are inherently dependent on Internet access, as well as, perhaps not so intuitively , the "WiFi101 / WiFiNINA Firmware Updater " and "Upload SSL Root Certificates " features. But the essentials like editing sketches, compiling, and uploading should have no dependence on the Internet.
You mention the check for updates. This operation will fail, but it should not be a problem so long as you don't mind the lack of notifications of new versions of the IDE, boards platforms, and libraries. The failure notifications might be a bit annoying though, and suppressing these has been proposed here:
opened 11:33AM - 28 Jan 22 UTC
type: enhancement
topic: code
## Describe the current behavior
The "**WiFi101 / WiFiNINA Firmware Updater**… " and "**Upload SSL Root Certificates**" features require access to the Internet. Currently, there is no indication for the user of why these tools will not work when they attempt to use them while the IDE does not have Internet access.
## To reproduce
1. Quit the IDE if it is running.
1. Disconnect your computer from the Internet.
1. Start the Arduino IDE.
1. Connect a supported board to your computer.
Examples:
- [Nano 33 IoT](https://store.arduino.cc/arduino-nano-33-iot)
- [MKR WiFi 1010](https://store.arduino.cc/arduino-mkr-wifi-1010)
- [Uno WiFi Rev2](https://store.arduino.cc/arduino-uno-wifi-rev2)
- [MKR1000](https://store.arduino.cc/arduino-mkr1000-wifi)
1. Select **Tools > WiFi101 / WiFiNINA Firmware Updater** from the Arduino IDE menus.
:bug: The connected board is not listed under the "**Select Board**" menu and there is no indication of why.
1. Click the **X** icon on the dialog.
1. Select **Tools > Upload SSL Root Certificates** from the Arduino IDE menus.
:bug: The connected board is not listed under the "**2. Select destination board and upload certificate**" menu and there is no indication of why.
## Describe the request
Communicate to the user that these features are not working because there is no access to the Internet.
## Desktop
- OS: Windows 10
- Version: 2.0.0-rc3-snapshot.1d88263
Date: 2022-01-24T16:22:30.529Z
CLI Version: 0.20.2 [13783819]
## Additional context
The [Arduino Firmware Uploader](https://github.com/arduino/arduino-fwuploader) tool provides these functionalities for the IDE.
So if you like, you could just ignore the notifications. If you are annoyed by them, there is a way to disable the checks in the advanced settings. I'll provide instructions for that:
Press the Ctrl +Shift +P keyboard shortcut (Command +Shift +P for macOS users) to open the "Command Palette ".
Select the "Preferences: Open Settings (UI) " command from the menu.
A "Preferences " tab will now open. Type arduino.checkForUpdates
in the "Search Settings " field.
Uncheck the checkbox under the "Check For Updates " setting.
Click the X icon on the "Preferences " tab to close the tab.
Please let me know if you have experienced any other problems caused by not having a connection to the Internet. I think it is important for the design of the IDE to allow for this use case. It is easy for us to make the assumption that Internet is always available, since that is likely the case in the environment the IDE is developed and tested in, but of course that will not always be so for the users.
Hi Ptillisch and thank you for your quick and comprehensive response.
Your instructions did the job: no more notifications (I'm using ESP32 so no problems with certificates ...)
Having said that, in my personal opinion I think it would be appropriate if in the future there was a button for "manual update" or "automatic updates" in the File -> Preferences menu, useful for use with "metered connections".
Thanks again and good day to all of you of the Arduino team.
Pippo_75:
Having said that, in my personal opinion I think it would be appropriate if in the future there was a button for "manual update" or "automatic updates" in the File -> Preferences menu, useful for use with "metered connections".
There is an option to manually check for updates; it's however not in preferences. Follow step 1 above and type check for . You get two options, the first one for the IDE and the second one for libraries and boards.
There is a bug for the first one that has been logged by @ptillisch ; see Arduino IDE 2.0.0 available for download! - #5 by sterretje
system
Closed
March 24, 2023, 5:30am
5
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.