Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vitest extension completely non functional on mac #196

Closed
benwainwrightawaze opened this issue Nov 8, 2023 · 13 comments
Closed

Vitest extension completely non functional on mac #196

benwainwrightawaze opened this issue Nov 8, 2023 · 13 comments
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)

Comments

@benwainwrightawaze
Copy link

Describe the bug
Vitest completely fails to work on any of my vitest repos

To Reproduce
Steps to reproduce the behavior on the example project:

  1. Open Vscode
  2. Install Vitest extension
  3. Go to 'testing' sidebar

Expected behavior
I see tests that I can execute

Actual behavior
I see 'install additional test extensions', and no tests.

Note, the vitest output window appears to be showing websocket connections dropping:

[INFO 17:42:27] Trying to get vitest version from /Users/ben.wainwright/personal-repos/vitest-basic/node_modules/.bin/vitest -v...
[INFO 17:42:28] vitest/0.34.6 darwin-arm64 node-v20.6.0

[INFO 17:42:28] Vitest Workspace [vitest-basic]: Vitest version = 0.34.6
[INFO 17:42:28] WS Close
[INFO 17:42:28] RECONNECT
[INFO 17:42:28] WS Close
[INFO 17:42:29] RECONNECT
[INFO 17:42:29] WS Close
[INFO 17:42:29] RECONNECT
[INFO 17:42:29] WS Close
[INFO 17:42:30] RECONNECT
[INFO 17:42:30] WS Close
[INFO 17:42:30] RECONNECT
[INFO 17:42:30] WS Close
[INFO 17:42:31] RECONNECT
[INFO 17:42:31] WS Close
[INFO 17:42:31] RECONNECT
[INFO 17:42:31] WS Close
[INFO 17:42:32] RECONNECT
[INFO 17:42:32] WS Close
[INFO 17:42:32] RECONNECT
[INFO 17:42:32] WS Close
[INFO 17:42:33] RECONNECT
[INFO 17:42:33] WS Close
[INFO 17:42:33] RECONNECT
[INFO 17:42:33] WS Close
[INFO 17:42:34] RECONNECT
[INFO 17:42:34] WS Close
[INFO 17:42:34] RECONNECT
[INFO 17:42:34] WS Close
[INFO 17:42:35] RECONNECT
[INFO 17:42:35] WS Close
[INFO 17:42:35] RECONNECT
[INFO 17:42:35] WS Close
[INFO 17:42:36] RECONNECT
[INFO 17:42:36] WS Close
[INFO 17:42:36] RECONNECT
[INFO 17:42:36] WS Close
[INFO 17:42:37] RECONNECT
[INFO 17:42:37] WS Close
[INFO 17:42:38] RECONNECT
[INFO 17:42:38] WS Close

Screenshots
image

(Paste info.txt content generated by the example project)

  • OS: MacOS
  • VSCode version: 1.84.1
  • Vitest version: 0.34.6
  • Vitest plugin version: 0.2.43

Additional context
Add any other context about the problem here.

@benwainwrightawaze benwainwrightawaze added the p3-minor-bug An edge case that only affects very specific usage (priority) label Nov 8, 2023
@teobmg
Copy link

teobmg commented Nov 10, 2023

Same behaviour here

@teobmg
Copy link

teobmg commented Nov 10, 2023

It seems to be related with node 20. Rolling back to node 18.16.0 works fine.

@sbolz
Copy link

sbolz commented Nov 13, 2023

same behavior here, but on Windows with WSL2 (ubuntu). The extension is installed on the remote host.

[INFO 1:02:36 PM] Trying to get vitest version from /home/[...]/node_modules/.bin/vitest -v...
[INFO 1:02:37 PM] vitest/0.34.6 linux-x64 node-v18.16.1

