Skip to content

General issue : There was no upgrade path to the target dbscheme #12331

Closed

Description

@shashwattrivedi

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)

Activity

  1. aibaars commented on Feb 28, 2023

    @aibaars
    Contributor

    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:

    • 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)
  2. shashwattrivedi commented on Feb 28, 2023

    @shashwattrivedi
    Author
    • 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"

    • the version of the CodeQL CLI you are using

    CodeQL extension version: 1.7.10
    CodeQL CLI version: 2.12.0
    Platform: win32 x64

    • 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)

    2dbacbc

    LGTM is no longer a supported product.

    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

  3. aibaars commented on Feb 28, 2023

    @aibaars
    Contributor

    Thanks, 2.8.4+202205171209 looks 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 of semmlecode.csharp.dbscheme?

  4. shashwattrivedi commented on Feb 28, 2023

    @shashwattrivedi
    Author

    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?

  5. aibaars commented on Feb 28, 2023

    @aibaars
    Contributor

    Regarding LGTM support, is there any alternative for sharing queries and outputs?

  6. shashwattrivedi commented on Mar 1, 2023

    @shashwattrivedi
    Author

    Thanks

  7. g3rzi commented on Nov 25, 2024

    @g3rzi

    I had similar issue, the problem is my case was an issue with the extension and the CLI versions.
    image

    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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions