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

[Bug]: A worker process has failed to exit gracefully and has been force exited. #496

Open
IanVS opened this issue Jul 19, 2024 · 0 comments
Labels
bug Something isn't working needs triage

Comments

@IanVS
Copy link
Member

IanVS commented Jul 19, 2024

Describe the bug

I get intermittent failures in CI, with the message:

A worker process has failed to exit gracefully and has been force exited. This is likely caused by tests leaking due to improper teardown. Try running with --detectOpenHandles to find leaks. Active timers can also cause this, ensure that .unref() was called on them.

When this happens, multiple stories from the same story file all fail.

To Reproduce

I wish I knew how to reproduce this 😭. If someone can find a good way, that'd be awesome! It seems to happen in my more complex tests, if that's any clue.

System

System:
    OS: macOS 14.5
    CPU: (12) arm64 Apple M2 Max
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.11.1 - ~/Library/Caches/fnm_multishells/6880_1721246554780/bin/node
    npm: 10.2.4 - ~/Library/Caches/fnm_multishells/6880_1721246554780/bin/npm
    pnpm: 8.14.2 - ~/Library/Caches/fnm_multishells/6880_1721246554780/bin/pnpm <----- active
  Browsers:
    Safari: 17.5
  npmPackages:
    @storybook/addon-a11y: ^8.2.0-alpha.10 => 8.2.0-alpha.10
    @storybook/addon-essentials: ^8.2.0-alpha.10 => 8.2.0-alpha.10
    @storybook/addon-interactions: ^8.2.0-alpha.10 => 8.2.0-alpha.10
    @storybook/react: ^8.2.0-alpha.10 => 8.2.0-alpha.10
    @storybook/react-vite: ^8.2.0-alpha.10 => 8.2.0-alpha.10
    @storybook/test: ^8.2.0-alpha.10 => 8.2.0-alpha.10
    @storybook/test-runner: 0.19.2--canary.494.7268a7d.0 => 0.19.2--canary.494.7268a7d.0
    @storybook/types: ^8.2.0-alpha.10 => 8.2.0-alpha.10
    chromatic: ^11.4.0 => 11.4.0
    eslint-plugin-storybook: ^0.8.0 => 0.8.0
    storybook: ^8.2.0-alpha.10 => 8.2.0-alpha.10

Additional context

I have screenshots being taken when tests fail, and when this failure happens, I've seen that all the screenshots for that story file are the same. In most cases the page is blank, but I've also seen the same UI shown across all failures in the past. Which makes me think that jest is being disconnected from playwright, and no longer is able to change the page state, or something.

@IanVS IanVS added bug Something isn't working needs triage labels Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
None yet
Development

No branches or pull requests

1 participant