question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[not support vitest@v0.18.0] test successfully, but loading infinitely.

See original GitHub issue

Describe the bug A clear and concise description of what the bug is. I installed vitest V0.18.0,and it doesn`t work.

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

  1. npx degit SoonIter/sooniter-lib-template-monorepo my-lib-name
  2. run ni
  3. go to the “test” folder
  4. run this one is Ok, image but the extension works fail image

Expected behavior work well

Screenshots image

Maybe the problem is to run-once or run-watch. Version 0.2.20

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:8
  • Comments:34 (7 by maintainers)

github_iconTop GitHub Comments

7reactions
beorncommented, Jul 17, 2022

The latest vitest extension release, v0.2.20 (from 15 days ago), doesn’t work with vitest v0.18.1 for me. Just get an infinite spinner.

Try the example project linked to above with this:

  "devDependencies": {
    "envinfo": "^7.8.1",
    "vite": "^3.0.0",
    "vitest": "^0.18.1"
  }
5reactions
c00commented, Oct 9, 2022

Update: The cause of the problem is that vitest tends to bind the API on ::1 (ipv6) while the plugin tries to connect on 127.0.0.1 (ipv4). image

I guess vitest and the plugin both resolve localhost in a different way. That’s weird and unfortunate.

We can force vitest to listen on the ipv4 address by passing --api.host 127.0.0.1 to it, and that does make everything work. Unfortunately we can’t currently put that in the vitest.commandLine, as the plugin sets --api [port] which overwrites that.

However, if we would change the plugin code to use --api.port [port] instead, then we would be able to do this. I will create a PR to do this.

I don’t see any possible issues this could cause. All it does is create the option for people with this issue to add the host to the command line, working around the problem.

The true solution would be to resolve localhost in the same way as vitest or forcing vitest to bind on whatever the plugin resolves to. However, this is a bit out of my comfort zone. It’s probably better to come up with a solution that works (tho isn’t perfect) than to ask an open-source maintainer to do work for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Google Classroom To-Do Page Infinite Loading
My google classroom page works fine, but the to-do page infinitely loads. ... Newly created quiz assignments will no longer have this problem....
Read more >
Websites show a spinning wheel and never finish loading
This article explains what to do when specific websites (not all) start to load, but never finish (i.e. the tab displays a spinning...
Read more >
Google Play blank screen loading forever Internal Testing and ...
I managed to fix this by enabling the internal app sharing option on the play store account I wanted to test the app...
Read more >
Fix Windows 10 Stuck On Loading Screen, Infinite ... - YouTube
In this video, you will learn to fix infinite loading loop on your ... But you can execute all these commands and it...
Read more >
Infinite loading (and workaround) - WordPress.org
Hi, We're getting infinite loading (with spinning disc) on one of our sites when ... I don't have capabilities to test scripts like...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found