inmanta / vscode-inmanta

Inmanta plugin for Visual Code
Apache License 2.0
2 stars 1 forks source link

Environment selection is sometimes unresponsive when opening an untrusted vs-code workspace #1197

Closed Hugo-Inmanta closed 1 year ago

Hugo-Inmanta commented 1 year ago

When opening a folder for the first time, vs-code asks whether to trust it or not.

The python extension fails to start and the environment selection functionalities are not working

Steps to reproduce: In debug mode, opening an untrusted folder and clicking on "Yes, I trust the authors" slowly (>1s after the window pops up). If you click on it fast enough the issue doesn't arise when debugging the extension.

rejected promise not handled within 1 second: Error: Client is not running
extensionHostProcess.js:104
stack trace: Error: Client is not running
    at S.sendNotification (/home/hugo/.vscode/extensions/ms-python.python-2023.8.0/out/client/extension.js:2:2035431)
    at /home/hugo/.vscode/extensions/ms-python.python-2023.8.0/out/client/extension.js:2:37140
    at v.invoke (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:63:145)
    at h.deliver (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:63:2121)
    at i.fire (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:63:1729)
    at e.ExtHostWorkspace.$onDidGrantWorkspaceTrust (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:111:20525)
    at a.N (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:110:11620)
    at a.M (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:110:11338)
    at a.H (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:110:10431)
    at a.G (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:110:9412)
    at /usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:110:8200
    at v.invoke (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:63:145)
    at h.deliver (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:63:2121)
    at i.fire (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:63:1729)
    at g.fire (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:72:14852)
    at /usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:126:32403
    at v.invoke (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:63:145)
    at h.deliver (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:63:2121)
    at i.fire (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:63:1729)
    at g.fire (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:72:14852)
    at MessagePortMain.<anonymous> (/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:126:30529)
    at MessagePortMain.emit (node:events:513:28)
    at MessagePortMain._internalPort.emit (node:electron/js2c/utility_init:2:367)
    at Object.callbackTrampoline (node:internal/async_hooks:130:17)

Related issue: https://github.com/microsoft/vscode-python/issues/20367

Workaround: Open the folder once, trust it when prompted so, close and re-open the editor.

sanderr commented 1 year ago

discussed in planning meeting:

Hugo-Inmanta commented 1 year ago

Follow-up ticket over here -> https://github.com/inmanta/vscode-inmanta/issues/1206