vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Can no longer find config file from 1.24.5+

Open Sverri opened this issue 6 months ago • 25 comments

Describe the bug

Yesterday the extension (1.24.4) worked.

Today it does not (1.24.5 and 1.24.6). These two version are not able to find the configuration file.

Nothing has changed since yesterday (same editor configs, same project config files, etc.).

Reproduction

Open VSCode and bring up the "Testing" sidebar.

Image

Output

[INFO 10:40:58 AM] [v1.24.6] Vitest extension is activated because Vitest is installed or there is a Vite/Vitest config file in the workspace.
[INFO 10:40:59 AM] [API] Resolving configs: [REDACTED]/vite.config.ts
[INFO 10:40:59 AM] [API] Initiated ws connection via ws://localhost:53182
[INFO 10:40:59 AM] [API] Starting Vitest v3.2.3 ([REDACTED]/vite.config.ts) in the terminal: node C:/Users/[USER]/.vscode/extensions/vitest.explorer-1.24.6/dist/worker.js
[Error 10:41:04 AM] There were errors during config load.
[Error 10:41:04 AM] [Error Error] The extension could not connect to the terminal in 5 seconds. See the "vitest" terminal output for more details.
Error: The extension could not connect to the terminal in 5 seconds. See the "vitest" terminal output for more details.
	at Timeout._onTimeout (c:\Users\[USER]\.vscode\extensions\vitest.explorer-1.24.6\dist\extension.js:13:3802)
	at listOnTimeout (node:internal/timers:588:17)
	at process.processTimers (node:internal/timers:523:7)
