Skip to content

Updater downloads IDE without user approval #848

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
per1234 opened this issue Feb 20, 2022 · 0 comments · Fixed by #860
Closed

Updater downloads IDE without user approval #848

per1234 opened this issue Feb 20, 2022 · 0 comments · Fixed by #860
Assignees
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@per1234
Copy link
Contributor

per1234 commented Feb 20, 2022

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

  1. Start the IDE.

  2. Open the "Command Palette".
    (Ctrl+Shift+P or Command+Shift+P by default)

  3. Run the "Preferences: Open Settings (UI)" command.

  4. 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)

  5. 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)

  6. Delete the %LOCALAPPDATA%/arduino-ide-updater folder.
    (This is done to prove that the file you find there later did not already exist.)

  7. Start the IDE from command line.

  8. Wait a long time.
    (because it is a big download)

  9. 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
    
  10. Check the contents of %LOCALAPPDATA%/arduino-ide-updater/pending
    🐛 The folder contains a new ~160 MB file.

  11. Delete the %LOCALAPPDATA%/arduino-ide-updater folder.
    (This is done to prove that the file you find there later did not already exist.)

  12. Open the "Command Palette".

  13. 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
    
  14. 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:

image

Desktop

  • OS: Windows 10
  • Version: 2.0.0-rc4-snapshot-101d7b9
    Date: 2022-02-18T16:03:36.097Z
    CLI Version: 0.21.0 [10107d24]
@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Feb 20, 2022
@per1234 per1234 added the conclusion: resolved Issue was resolved label Feb 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants