Description
Describe the bug
Arduino IDE now has an auto update capability (#797).
This consists of two important components:
- A check for and notification of available updates.
- Installation of updates upon approval from the user.
🐛 The IDE is downloading the available update before asking the user whether they want it.
To Reproduce
-
Start the IDE.
-
Open the "Command Palette".
(Ctrl+Shift+P or Command+Shift+P by default) -
Run the "Preferences: Open Settings (UI)" command.
-
Change the "Arduino › Ide: Update Channel" (
arduino.ide.updateChannel
) setting to "nightly".
(updates from "stable" channel are currently failing: The built-in IDE updater does not work with my snapshot build #843) -
Select File > Quit from the Arduino IDE menus.
(This is necessary because the channel setting change is only recognized after a restart: Update channel setting change recognized only after IDE restart #847) -
Delete the
%LOCALAPPDATA%/arduino-ide-updater
folder.
(This is done to prove that the file you find there later did not already exist.) -
Start the IDE from command line.
-
Wait a long time.
(because it is a big download) -
Check the command line output.
🐛 The output shows that the IDE was downloaded:Checking for update [...] Cannot download differentially, fallback to full download: Error: Cannot download "https://downloads.arduino.cc/arduino-ide/nightly/arduino-ide_nightly-20220219_Windows_64bit.exe.blockmap", status 404: at ClientRequest.<anonymous> (C:\ide 2\arduino-ide_2.0.0-rc4-snapshot-101d7b9_Windows_64bit\resources\app\node_modules\electron-updater\node_modules\builder-util-runtime\out\httpExecutor.js:229:34) at ClientRequest.emit (node:events:394:28) at SimpleURLLoaderWrapper.<anonymous> (node:electron/js2c/browser_init:105:6816) at SimpleURLLoaderWrapper.emit (node:events:394:28) [...] New version 2.0.0-rc4-nightly.20220219-nightly-20220219 has been downloaded to C:\Users\per\AppData\Local\arduino-ide-updater\pending\arduino-ide_nightly-20220219_Windows_64bit.exe
-
Check the contents of
%LOCALAPPDATA%/arduino-ide-updater/pending
🐛 The folder contains a new ~160 MB file. -
Delete the
%LOCALAPPDATA%/arduino-ide-updater
folder.
(This is done to prove that the file you find there later did not already exist.) -
Open the "Command Palette".
-
Run the "Arduino: Check for Arduino IDE updates" command.
🐛 The output shows that the IDE was downloaded:Checking for update Found version 2.0.0-rc4-nightly.20220219-nightly-20220219 (url: arduino-ide_nightly-20220219_Windows_64bit.exe) Downloading update from arduino-ide_nightly-20220219_Windows_64bit.exe Download block maps (old: "https://downloads.arduino.cc/arduino-ide/nightly/arduino-ide_nightly-20220219_Windows_64bit.exe.blockmap", new: https://downloads.arduino.cc/arduino-ide/nightly/arduino-ide_nightly-20220219_Windows_64bit. exe.blockmap) Cannot download differentially, fallback to full download: Error: Cannot download "https://downloads.arduino.cc/arduino-ide/nightly/arduino-ide_nightly-20220219_Windows_64bit.exe.blockmap", status 404: at ClientRequest.<anonymous> (C:\ide 2\arduino-ide_2.0.0-rc4-snapshot-101d7b9_Windows_64bit\resources\app\node_modules\electron-updater\node_modules\builder-util-runtime\out\httpExecutor.js:229:34) at ClientRequest.emit (node:events:394:28) at SimpleURLLoaderWrapper.<anonymous> (node:electron/js2c/browser_init:105:6816) at SimpleURLLoaderWrapper.emit (node:events:394:28) New version 2.0.0-rc4-nightly.20220219-nightly-20220219 has been downloaded to C:\Users\per\AppData\Local\arduino-ide-updater\pending\arduino-ide_nightly-20220219_Windows_64bit.exe
-
Check the contents of
%LOCALAPPDATA%/arduino-ide-updater/pending
🐛 The folder contains a new ~160 MB file.
Expected behavior
The update check only checks to see if an update is available.
The IDE download should occur only after the user approves the update by clicking the Download button on the update dialog:
Desktop
- OS: Windows 10
- Version: 2.0.0-rc4-snapshot-101d7b9
Date: 2022-02-18T16:03:36.097Z
CLI Version: 0.21.0 [10107d24]