You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
General issue : There was no upgrade path to the target dbscheme #12331
Running quick query on CodeQL VS Extension gives There was no upgrade path to the target dbscheme
I have downloaded CodeQL database from LGTM portal.
In VSCode CodeQL Extension, added database from the archive.
Ran CodeQL: Quick Query
There was no upgrade path to the target dbscheme
Failed to run query: There was no upgrade path to the target dbscheme.
I have tried running codeql upgrade database also in cli.
However, if I try CodeQL: Upgrade Current Database, it failes
Internal error. (codeQL.upgradeCurrentDatabase)
Error: Internal error.
at handleResponse (c:\Users\<>\.vscode\extensions\github.vscode-codeql-1.7.10\out\extension.js:4399:40)
at processMessageQueue (c:\Users\<>\.vscode\extensions\github.vscode-codeql-1.7.10\out\extension.js:4222:13)
at Immediate.<anonymous> (c:\Users\<>\.vscode\extensions\github.vscode-codeql-1.7.10\out\extension.js:4208:11)
at processImmediate (node:internal/timers:466:21)
That said, most likely the combination of the version of the CodeQL CLI used to create the database, the version of the QL libraries used by your query, and the version of the CodeQL CLI used by VSCode do not work together.
Could you post:
the language of the database/query
the contents of the creationMetadata: property in the codeql-database.yml file in the database
the version of the CodeQL CLI you are using
the version of the QL libraries you are using (or the commit SHA of the github/codeql repo, or github/vscode-codeql-starter, depending on from where you got the libraries)
the version of the QL libraries you are using (or the commit SHA of the github/codeql repo, or github/vscode-codeql-starter, depending on from where you got the libraries)
Is there anyother place to visualize query outputs ? Tried Query Console also, for testing custom queries, my queries have been running for hours only with 0% progress
If that does not work you can try downgrading everything to match version 2.8.4 .
Could you also post the output of cat database_folder/db-csharp/semmlecode.csharp.dbscheme | git hash-object --stdin ? If the output of that command is not present in the list of upgrades in https://github.com/github/codeql/tree/main/csharp/ql/lib/upgrades could you attach the contents of semmlecode.csharp.dbscheme?
Regarding LGTM support, is there any alternative for sharing queries and outputs?
The VScode IDE for CodeQL has a feature named "Variant analysis" that can be used to run a query against many repositories. It also allows exporting (all or some) results to a "gist" for sharing with others, for example: https://github.com/proxy/gist.github.com/aibaars/9f25acb1dcc81b4731d9781b955d3ddd#file-result-1-roo-rb-roo-md . The feature is currently in beta and can be enabled by setting "codeQL.canary": true, in VSCode's settings.json.
Alternatively, you can use the CodeQL CLI to produce a SARIF file.
Activity
aibaars commentedon Feb 28, 2023
LGTM is no longer a supported product.
That said, most likely the combination of the version of the CodeQL CLI used to create the database, the version of the QL libraries used by your query, and the version of the CodeQL CLI used by VSCode do not work together.
Could you post:
creationMetadata:property in thecodeql-database.ymlfile in the databaseshashwattrivedi commentedon Feb 28, 2023
the language of the database/query
csharp
the contents of the creationMetadata: property in the codeql-database.yml file in the database
creationMetadata:
sha: "6fa4f9de47bd0fdeb92f0e3b651caf596c5e2d92"
cliVersion: "2.8.4+202205171209"
creationTime: "2023-02-22T06:07:14.490034200Z"
CodeQL extension version: 1.7.10
CodeQL CLI version: 2.12.0
Platform: win32 x64
2dbacbc
Is there anyother place to visualize query outputs ? Tried Query Console also, for testing custom queries, my queries have been running for hours only with 0% progress
aibaars commentedon Feb 28, 2023
Thanks,
2.8.4+202205171209looks like this is some custom build of 2.8.4. Hopefully, that is not the problem.Could you try downgrading your QL libraries to https://github.com/github/codeql/releases/tag/codeql-cli%2Fv2.12.0 to match the CodeQL version used by VSCode? Alternatively, you can try updating the CodeQL CLI used by VSCode to 2.12.3.
If that does not work you can try downgrading everything to match version 2.8.4 .
Could you also post the output of
cat database_folder/db-csharp/semmlecode.csharp.dbscheme | git hash-object --stdin? If the output of that command is not present in the list of upgrades in https://github.com/github/codeql/tree/main/csharp/ql/lib/upgrades could you attach the contents ofsemmlecode.csharp.dbscheme?shashwattrivedi commentedon Feb 28, 2023
Thanks @aibaars , after upgrading the QL library to latest commit, it started working. Appreciate your quick responses.
We can close this issue.
Regarding LGTM support, is there any alternative for sharing queries and outputs?
aibaars commentedon Feb 28, 2023
"codeQL.canary": true,in VSCode'ssettings.json.shashwattrivedi commentedon Mar 1, 2023
Thanks
g3rzi commentedon Nov 25, 2024
I had similar issue, the problem is my case was an issue with the extension and the CLI versions.

I solved it by going to the CodeQL CLI GitHub and download a new CLI version:
https://github.com/github/codeql-cli-binaries
After doing it, it works.