Skip to content

Extension shows error for codeQLDatabases.removeOrphanedDatabases when no databases exist #760

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
Marcono1234 opened this issue Feb 20, 2021 · 1 comment
Labels
bug Something isn't working VSCode

Comments

@Marcono1234
Copy link
Contributor

Describe the bug
It appears when opening CodeQL files, but never having built any databases, the extension shows an error message:

ENOENT: no such file or directory, stat '###\Code\User\workspaceStorage\505df5a16e721d7d38a7abed961a5b07\GitHub.vscode-codeql' (codeQLDatabases.removeOrphanedDatabases)

(### representing manually redacted information)

Full log output:

Starting GitHub.vscode-codeql extension
Searching for latest release including codeql-win64.zip.
INFO: Ignoring a release with no assets named codeql-win64.zip
INFO: Ignoring a release with no assets named codeql-win64.zip
INFO: Ignoring a release with no assets named codeql-win64.zip
INFO: Ignoring a release with no assets named codeql-win64.zip
INFO: Ignoring a release with no assets named codeql-win64.zip
INFO: Ignoring a release with no assets named codeql-win64.zip
INFO: Ignoring a release with no assets named codeql-win64.zip
INFO: Ignoring a release with no assets named codeql-win64.zip
INFO: Ignoring a release with no assets named codeql-win64.zip
INFO: Ignoring a release with no assets named codeql-win64.zip
INFO: Ignoring a release with no assets named codeql-win64.zip
INFO: Ignoring a release with no assets named codeql-win64.zip
INFO: Ignoring a release with no assets named codeql-win64.zip
Checking CodeQL version using CodeQL CLI: ###\Code\User\globalStorage\github.vscode-codeql\distribution8\codeql\codeql.exe version -v --log-to-stderr --format=terse...
[2021-02-20 23:34:11] This is codeql version -v --log-to-stderr --format=terse
[2021-02-20 23:34:11] Terminating normally.

CLI command succeeded.
CodeQL CLI already up to date.
Checking CodeQL version using CodeQL CLI: ###\Code\User\globalStorage\github.vscode-codeql\distribution8\codeql\codeql.exe version -v --log-to-stderr --format=terse...
[2021-02-20 23:34:12] This is codeql version -v --log-to-stderr --format=terse
[2021-02-20 23:34:12] Terminating normally.

CLI command succeeded.
Found compatible version of CodeQL CLI (version 2.4.4)
Initializing configuration listener...
Initializing CodeQL cli server...
Initializing query server client.
Checking CodeQL version using CodeQL CLI: ###\Code\User\globalStorage\github.vscode-codeql\distribution8\codeql\codeql.exe version -v --log-to-stderr --format=terse...
Starting CodeQL CLI Server using CodeQL CLI: ###\Code\User\globalStorage\github.vscode-codeql\distribution8\codeql\codeql.exe execute cli-server -v --log-to-stderr
CodeQL CLI Server started on PID: 10108
Resolving RAM settings using CodeQL CLI: resolve ram -v --log-to-stderr --format json...
[2021-02-20 23:34:13] This is codeql version -v --log-to-stderr --format=terse
[2021-02-20 23:34:13] Terminating normally.

CLI command succeeded.
CLI command succeeded.
[2021-02-20 23:34:13] This is codeql execute cli-server -v --log-to-stderr

Initializing database manager.
Initializing database panel.
Registering database panel commands.
Initializing query history manager.
Registering query history panel commands.
Initializing results panel interface.
Initializing compare panel interface.
Initializing source archive filesystem provider.
Initializing CodeQL language server.
Initializing QLTest interface.
Registering CodeQL test panel commands.
Registering top-level command palette commands.
Starting language server.
Registering jump-to-definition handlers.
Removing orphaned databases from workspace storage.
Successfully finished extension initialization.
Resolving tests using CodeQL CLI: resolve tests --strict-test-discovery -v --log-to-stderr --format json ###\codeql\java...
ENOENT: no such file or directory, stat '###\Code\User\workspaceStorage\505df5a16e721d7d38a7abed961a5b07\GitHub.vscode-codeql' (codeQLDatabases.removeOrphanedDatabases)
Error: ENOENT: no such file or directory, stat '###\Code\User\workspaceStorage\505df5a16e721d7d38a7abed961a5b07\GitHub.vscode-codeql'
CLI command succeeded.

To Reproduce

  1. Clone the CodeQL repository https://github.com/github/codeql
  2. In VSCode: "File" > "Open Folder..." > Choose any subfolder of the cloned repository, e.g. codeql/java
  3. In VSCode: Open any .ql or .qll file from the folder you opened (do not do anything else)
    ❌ After a short while the error is shown

Expected behavior
The extension should not encounter an error if there is not database to remove.

@Marcono1234 Marcono1234 added the bug Something isn't working label Feb 20, 2021
@aeisenberg
Copy link
Contributor

Thanks for reporting. This issue has already been fixed in #748 and will be available in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working VSCode
Projects
None yet
Development

No branches or pull requests

2 participants