#test-runner fails out of nowhere with `Browser has been closed`

1 messages · Page 1 of 1 (latest)

hazy matrix
#

Everything worked during the weekend but suddenly today the test-runner fails with the following error:

node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^

page.evaluate: Browser has been closed
    ==== Closed by ====
    at CustomEnvironment.teardown (/workspace/qorus-vscode/frontend/node_modules/jest-playwright-preset/lib/PlaywrightEnvironment.js:239:78)
    at CustomEnvironment.teardown (/workspace/qorus-vscode/frontend/node_modules/@storybook/test-runner/playwright/custom-environment.js:13:17)
    at runTestInternal (/workspace/qorus-vscode/frontend/node_modules/jest-runner/build/runTest.js:485:23)
    at runTest (/workspace/qorus-vscode/frontend/node_modules/jest-runner/build/runTest.js:499:34)

    at Page.<anonymous> (/workspace/qorus-vscode/frontend/src/stories/Tests/FSM/States.stories.tsx:878:18)

Node.js v18.16.1
error Command failed with exit code 1.

Here can be seen that it worked on Saturday but fails today with irrelevant small changes: https://github.com/qoretechnologies/qorus-vscode/actions

You can fork the repo and simply run yarn test-storybook to experience the error

Thanks

GitHub

Qorus Integration Engine development extension for Visual Studio Code - Actions · qoretechnologies/qorus-vscode

hazy matrix
#

Turns out it was a react hooks issue (hooks after return) but the error could definitely be better - I only figured it out thanks to Chromatic, otherwise I would probably pull my few hair I have left out 🙂