vscode-test: VS Code executable not found after downloading it
Does this issue occur when all extensions are disabled?: Yes/No
- VS Code Version: Insiders
- OS Version: Windows
CI logs https://github.com/microsoft/vscode-jupyter/actions/runs/6940223424/job/18878834977
I am downloading VS Code using the package @vscode/test-electron
I have noticed that the windows tests can fail sometimes due to some file not found error (see below). Re-running the CI seems to fix it (hence the reason I think its flaky)
Please let me know if additional information/logs are required.
Here are the logs from the Jupyter CI
Run GabrielBB/xvfb-action@v1.4
C:\Windows\system32\cmd.exe /D /S /C "C:\hostedtoolcache\windows\node\18.15.0\x64\npm.cmd run testSmokeLogged"
> jupyter@2023.11.100 testSmokeLogged
> cross-env VSC_JUPYTER_FORCE_LOGGING=true node --no-force-async-hooks-checks ./out/test/testBootstrap.node.js ./out/test/smokeTest.node.js
Starting socket server for tests.
Creating test server
Listening to test server
Test server running
Test server listening on port 53222
Spawning C:\hostedtoolcache\windows\node\18.15.0\x64\node.exe : ./out/test/smokeTest.node.js
Python used in tests is c:\hostedtoolcache\windows\python\3.10.11\x64\python.exe
Start Test Runner
Launch tests in test runner
****************************************************************************************************
Start Standard tests
Downloading VS Code insiders from https://update.code.visualstudio.com/latest/win32-x64-archive/insider
Downloading VS Code (131091780B)
Downloading VS Code [=-----------------------------] 6%Downloading VS Code [=====-------------------------] 17%Downloading VS Code [=========---------------------] 33%Downloading VS Code [==============----------------] 48%Downloading VS Code [===================-----------] 64%Downloading VS Code [====================----------] 69%Downloading VS Code [=====================---------] 71%Downloading VS Code [======================--------] 74%Downloading VS Code [=======================-------] 77%Downloading VS Code [=======================-------] 80%Downloading VS Code [=========================-----] 85%Downloading VS Code [==========================----] 90%Downloading VS Code [============================--] 94%Downloaded VS Code into D:\a\vscode-jupyter\vscode-jupyter\.vscode-test\vscode-win32-x64-archive-insiders
Downloaded VS Code into D:\a\vscode-jupyter\vscode-jupyter\.vscode-test\vscode-win32-x64-archive-insiders
Installing Python Extension ms-python.python to C:\Users\RUNNER~1\AppData\Local\Temp\vscode_jupyter_exts
Installing Pylance Extension to C:\Users\RUNNER~1\AppData\Local\Temp\vscode_jupyter_exts
Installing Renderer Extension to C:\Users\RUNNER~1\AppData\Local\Temp\vscode_jupyter_exts
Test error: Error: spawn D:\a\vscode-jupyter\vscode-jupyter\.vscode-test\vscode-win32-x64-archive-insiders\Code - Insiders.exe ENOENT
Exit code: -4058
End Standard tests (with errors) Failed
****************************************************************************************************
Start Standard tests
End Standard tests (with errors) Error: ENOENT: no such file or directory, open 'D:\a\vscode-jupyter\vscode-jupyter\.vscode-test\vscode-win32-x64-archive-insiders\resources\app\product.json'
at Object.openSync (node:fs:601:3)
at Object.readFileSync (node:fs:469:[35](https://github.com/microsoft/vscode-jupyter/actions/runs/6940223424/job/18878834977#step:13:36))
at Object.insidersDownloadDirMetadata (D:\a\vscode-jupyter\vscode-jupyter\node_modules\@vscode\test-electron\out\util.js:114:41)
at download (D:\a\vscode-jupyter\vscode-jupyter\node_modules\@vscode\test-electron\out\download.js:281:72)
at downloadAndUnzipVSCode (D:\a\vscode-jupyter\vscode-jupyter\node_modules\@vscode\test-electron\out\download.js:[36](https://github.com/microsoft/vscode-jupyter/actions/runs/6940223424/job/18878834977#step:13:37)1:18)
at start (D:\a\vscode-jupyter\vscode-jupyter\out\test\standardTest.node.js:144:83)
at D:\a\vscode-jupyter\vscode-jupyter\out\test\standardTest.node.js:177:16
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
errno: -[40](https://github.com/microsoft/vscode-jupyter/actions/runs/6940223424/job/18878834977#step:13:41)[58](https://github.com/microsoft/vscode-jupyter/actions/runs/6940223424/job/18878834977#step:13:59),
syscall: 'open',
code: 'ENOENT',
path: 'D:\\a\\vscode-jupyter\\vscode-jupyter\\.vscode-test\\vscode-win32-x[64](https://github.com/microsoft/vscode-jupyter/actions/runs/6940223424/job/18878834977#step:13:65)-archive-insiders\\resources\\app\\product.json'
}
Tests Exited with code 1
Error in running Smoke Tests Failed with code 1.
Exiting with test failures
Killing VSC
Error: The process 'C:\hostedtoolcache\windows\node\18.15.0\x64\npm.cmd' failed with exit code 1
About this issue
- Original URL
- State: closed
- Created 7 months ago
- Comments: 25 (18 by maintainers)
Commits related to this issue
- change archive type detection to use content disposition fixes #246 — committed to microsoft/vscode-test by joaomoreno 7 months ago
- Update test-electron package Fixes the frequently failing pipeline See https://github.com/microsoft/vscode-test/issues/246 — committed to microsoft/vscode-pull-request-github by alexr00 7 months ago
- Update test-electron package (#5516) * Update test-electron package Fixes the frequently failing pipeline See https://github.com/microsoft/vscode-test/issues/246 * udpate node in pipelines — committed to microsoft/vscode-pull-request-github by alexr00 7 months ago
- feat: add length/hash validation for downloads Fixes https://github.com/microsoft/vscode-test/issues/246 (possibly) though it requires https://github.com/microsoft/vscode-update-server/issues/167 in ... — committed to CodeEditorLand/LandTest by connor4312 7 months ago
- change archive type detection to use content disposition (#248) fixes #246 — committed to CodeEditorLand/LandTest by joaomoreno 7 months ago
- Fix @vscode/test-electron (#12709) The extension e2e tests are failing due to https://github.com/microsoft/vscode-test/issues/246. Update @vscode/test-electron to fix it. — committed to Azure/bicep by shenglol 7 months ago
- fix(vscode): fix corrupted VS Code downloads in testing 'yarn test' downloads Visual Studio Code into a temporary directory. A change in Visual Studio Code's server caused the download to break [1]. ... — committed to quick-lint/quick-lint-js by strager 4 months ago
Found the issue. It’s indeed related to the new CDN.
We’re relying on the
Content-Type
header to detect whether the download is a ZIP or a TGZ: https://github.com/microsoft/vscode-test/blob/c1a49663d17d86c76cc74c1a7ac4d955d1906d73/lib/download.ts#L223The new CDN unfortunately always sends
application/octet-stream
:This explains why Windows and macOS are broken, while Linux isn’t: the ZIP archives are incorrectly “detected” as TGZ.
Thank you for looking into and fixing this! I’m surprised this didn’t surface in a more explicit way. I owe you a testing/debug bug fix of your choice 😁
Fixed in 2.3.8, pipeline running