Skip to content

CodeQL CLI download failure causes extension to get stuck #903

@Marcono1234

Description

@Marcono1234

Describe the bug
It appears when the download of the CodeQL CLI fails, e.g. due to network issues, the extension just gets stuck. No error dialog is shown and nothing is logged.

Have not tested whether this affects other download actions as well, such as downloading databases from LGTM.com.

Version
Extension:

CodeQL extension version: 1.5.1 
CodeQL CLI version: 2.5.7 
Platform: win32 x64

VSCode:

Version: 1.57.1 (user setup)
Commit: 507ce72a4466fbb27b715c3722558bb15afa9f48
Date: 2021-06-17T13:28:07.755Z
Electron: 12.0.7
Chrome: 89.0.4389.128
Node.js: 14.16.0
V8: 8.9.255.25-electron.0
OS: Windows_NT x64 10.0.19041

To reproduce

  1. If you already have CodeQL CLI downloaded:
    1. Open the CodeQL CLI download folder; on Windows %appdata%\Code\User\globalStorage\github.vscode-codeql
    2. Delete or rename the distribution folder
  2. Start VSCode
  3. Run the command >CodeQL: Check for CLI Updates
  4. While the download is in progress disconnect from the internet
    ❌ The progress gets stuck; nothing happens

Expected behavior
As soon as a download failure occurs the extension should inform the user, and permit restarting the download (currently not possible because current download is not properly cancelled on failure).

Additional context
Maybe error handling also has to be improved; the documentation for pipe says that the destination has to be closed manually on error; it looks like this is currently not done.

Metadata

Metadata

Assignees

No one assigned

    Labels

    VSCodebugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions