microsoft / vscode-test

Testing utility for VS Code extensions
MIT License
246 stars 59 forks source link

ENOENT Error Running Tests with VSCode 1.85.1 #251

Closed znorman-harris closed 11 months ago

znorman-harris commented 11 months ago

I tried to run my integration tests today and, after the test runner downloaded the latest version of VSCode, I get this error when it tries to launch VSCode and run my tests:

Downloading VS Code 1.85.1 from https://update.code.visualstudio.com/1.85.1/win32-x64-archive/stable
Downloading VS Code [==============================] 100%
Downloaded VS Code into C:\Users\znorman\Documents\node\vscode-idl-true\.vscode-test\vscode-win32-x64-archive-1.85.1

Downloaded VS Code into C:\Users\znorman\Documents\node\vscode-idl-true\.vscode-test\vscode-win32-x64-archive-1.85.1
Test error: Error: spawn C:\Users\znorman\Documents\node\vscode-idl-true\.vscode-test\vscode-win32-x64-archive-1.85.1\Code.exe ENOENT
Exit code:   -4058

When I hard-code the VSCode version to 1.85.0 it works just fine, starts VSCode, and runs my tests.

I'm using Windows 11 and am using 2.3.8 of @vscode/test-electron.

Happy to provide anything else to help track down what's going on.

debonte commented 11 months ago

I'm seeing the same or similar problem. Download succeeds. resolveCliArgsFromVSCodeExecutablePath returns

["D:\a\pyrx\pyrx\packages\vscode-pylance\.vscode-test\vscode-win32-x64-archive-1.85.1\bin\code.cmd",
 "--extensions-dir=D:\a\pyrx\pyrx\packages\vscode-pylance\.vscode-test\extensions",
 "--user-data-dir=D:\a\pyrx\pyrx\packages\vscode-pylance\.vscode-test\user-data"]

But D:\a\pyrx\pyrx\packages\vscode-pylance\.vscode-test\vscode-win32-x64-archive-1.85.1\bin doesn't exist. It's parent directory (D:\a\pyrx\pyrx\packages\vscode-pylance\.vscode-test\vscode-win32-x64-archive-1.85.1) does exist and code.cmd is present there.

Installing an extension fails with:

Python extension install result -- status: null, signal: null error: Error: spawnSync D:\a\pyrx\pyrx\packages\vscode-pylance\.vscode-test\vscode-win32-x64-archive-1.85.0\bin\code.cmd ENOENT
debonte commented 11 months ago

Upgrading to 2.3.8 fixed my issue. Sorry for the distraction.

connor4312 commented 11 months ago

@znorman-harris are you certain you updated to 2.3.8? Can you verify the contents of node_modules/@vscode/test-electron/package.json?

znorman-harris commented 11 months ago

I can confirm that it is 2.3.8! And it seems to be working now for some reason. I guess we can close this?

Downloading VS Code 1.85.1 from https://update.code.visualstudio.com/1.85.1/win32-x64-archive/stable
Downloading VS Code [==============================] 100%
Downloaded VS Code into C:\Users\znorman\Documents\node\vscode-idl-true\.vscode-test\vscode-win32-x64-archive-1.85.1

Downloaded VS Code into C:\Users\znorman\Documents\node\vscode-idl-true\.vscode-test\vscode-win32-x64-archive-1.85.1

[main 2023-12-14T23:23:52.885Z] update#setState disabled
[main 2023-12-14T23:23:52.885Z] update#ctor - updates are disabled by the environment
connor4312 commented 11 months ago

Hm, okay. We should now be really good about this since we fixed the underlying issue, and also do checksum verification on all downloads. Please do let me know if you see it again and we can try to repro it further.