Closed mortenfc closed 3 months ago
@mortenfc Thanks for the issue, could you try out this vsix (change from .zip to .vsix and install)? cmake-tools.zip
Yeah it no longer crashes <3 Just prints the original error in log:
Output -> Cmake/Build:
[cmakefileapi-parser] Read reply folder: <HIDDEN>/.cmake/api/v1/reply
[cmakefileapi-parser] Found index files: [bunch of "*.json",]
[rollbar] Unhandled exception: Unhandled Promise rejection: Post-folder-open Error: No cache object found [object Object]
Output -> Extension Host (Remote) :
2024-08-13 20:09:50.658 [info] ExtensionService#_doActivateExtension ms-vscode.cmake-tools, startup: true, activationEvent: 'workspaceContains:CMakeLists.txt'
Also tried updating the extension to make sure I installed it correctly and it fixed the crash:
Output -> Extension Host (Remote) :
2024-08-13 20:15:32.023 [error] TypeError: Converting circular structure to JSON
--> starting at object with constructor 'Object'
| property 'configurePresets' -> object with constructor 'Array'
| index 0 -> object with constructor 'Object'
--- property '__file' closes the circle
at JSON.stringify (<anonymous>)
at RollbarController.exception (/home/mfjordchris/.vscode-server/extensions/ms-vscode.cmake-tools-1.19.38/dist/main.js:113371:60)
at /home/mfjordchris/.vscode-server/extensions/ms-vscode.cmake-tools-1.19.38/dist/main.js:113415:38
BTW I have these settings for it:
// CMAKE settings
"cmake.ctest.allowParallelJobs": true,
"cmake.ctest.parallelJobs": 16,
"cmake.loggingLevel": "debug",
"cmake.enableTraceLogging": true,
"cmake.exportCompileCommandsFile": true,
"cmake.loadCompileCommands": true,
"cmake.configureOnEdit": false,
"cmake.configureOnOpen": true,
"cmake.parallelJobs": 16,
"cmake.buildArgs": [
"--parallel 16"
],
"cmake.pinnedCommands": [
"workbench.action.tasks.configureTaskRunner",
"workbench.action.tasks.runTask"
],
"cmake.showOptionsMovedNotification": false,
"cmake.options.statusBarVisibility": "hidden",
"cmake.options.advanced": {
"buildTarget": {
"statusBarVisibility": "visible"
},
},
"cmake.showConfigureWithDebuggerNotification": false,
"cmake.automaticReconfigure": true,
"cmake.useCMakePresets": "always",
Wait I tried installing the .vsix again, now the error is in Extension Host (Remote) window instead:
2024-08-13 20:18:32.129 [error] Error: No cache object found
at CMakeFileApiDriver.updateCodeModel (/home/mfjordchris/.vscode-server/extensions/ms-vscode.cmake-tools-1.13.0/dist/main.js:100232:23)
at async CMakeFileApiDriver.doInit (/home/mfjordchris/.vscode-server/extensions/ms-vscode.cmake-tools-1.13.0/dist/main.js:100046:38)
at async CMakeFileApiDriver._baseInit (/home/mfjordchris/.vscode-server/extensions/ms-vscode.cmake-tools-1.13.0/dist/main.js:99604:9)
at async CMakeFileApiDriver.createDerived (/home/mfjordchris/.vscode-server/extensions/ms-vscode.cmake-tools-1.13.0/dist/main.js:99611:9)
at async CMakeProject.startNewCMakeDriver (/home/mfjordchris/.vscode-server/extensions/ms-vscode.cmake-tools-1.13.0/dist/main.js:89126:27)
at async /home/mfjordchris/.vscode-server/extensions/ms-vscode.cmake-tools-1.13.0/dist/main.js:89392:21
at async /home/mfjordchris/.vscode-server/extensions/ms-vscode.cmake-tools-1.13.0/dist/main.js:114702:36
2024-08-13 20:18:34.187 [error] Error: No cache object found
at CMakeFileApiDriver.updateCodeModel (/home/mfjordchris/.vscode-server/extensions/ms-vscode.cmake-tools-1.13.0/dist/main.js:100232:23)
at async CMakeFileApiDriver.doInit (/home/mfjordchris/.vscode-server/extensions/ms-vscode.cmake-tools-1.13.0/dist/main.js:100046:38)
at async CMakeFileApiDriver._baseInit (/home/mfjordchris/.vscode-server/extensions/ms-vscode.cmake-tools-1.13.0/dist/main.js:99604:9)
at async CMakeFileApiDriver.createDerived (/home/mfjordchris/.vscode-server/extensions/ms-vscode.cmake-tools-1.13.0/dist/main.js:99611:9)
at async CMakeProject.startNewCMakeDriver (/home/mfjordchris/.vscode-server/extensions/ms-vscode.cmake-tools-1.13.0/dist/main.js:89126:27)
at async /home/mfjordchris/.vscode-server/extensions/ms-vscode.cmake-tools-1.13.0/dist/main.js:89392:21
at async /home/mfjordchris/.vscode-server/extensions/ms-vscode.cmake-tools-1.13.0/dist/main.js:114702:36
2024-08-13 20:18:37.748 [error] Error: No cache object found
at CMakeFileApiDriver.updateCodeModel (/home/mfjordchris/.vscode-server/extensions/ms-vscode.cmake-tools-1.13.0/dist/main.js:100232:23)
at async CMakeFileApiDriver.doInit (/home/mfjordchris/.vscode-server/extensions/ms-vscode.cmake-tools-1.13.0/dist/main.js:100046:38)
at async CMakeFileApiDriver._baseInit (/home/mfjordchris/.vscode-server/extensions/ms-vscode.cmake-tools-1.13.0/dist/main.js:99604:9)
at async CMakeFileApiDriver.createDerived (/home/mfjordchris/.vscode-server/extensions/ms-vscode.cmake-tools-1.13.0/dist/main.js:99611:9)
at async CMakeProject.startNewCMakeDriver (/home/mfjordchris/.vscode-server/extensions/ms-vscode.cmake-tools-1.13.0/dist/main.js:89126:27)
at async /home/mfjordchris/.vscode-server/extensions/ms-vscode.cmake-tools-1.13.0/dist/main.js:89392:21
at async /home/mfjordchris/.vscode-server/extensions/ms-vscode.cmake-tools-1.13.0/dist/main.js:114702:36
@mortenfc I'm not sure I fully understand, so you're saying that the stringify issue is solved, but then you're seeing other errors?
Looking at the code, we throw the error "No cache object found" when we don't find the cache in the cmake fileAPI response. Have you tried running "CMake: Delete Cache and Reconfigure"? Or even deleting your whole build folder and reconfiguring? This issue doesn't feel related to the rollbar
Yes, I got that error instead. I no longer get it after I built a few times. Uncaught errors seem bad, though.
"No cache object found" was the pop up message in the initial ticket, probably caused by the JSON.stringify extension runtime thing
2024-05-29 10:32:12.193 [error] Error: Extension 'ms-vscode.cmake-tools' CANNOT use API proposal: extensionRuntime.
Its package.json#enabledApiProposals-property declares: [] but NOT extensionRuntime.
The missing proposal MUST be added and you must start in extension development mode or use the following command line switch: --enable-proposed-api ms-vscode.cmake-tools
at y (/home/mfjordchris/.vscode-server/bin/dc96b837cf6bb4af9cd736aa3af08cf8279f7685/out/vs/workbench/api/node/extensionHostProcess.js:143:51558)
at get extensionRuntime [as extensionRuntime] (/home/mfjordchris/.vscode-server/bin/dc96b837cf6bb4af9cd736aa3af08cf8279f7685/out/vs/workbench/api/node/extensionHostProcess.js:161:12748)
at JSON.stringify (<anonymous>)
After install .vsix, it's no longer a pop up, just an error message in Output > Extension Host OR Cmake/Build
It's maybe not a popup because I Set these
"cmake.showOptionsMovedNotification": false, "cmake.showConfigureWithDebuggerNotification": false,
@mortenfc Those settings are unrelated to this.
To summarize what I think I'm understanding is that, yes, we should likely create a separate bug to handle any uncaught errors, but for this one, it sounds like it will be resolved with #3985, as it fixes the crashing issue. Would that be correct?
I don't know, I just know that the .zip you attached to this issue solved the Stringify problem.
I don't know, I just know that the .zip you attached to this issue solved the Stringify problem.
Perfect, that PR I linked is the change I built into that .zip file.
@gcampbell-msft, according the customer's latest comment, The .zip you attached to this issue solved the Stringify problem. Cold we close this issue now? Thank in advance.
before the change (1.18.44):
After the change (1.19.37):
Originally posted by @mortenfc in https://github.com/microsoft/vscode-cmake-tools/issues/3797#issuecomment-2273812301