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

No cache object found at startup #4066

Open
gserm opened this issue Sep 14, 2024 · 1 comment
Open

No cache object found at startup #4066

gserm opened this issue Sep 14, 2024 · 1 comment
Labels
more info needed More info is needed from the community for us to properly triage and investigate.

Comments

@gserm
Copy link

gserm commented Sep 14, 2024

Brief Issue Summary

I have a project with cmake presets. Starting with a clean slate (before any configuration or preset selection in vscode), use a terminal to create a client stateless query under the build directory of a given preset
mkdir -p </path/to/build/folder>/.cmake/api/v1/query/client-foo/
touch </path/to/build/folder>/.cmake/api/v1/query/client-foo/codemodel-v2
and then configure the project
cmake --preset <preset> -B </path/to/build/folder>
As expected, at the end of the configuration CMake will have generated certain reply files under </path/to/build/folder>/.cmake/api/v1/reply.
Now launch vscode, open the project and select the same preset as above, you'll see the following message:
[rollbar] Unhandled exception: Unhandled Promise rejection: Post-folder-open Error: No cache object found [object Object]
At that point, the cmake tools extension doesn't display any items.

The issue seems similar to #2882

CMake Tools Diagnostics

{
  "os": "darwin",
  "vscodeVersion": "1.93.1",
  "cmtVersion": "1.19.51",
  "configurations": [
    {
      "folder": "/Users/gsr68/Source/QtApp",
      "cmakeVersion": "unknown",
      "configured": false,
      "generator": "unknown",
      "usesPresets": false,
      "compilers": {}
    }
  ],
  "cpptoolsIntegration": {
    "isReady": false,
    "hasCodeModel": false,
    "activeBuildType": "",
    "buildTypesSeen": [],
    "requests": [],
    "responses": [],
    "partialMatches": [],
    "targetCount": 0,
    "executablesCount": 0,
    "librariesCount": 0,
    "targets": []
  },
  "settings": [
    {
      "communicationMode": "automatic",
      "useCMakePresets": "auto",
      "configureOnOpen": true
    }
  ]
}

Debug Log

No response

Additional Information

No response

@Amy-Li03
Copy link
Collaborator

I'm sorry that you are encountering this issue, could you please try following steps to troubleshoot the issue:

  1. Check if you have any other extensions installed, if yes, please try disabling them temporarily to see if the error persists.

  2. You can try deleting cache-related files VS code might be using:

  • For Windows: %APPDATA%\Code\Cache

  • For macOS: ~/Library/Application Support/Code/Cache

  • For Linux: ~/.config/Code/Cache

  1. Check the settings.json for any caching-related configurations.
  2. Set the cmake.loggingLevel to "debug" and look for "Failed writing to file" in the Output Window.

@Yingzi1234 Yingzi1234 added more info needed More info is needed from the community for us to properly triage and investigate. and removed triage labels Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more info needed More info is needed from the community for us to properly triage and investigate.
Projects
Status: Blocked
Development

No branches or pull requests

3 participants