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

Unhandled uncaught error fails test run, no stack trace present #5698

Closed
6 tasks done
Kanishk-Anand opened this issue May 9, 2024 · 2 comments
Closed
6 tasks done

Comments

@Kanishk-Anand
Copy link

Describe the bug

Vitest fails with a error message of Vitest caught X unhandled errors during the test run. but there is no meaningful error trace. Moreover, the test run failure in intermittent. It passes if the test suite is triggered multiple times. We do have error handling in most of the cases, but the chance where there isn't, Vitest should atleast be able to pinpoint to the problematic test case(s).

Attaching the screenshot of the error.

Screenshot 2024-05-09 at 8 16 44 PM

Reproduction

There is no definitive way to reproduce the issue, since, vitest itself isn't consistent in the report. It often fails, but then succeeds when ran multiple times. It causes unnecessary dev effort to check whether there is a meaningful test failure or this "unhandled errors" getting reported.

System Info

System:
    OS: macOS 14.0
    CPU: (10) arm64 Apple M1 Pro
    Memory: 80.78 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.18.0 - ~/.nvm/versions/node/v18.18.0/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 9.8.1 - ~/.nvm/versions/node/v18.18.0/bin/npm
  Browsers:
    Brave Browser: 122.1.63.174
    Chrome: 124.0.6367.119
    Safari: 17.0
  npmPackages:
    @vitejs/plugin-react: ~4.0.0 => 4.0.4
    @vitest/coverage-v8: ^0.32.0 => 0.32.0
    @vitest/ui: ~0.32.0 => 0.32.4
    vite: ~4.3.9 => 4.3.9
    vitest: ~0.32.0 => 0.32.4

Used Package Manager

npm

Validations

@sheremet-va
Copy link
Member

sheremet-va commented May 9, 2024

Please, try the latest version first. 0.32.4 is quite old, and the error from your stack trace was already fixed.

Copy link

github-actions bot commented May 9, 2024

Hello @Kanishk-Anand. Please provide a minimal reproduction using a GitHub repository or StackBlitz (you can also use examples). Issues marked with needs reproduction will be closed if they have no activity within 3 days.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants