Skip to content

Infinite update loop: launcher keeps re-downloading the same update on every startup #2

Description

@zuevta

Describe the bug
The portable launcher (VSCodePortable.exe) re-downloads and re-installs the exact same VS Code update every time I start the application. After the update is downloaded and applied, the launcher successfully starts the updated version (e.g., 1.133.0). However, when I close VS Code and launch it again, the launcher again detects the same update, downloads it, and repeats the cycle indefinitely. This happens regardless of how many times I restart.

To Reproduce

  1. Launch VSCodePortable.exe with UpdateCheck=true in VSCodePortable.ini.
  2. The launcher shows a banner "Checking for updates..." and downloads the latest version (e.g., 1.133.0).
  3. After download, the launcher extracts the files and starts VS Code normally.
  4. Close VS Code completely (ensure no code.exe processes remain in Task Manager).
  5. Launch VSCodePortable.exe again.
  6. The launcher again finds the same update and re-downloads it, repeating the process.

Expected behavior
The launcher should download the update only once, apply it, and then remember the current version. On subsequent launches, it should detect that the installed version is up-to-date and not perform any download.

Actual behavior
The update is downloaded and applied every single time, leading to unnecessary downloads and long startup times.

Versions

  • Launcher: VSCodePortable.exe version 1.131.0.0 (as shown in file properties).
  • VS Code after update: 1.133.0 (Commit: a5b500951314efd502d07465bd138dfbd714a960).
  • OS: Windows 10/11 (please specify yours if different).
  • Configuration: UpdateCheck=true (default). The issue does not occur when UpdateCheck=false is set, which confirms the bug is in the update-check logic.

Additional context

  • The launcher seems to not update its internal version record after a successful installation. Even though the actual files in App\VSCode are replaced with the new version, the launcher still believes the old version is installed.
  • I have tried removing the App\VSCode folder manually and letting the launcher re-download the whole VS Code – the problem persists, so it's not a partial download or corruption.
  • I have verified that no code.exe processes are left running before each launch, so file locking is not the issue.
  • The issue might be related to how the launcher reads the installed version from product.json (or similar) and compares it with the latest available version. Possibly the version comparison logic fails, or the version is not persisted correctly after extraction.

Suggested fix

  • The launcher should read the actual installed version from the App\VSCode\resources\app\product.json file (or another reliable source) after each update and store it in a local cache file (e.g., Data\version.txt) to avoid re-downloading.
  • Alternatively, the launcher could compare the installed version with the latest available version using the VS Code API; if they match, skip the download.
  • Ensure that the update process also updates the launcher's internal version marker (if any) so that future checks see the correct state.

Workaround

  • For now, I've disabled UpdateCheck in VSCodePortable.ini, but this means I must manually update the portable edition by replacing the App\VSCode folder with a new ZIP.

Would you like me to provide more details (logs, screenshots)? I'm happy to help test a fix if you need.


This issue description was composed with the assistance of DeepSeek, an AI assistant, but the problem has been verified manually.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions