-
-
Notifications
You must be signed in to change notification settings - Fork 47
Description
Describe the bug
👋 Hey there, thanks for all the hard work on this extension! I'm seeing the following error when I attempt to open a preview using command+shift+p.
2022-11-27 09:56:40.704 [error] TypeError: The "path" argument must be of type string. Received undefined
at new NodeError (node:internal/errors:371:5)
at validateString (node:internal/validators:120:11)
at Object.dirname (node:path:1276:5)
at a (/home/leigh/.vscode/extensions/asyncapi.asyncapi-preview-0.4.0/dist/extension.js:1:179602)
at /home/leigh/.vscode/extensions/asyncapi.asyncapi-preview-0.4.0/dist/extension.js:1:181584
at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
at async s._executeContributedCommand (/snap/code/113/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:92:111367) asyncapi.preview {"value":"asyncapi.asyncapi-preview","_lower":"asyncapi.asyncapi-preview"}
VS Code version:
Version: 1.73.1
Commit: 6261075646f055b99068d3688932416f2346dd3b
Date: 2022-11-09T03:54:53.913Z
Electron: 19.0.17
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Linux x64 5.15.0-53-generic snap
Sandboxed: No
How to Reproduce
-
Open an async API schema
-
Press control+shift+p or command+shift-p to open commands
-
Select
Preview AsyncAPI
command -
I'm getting prompted to open an AsyncAPI file, even though I already have one open in VS Code. I verified my schema is valid via https://studio.asyncapi.com/
-
After selecting the Async API schema again (even though it's already open in my editor), I'm seeing the following error:
In VSCode's Output
under Log (Extension Host)
I see the following error:
2022-11-27 10:05:00.129 [error] TypeError: The "path" argument must be of type string. Received undefined
at new NodeError (node:internal/errors:371:5)
at validateString (node:internal/validators:120:11)
at Object.dirname (node:path:1276:5)
at a (/home/leigh/.vscode/extensions/asyncapi.asyncapi-preview-0.4.0/dist/extension.js:1:179602)
at /home/leigh/.vscode/extensions/asyncapi.asyncapi-preview-0.4.0/dist/extension.js:1:181584
at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
at async s._executeContributedCommand (/snap/code/113/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:92:111367) asyncapi.preview {"value":"asyncapi.asyncapi-preview","_lower":"asyncapi.asyncapi-preview"}
Maybe the extension is unable to find an executable named asyncapi
? Unsure how to proceed or how this should be sandboxed. Thanks for looking into this! 🙇♀️
Expected behavior
File preview opens in a new panel.