[INFO 1:02:37 PM] Vitest Workspace [energycity]: Vitest version = 0.34.6
[INFO 1:02:37 PM] WS Close
[INFO 1:02:37 PM] RECONNECT
[INFO 1:02:37 PM] WS Close
[INFO 1:02:38 PM] RECONNECT
[INFO 1:02:38 PM] WS Close
[INFO 1:02:38 PM] RECONNECT
[INFO 1:02:38 PM] WS Close
[INFO 1:02:39 PM] RECONNECT
[INFO 1:02:39 PM] WS Close
[INFO 1:02:39 PM] RECONNECT
[INFO 1:02:39 PM] WS Close
[INFO 1:02:40 PM] RECONNECT
[INFO 1:02:40 PM] WS Close
[INFO 1:02:40 PM] RECONNECT
[INFO 1:02:40 PM] WS Close
[INFO 1:02:41 PM] RECONNECT
[INFO 1:02:41 PM] WS Close
[INFO 1:02:41 PM] RECONNECT
[INFO 1:02:41 PM] WS Close
[INFO 1:02:42 PM] RECONNECT
[INFO 1:02:42 PM] WS Close
[INFO 1:02:42 PM] RECONNECT
[INFO 1:02:42 PM] WS Close
[INFO 1:02:43 PM] RECONNECT
[INFO 1:02:43 PM] WS Close
[INFO 1:02:43 PM] RECONNECT
[INFO 1:02:43 PM] WS Close
[INFO 1:02:44 PM] RECONNECT
[INFO 1:02:44 PM] WS Close
[INFO 1:02:44 PM] RECONNECT
[INFO 1:02:44 PM] WS Close
[INFO 1:02:45 PM] RECONNECT
[INFO 1:02:45 PM] WS Close
[INFO 1:02:45 PM] RECONNECT
[INFO 1:02:45 PM] WS Close
[INFO 1:02:46 PM] RECONNECT
[INFO 1:02:46 PM] WS Close
[INFO 1:02:46 PM] RECONNECT
[INFO 1:02:46 PM] WS Close

Not sure if this gives any clue:
image
The number behind --api.port doesn't match the Port number from the table.

@benwainwright
Copy link

It seems to be related with node 20. Rolling back to node 18.16.0 works fine.

This makes no difference for me

@watonyweng
Copy link

Hi @benwainwright, I cloned project and opened it using VSCode, deleted vitest.config.ts file (it is empty), and then saw it in testing sidebar.

  • OS version: Windows 10
  • Node version: 16.19.1
  • VSCode version: 1.84.2
  • Vitest version: 0.34.6
  • Vitest plugin version: 0.2.43

bf8ea689-8f8b-4c24-a529-bbd25f79acac

@santi020k
Copy link

santi020k commented Dec 5, 2023

It seems to be related with node 20. Rolling back to node 18.16.0 works fine.

I had node 20 and making the change to this specific version worked for me, Thanks ❤️

@nwidynski
Copy link

nwidynski commented Dec 6, 2023

Downgrading the plugin version to v0.2.42 is what did the trick for me.

Tutorial (VSCode): Extensions -> Vitest -> Uninstall (more) -> Install Another Version...

v0.2.43 breaks the logging for some reason that needs to be investigated further. v0.2.42 logs an error in one of the vite.config.ts of my monorepo. After fixing this error, v0.2.43 also works.

@JCherryhomes
Copy link

downgrading to v0.2.42 worked for me as well

@leonardo-ornelas
Copy link

downgrading to v0.2.42 also worked for me

@ffMathy
Copy link
Collaborator

ffMathy commented Feb 18, 2024

Do you happen to use using keywords in your tests or your code?

There was a bug regarding this that was now solved, which would lead to this exact error: #232

@ffMathy
Copy link
Collaborator

ffMathy commented Feb 22, 2024

Have you noticed we moved the extension to a new download link, and the existing one has been deprecated? The new version has a lot of bug-fixes. Does this work for any of you?

@goibon
Copy link

goibon commented Feb 23, 2024

I am facing a similar issue with getting "pure/WS Close" / "RECONNECT" output flood from this extension. For my project it works if I remove basicSsl() from my plugins list in my vite.config.ts file. I merge my vite and vitest configs using mergeConfig(viteConfig, defineConfig(<omitted>)).

Is this related or should there be a separate issue for this?

macOS version: 13.6.3
Node version: v21.6.2
vite version: 5.0.12
vitest version: 1.3.1
vitest extension version: 0.4.0
@vitejs/plugin-basic-ssl version: 1.0.2

@MilanKovacic
Copy link
Collaborator

There have been a lot of changes in the extension since this issue was opened. Please try to install the latest version, and open new issues for specific problems.
@goibon This issue is tracked in #226

@github-actions github-actions bot locked and limited conversation to collaborators Mar 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

No branches or pull requests