[Error 10:41:06 AM] [Error Error] The extension could not load any config.
Error: The extension could not load any config.
    at kl (c:\Users\[USER]\.vscode\extensions\vitest.explorer-1.24.6\dist\extension.js:13:9918)
    at Li._defineTestProfiles (c:\Users\[USER]\.vscode\extensions\vitest.explorer-1.24.6\dist\extension.js:25:2314)
    at Li.defineTestProfiles (c:\Users\[USER]\.vscode\extensions\vitest.explorer-1.24.6\dist\extension.js:25:1701)
    at Li.activate (c:\Users\[USER]\.vscode\extensions\vitest.explorer-1.24.6\dist\extension.js:25:7158)
    at ME (c:\Users\[USER]\.vscode\extensions\vitest.explorer-1.24.6\dist\extension.js:25:662)
    at Wb.n (file:///c:/Users/[USER]/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:120:13382)
    at Wb.m (file:///c:/Users/[USER]/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:120:13345)
    at Wb.l (file:///c:/Users/[USER]/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:120:12801)

Extension Version

1.24.6

Vitest Version

3.2.3

Validations

Sverri avatar Jun 18 '25 08:06 Sverri

The error in the output mentions the "vitest" terminal. What is in that terminal?

sheremet-va avatar Jun 18 '25 08:06 sheremet-va

This is actual terminal output. Having same problem, vitest version 3.1.4, extension version: 1.24.6

tkfalarz avatar Jun 18 '25 09:06 tkfalarz

This is actual terminal output. Having same problem, vitest version 3.1.4, extension version: 1.24.6

What “this”? The issue only shows the “output” logs, not the terminal output.

sheremet-va avatar Jun 18 '25 09:06 sheremet-va

The author copy-pasted the content of the terminal output. See: Image

tkfalarz avatar Jun 18 '25 09:06 tkfalarz

The author copy-pasted the content of the terminal output. See: Image

This is not the terminal, this is the output log channel. The terminal is in another tab (the tab is visible in your screenshot)

This error opens a new terminal window with logs that cannot be intercepted to show in the output

sheremet-va avatar Jun 18 '25 09:06 sheremet-va

The same issue here. Spent half of the day figuring out what is triggering the problem. For now, just rolled back the extension. Moreover, vitest creates a terminal for each config file. It was not like this before. At least no terminals were left open. Also when VS Code is opened, it starts executing commands. For each command, a new Terminal is created.

vladimir-kovalenko avatar Jun 18 '25 10:06 vladimir-kovalenko

Same here

orgads avatar Jun 18 '25 10:06 orgads

The author copy-pasted the content of the terminal output. See: Image

This is not the terminal, this is the output log channel. The terminal is in another tab (the tab is visible in your screenshot)

This error opens a new terminal window with logs that cannot be intercepted to show in the output

So the terminal window is empty for me.

tkfalarz avatar Jun 18 '25 10:06 tkfalarz

The same issue here. Spent half of the day figuring out what is triggering the problem. For now, just rolled back the extension. Moreover, vitest creates a terminal for each config file. It was not like this before. At least no terminals were left open. Also when VS Code is opened, it starts executing commands. For each command, a new Terminal is created.

The terminal is open only if it failed to load. Please show the terminal output if you have a problem described in the issue.

sheremet-va avatar Jun 18 '25 10:06 sheremet-va

I have similar problem. The terminal output looks just like (I hope that it is what was requested):

node /home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.6/dist/worker.js
PS /home/adam/AdGuard/Bitbucket/scriptlets> node /home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.6/dist/worker.js
Screenshot

Image

Output log:

[INFO 1:15:49 PM] [v1.24.6] Vitest extension is activated because Vitest is installed or there is a Vite/Vitest config file in the workspace.
[INFO 1:15:49 PM] [API] Resolving configs: scriptlets/vitest.config.ts
[INFO 1:15:49 PM] [API] Initiated ws connection via ws://localhost:45155
[INFO 1:15:49 PM] [API] Starting Vitest v2.1.8 (scriptlets/vitest.config.ts) in the terminal: node /home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.6/dist/worker.js
[Error 1:15:54 PM] There were errors during config load.
[Error 1:15:54 PM] [Error Error] The extension could not connect to the terminal in 5 seconds. See the "vitest" terminal output for more details.
Error: The extension could not connect to the terminal in 5 seconds. See the "vitest" terminal output for more details.
	at Timeout._onTimeout (/home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.6/dist/extension.js:13:3802)
	at listOnTimeout (node:internal/timers:588:17)
	at process.processTimers (node:internal/timers:523:7)
[Error 1:15:55 PM] [Error Error] The extension could not load any config.
Error: The extension could not load any config.
    at kl (/home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.6/dist/extension.js:13:9918)
    at Li._defineTestProfiles (/home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.6/dist/extension.js:25:2314)
    at Li.defineTestProfiles (/home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.6/dist/extension.js:25:1701)
    at Li.activate (/home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.6/dist/extension.js:25:7158)
    at ME (/home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.6/dist/extension.js:25:662)
    at ub.n (file:///home/adam/.vscode-server-insiders/bin/0140ab3f1b383871c5ecc910cc0eba166607d485/out/vs/workbench/api/node/extensionHostProcess.js:112:13386)
    at ub.m (file:///home/adam/.vscode-server-insiders/bin/0140ab3f1b383871c5ecc910cc0eba166607d485/out/vs/workbench/api/node/extensionHostProcess.js:112:13349)
    at ub.l (file:///home/adam/.vscode-server-insiders/bin/0140ab3f1b383871c5ecc910cc0eba166607d485/out/vs/workbench/api/node/extensionHostProcess.js:112:12805)

Version 1.24.6

AdamWr avatar Jun 18 '25 11:06 AdamWr

I have similar problem. The terminal output looks just like (I hope that it is what was requested):

node /home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.6/dist/worker.js
PS /home/adam/AdGuard/Bitbucket/scriptlets> node /home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.6/dist/worker.js
Screenshot

Image

Output log:

[INFO 1:15:49 PM] [v1.24.6] Vitest extension is activated because Vitest is installed or there is a Vite/Vitest config file in the workspace.
[INFO 1:15:49 PM] [API] Resolving configs: scriptlets/vitest.config.ts
[INFO 1:15:49 PM] [API] Initiated ws connection via ws://localhost:45155
[INFO 1:15:49 PM] [API] Starting Vitest v2.1.8 (scriptlets/vitest.config.ts) in the terminal: node /home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.6/dist/worker.js
[Error 1:15:54 PM] There were errors during config load.
[Error 1:15:54 PM] [Error Error] The extension could not connect to the terminal in 5 seconds. See the "vitest" terminal output for more details.
Error: The extension could not connect to the terminal in 5 seconds. See the "vitest" terminal output for more details.
	at Timeout._onTimeout (/home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.6/dist/extension.js:13:3802)
	at listOnTimeout (node:internal/timers:588:17)
	at process.processTimers (node:internal/timers:523:7)
[Error 1:15:55 PM] [Error Error] The extension could not load any config.
Error: The extension could not load any config.
    at kl (/home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.6/dist/extension.js:13:9918)
    at Li._defineTestProfiles (/home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.6/dist/extension.js:25:2314)
    at Li.defineTestProfiles (/home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.6/dist/extension.js:25:1701)
    at Li.activate (/home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.6/dist/extension.js:25:7158)
    at ME (/home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.6/dist/extension.js:25:662)
    at ub.n (file:///home/adam/.vscode-server-insiders/bin/0140ab3f1b383871c5ecc910cc0eba166607d485/out/vs/workbench/api/node/extensionHostProcess.js:112:13386)
    at ub.m (file:///home/adam/.vscode-server-insiders/bin/0140ab3f1b383871c5ecc910cc0eba166607d485/out/vs/workbench/api/node/extensionHostProcess.js:112:13349)
    at ub.l (file:///home/adam/.vscode-server-insiders/bin/0140ab3f1b383871c5ecc910cc0eba166607d485/out/vs/workbench/api/node/extensionHostProcess.js:112:12805)

Version 1.24.6

Yes, thank you! This is a stellar report.

sheremet-va avatar Jun 18 '25 11:06 sheremet-va

I think I have found the issue and working on fixing it.

sheremet-va avatar Jun 18 '25 12:06 sheremet-va

The fix is in 1.24.7. Please let me know if the extension now works properly. Thank you.

sheremet-va avatar Jun 18 '25 12:06 sheremet-va

I confirm it's working in 1.24.7

tkfalarz avatar Jun 18 '25 13:06 tkfalarz

Thank you for the fix, but unfortunately it doesn't work in my case.

Terminal log:

node /home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.7/dist/worker.js;
PS /home/adam/AdGuard/Bitbucket/scriptlets> node /home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.7/dist/worker.js;

Output:

[INFO 3:22:41 PM] [v1.24.7] Vitest extension is activated because Vitest is installed or there is a Vite/Vitest config file in the workspace.
[INFO 3:22:42 PM] [API] Resolving configs: scriptlets/vitest.config.ts
[INFO 3:22:43 PM] [TERMINAL] Initiated ws connection via ws://localhost:41753
[INFO 3:22:43 PM] [TERMINAL] Starting Vitest v2.1.8 (scriptlets/vitest.config.ts) in the terminal: node /home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.7/dist/worker.js;
[INFO 3:22:43 PM] [TERMINAL] Shell integration is initiated.
[Error 3:22:48 PM] There were errors during config load.
[Error 3:22:48 PM] [Error Error] The extension could not connect to the terminal in 5 seconds. See the "vitest" terminal output for more details.
Error: The extension could not connect to the terminal in 5 seconds. See the "vitest" terminal output for more details.
	at Timeout._onTimeout (/home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.7/dist/extension.js:13:4772)
	at listOnTimeout (node:internal/timers:588:17)
	at process.processTimers (node:internal/timers:523:7)
[Error 3:22:49 PM] [Error Error] The extension could not load any config.
Error: The extension could not load any config.
    at Nl (/home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.7/dist/extension.js:13:11233)
    at Li._defineTestProfiles (/home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.7/dist/extension.js:25:2314)
    at Li.defineTestProfiles (/home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.7/dist/extension.js:25:1701)
    at Li.activate (/home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.7/dist/extension.js:25:7158)
    at VE (/home/adam/.vscode-server-insiders/extensions/vitest.explorer-1.24.7/dist/extension.js:25:662)
    at ub.n (file:///home/adam/.vscode-server-insiders/bin/0140ab3f1b383871c5ecc910cc0eba166607d485/out/vs/workbench/api/node/extensionHostProcess.js:112:13386)
    at ub.m (file:///home/adam/.vscode-server-insiders/bin/0140ab3f1b383871c5ecc910cc0eba166607d485/out/vs/workbench/api/node/extensionHostProcess.js:112:13349)
    at ub.l (file:///home/adam/.vscode-server-insiders/bin/0140ab3f1b383871c5ecc910cc0eba166607d485/out/vs/workbench/api/node/extensionHostProcess.js:112:12805)

If it works for others, then perhaps it's something with my settings or there is another culprit. I'm not sure if it matters but I'm using it in WSL (probably matters because in not WSL it works correctly).

If I change vitest.shellType to child_process it works correctly.


I think that I found a problem. It does not work if I set terminal.integrated.defaultProfile.linux to pwsh (in VSCode settings), but it works correctly with default value null (bash).

AdamWr avatar Jun 18 '25 13:06 AdamWr

It does not work if I set terminal.integrated.defaultProfile.linux to pwsh (in VSCode settings), but it works correctly with default value null (bash).

It should still work with powershell 🤔 How do you connect vscode to WSL?

sheremet-va avatar Jun 18 '25 19:06 sheremet-va

I'm just using Remote Explorer option and choose Connect in New Window.

Image

AdamWr avatar Jun 18 '25 19:06 AdamWr

Yeah, as discussed in the discord, I'm going through the very same. I'm on OSX and the only thing that gets things working again is by turning the shell type back to old default, child process. I've tried all the shell configs above, and messed around with my node version etc too, but nothing else has done anything.

seaders avatar Jun 18 '25 19:06 seaders

Installed 1.24.7 and it looks like I am still having problems.

Terminal:

C:\Users\[USER]\Work\[PROJECT_ROOT]>node C:/Users/[USER]/.vscode/extensions/vitest.explorer-1.24.7/dist/worker.js;
node:internal/modules/cjs/loader:1404
  throw err;
  ^

Error: Cannot find module 'C:\Users\[USER]\.vscode\extensions\vitest.explorer-1.24.7\dist\worker.js;'
    at Function._resolveFilename (node:internal/modules/cjs/loader:1401:15)
    at defaultResolveImpl (node:internal/modules/cjs/loader:1057:19)
    at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1062:22)
    at Function._load (node:internal/modules/cjs/loader:1211:37)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:235:24)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:171:5)
    at node:internal/main/run_main_module:36:49 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v22.16.0

Edit: The worker.js file does actually exist on disk. Not sure what that means exactly.

Output:

[INFO 10:45:09 AM] [v1.24.7] Vitest extension is activated because Vitest is installed or there is a Vite/Vitest config file in the workspace.
[INFO 10:45:11 AM] [API] Resolving configs: [PROJECT_ROOT]/vite.config.ts
[INFO 10:45:16 AM] [TERMINAL] Initiated ws connection via ws://localhost:59841
[INFO 10:45:16 AM] [TERMINAL] Starting Vitest v3.2.3 ([PROJECT_ROOT]/vite.config.ts) in the terminal: node C:/Users/[USER]/.vscode/extensions/vitest.explorer-1.24.7/dist/worker.js;
[INFO 10:45:16 AM] [TERMINAL] Shell integration is not initiated, fallback to `terminal.sendText`.
[Error 10:45:23 AM] There were errors during config load.
[Error 10:45:23 AM] [Error Error] The extension could not connect to the terminal in 5 seconds. See the "vitest" terminal output for more details.
Error: The extension could not connect to the terminal in 5 seconds. See the "vitest" terminal output for more details.
    at Timeout._onTimeout (c:\Users\[USER]\.vscode\extensions\vitest.explorer-1.24.7\dist\extension.js:13:4772)
    at listOnTimeout (node:internal/timers:588:17)
    at processTimers (node:internal/timers:523:7)
[Error 10:45:24 AM] [Error Error] The extension could not load any config.
Error: The extension could not load any config.
    at Nl (c:\Users\[USER]\.vscode\extensions\vitest.explorer-1.24.7\dist\extension.js:13:11233)
    at runNextTicks (node:internal/process/task_queues:65:5)
    at processTimers (node:internal/timers:520:9)
    at Li._defineTestProfiles (c:\Users\[USER]\.vscode\extensions\vitest.explorer-1.24.7\dist\extension.js:25:2314)
    at Li.defineTestProfiles (c:\Users\[USER]\.vscode\extensions\vitest.explorer-1.24.7\dist\extension.js:25:1701)
    at Li.activate (c:\Users\[USER]\.vscode\extensions\vitest.explorer-1.24.7\dist\extension.js:25:7158)
    at VE (c:\Users\[USER]\.vscode\extensions\vitest.explorer-1.24.7\dist\extension.js:25:662)
    at Wb.n (file:///c:/Users/[USER]/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:120:13382)
    at Wb.m (file:///c:/Users/[USER]/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:120:13345)
    at Wb.l (file:///c:/Users/[USER]/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:120:12801)

Sverri avatar Jun 19 '25 09:06 Sverri

Also having this issue. Vitest extension is stuck at "resolving vitest workspace config". Reverting to extension version 1.24.3 fixed this for me.

Same as above, stuck at "resolving vitest workspace config" - also on macOS and using node.js 22.16.0.

Installing 1.24.3 resolved the issue, but debugging no longer works and it never attaches.

Only way to make the debugger work is to set vitest.shelltype to child process.

dreamorosi avatar Jun 19 '25 22:06 dreamorosi

Same issue for me on Mac.

Downgrading to 1.24.3 resolved it.

Ltrares avatar Jun 19 '25 23:06 Ltrares

My extension was stuck in "Resolving vitest..." on Windows.

Downgrading the extension to 1.24.3 fixed it for me.

davidjmstewart avatar Jun 20 '25 02:06 davidjmstewart

The default is now child_process again (since v1.26.0). Thank you for your reports, I will take a closer look at this terminal integration.

sheremet-va avatar Jun 21 '25 16:06 sheremet-va

@sheremet-va i just commented on another issue, but i think this is pretty much what I am encountering now. I am using the latest version as of 08/15 for both the extension and vscode. It seems to be forcing the directory it looks for the workspace in to C; my project is in F. I was able to mitigate this particular error by using a symlink, but have not found a vscode/vitest setting to point it to the correct directory.

jpremill avatar Aug 15 '25 20:08 jpremill