Skip to content

Browser mode hanging on blank white screen, failing to load vitest/utils #3124

@ludwigbacklund

Description

@ludwigbacklund

Describe the bug

When trying to run a test in browser mode (playwright) with a basic example next.js application, the browser window opens but hangs on a blank screen and fails to load vitest/utils in the background.

Screenshot 2023-04-03 at 21 17 38

Reproduction

Reproduction repository, based on vitest next.js example: https://github.com/ludwigbacklund/vitest-browser-bug-repro

Just run yarn test, it will open a browser window and hang on a white screen. Check the console/network log.

System Info

System:
    OS: macOS 13.3
    CPU: (10) arm64 Apple M1 Pro
    Memory: 774.77 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 16.13.1 - ~/.nodenv/versions/16.13.1/bin/node
    Yarn: 1.22.15 - ~/.nodenv/versions/16.13.1/bin/yarn
    npm: 8.1.2 - ~/.nodenv/versions/16.13.1/bin/npm
  Browsers:
    Chrome: 111.0.5563.146
    Safari: 16.4
  npmPackages:
    @vitejs/plugin-react: latest => 3.1.0 
    @vitest/browser: ^0.29.8 => 0.29.8 
    vitest: latest => 0.29.8

Used Package Manager

yarn

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    feat: browserIssues and PRs related to the browser runner

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions