Skip to content
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

Creating skeleton query pack logs error #3219

Closed
Marcono1234 opened this issue Jan 10, 2024 · 1 comment · Fixed by #3323
Closed

Creating skeleton query pack logs error #3219

Marcono1234 opened this issue Jan 10, 2024 · 1 comment · Fixed by #3323
Labels
bug Something isn't working VSCode

Comments

@Marcono1234
Copy link
Contributor

Marcono1234 commented Jan 10, 2024

Describe the bug
When creating a skeleton query pack using the extension, the following error is logged to the "CodeQL Extension Log":

Could not create skeleton QL pack: Parsing output of Adding and installing java pack dependency. failed: Unexpected token 'P', "Package in"... is not valid JSON

However, it seems adding the pack was actually successful, but the extension erroneously expected JSON output from the CodeQL CLI when the output seems to be plaintext (?).

Version
Extension:

CodeQL extension version: 1.11.0 
CodeQL CLI version: 2.15.5 
Platform: win32 x64

VS Code:

Version: 1.85.1 (user setup)
Commit: 0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2
Date: 2023-12-13T09:49:37.021Z
Electron: 25.9.7
ElectronBuildId: 25551756
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Windows_NT x64 10.0.19045

To reproduce

  1. Open a new empty folder with VS Code
  2. In the CodeQL tab under "Queries" click "Create one to get started", or alternatively run the command "> CodeQL: Create Query"
  3. Select "Java" as language
  4. Open the "CodeQL Extension Log" and scroll to the end
    ❌ Bug: You see the error mentioned above being logged

Expected behavior
No error should be logged

Additional context
In general the query pack logging output seems to be quite verbose. Is that intended?
Probably not a big problem though because I assume users are normally not expected to look at "CodeQL Extension Log" except for troubleshooting.

@Marcono1234 Marcono1234 added the bug Something isn't working label Jan 10, 2024
@shati-patel
Copy link
Contributor

Thank you for the issue @Marcono1234! You're right that we're incorrectly expecting JSON output in the packAdd command.

We'll take a proper look when time permits 👀

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

Successfully merging a pull request may close this issue.

2 participants