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]: Timeline & preview disappear after timeout in fixture cleanup #30718

Open
tobz1000 opened this issue May 8, 2024 · 4 comments
Open

[Bug]: Timeline & preview disappear after timeout in fixture cleanup #30718

tobz1000 opened this issue May 8, 2024 · 4 comments
Assignees
Labels

Comments

@tobz1000
Copy link

tobz1000 commented May 8, 2024

Version

1.44.0

Steps to reproduce

Edit: Minimal reproduction: https://github.com/tobz1000/playwright-30718

  1. Create a test fixture which causes an error during the cleanup phase. Edit: The fixture should have a timeout configured, and the error must cause faillure by timeout.
  2. Create a test which uses the fixture.
  3. Run the test UI and start the test (I reproduced via UI port): npx playwright test --ui-port 3031
  4. Once the test has failed during fixture cleanup, the timeline and preview window will disappear:
    image

I can create a minimal reproduction repo if requested.

Expected behavior

Timeline and window preview should be visible once the test has finished.

Actual behavior

Timeline and window preview are not visible.

Additional context

A similar bug was reported and puportedly fixed in a previous version: #29826

Environment

System:
  OS: Linux 5.15 Debian GNU/Linux 11 (bullseye) 11 (bullseye)
  CPU: (12) x64 AMD Ryzen 5 3600 6-Core Processor
  Memory: 6.89 GB / 15.63 GB
  Container: Yes
Binaries:
  Node: 20.12.2 - /usr/local/share/nvm/versions/node/v20.12.2/bin/node
  Yarn: 1.22.19 - /usr/bin/yarn
  npm: 10.5.0 - /usr/local/share/nvm/versions/node/v20.12.2/bin/npm
  pnpm: 9.0.3 - /usr/local/share/nvm/versions/node/v20.12.2/bin/pnpm
  bun: 1.1.4 - ~/.bun/bin/bun
IDEs:
  VSCode: 1.88.1 - /vscode/vscode-server/bin/linux-x64/e170252f762678dec6ca2cc69aba1570769a5d39/bin/remote-cli/code
Languages:
  Bash: 5.1.4 - /bin/bash
@mxschmitt
Copy link
Member

I can create a minimal reproduction repo if requested.

That would be helpful! Probably its different to the bug before, since the bug before was covered with a test which passes.

@tobz1000
Copy link
Author

tobz1000 commented May 9, 2024

This should do it: https://github.com/tobz1000/playwright-30718

@tobz1000 tobz1000 changed the title [Bug]: Timeline & preview disappear after error in fixture cleanup [Bug]: Timeline & preview disappear after timeout in fixture cleanup May 9, 2024
@yury-s
Copy link
Member

yury-s commented May 10, 2024

The fixture that times out prevents the context from being closed and the trace from being saved upon closure. You need to make sure the fixtures are reliable. We consider fixtures to be a part of the test harness and if they break it's like playwright runner breaks. We can add best effort recovery for such cases, but you should make sure that your fixtures behave.

@tobz1000
Copy link
Author

@yury-s I agree that fixtures shouldn't fail, but it still happens occasionally, especially when developing the fixture in the first place. In this scenario, it's helpful if I'm still able to view the timeline & preview to see what went wrong. It seems like a bug that that the UI essentially breaks when this happens. I'm unfamiliar with the internals, but hopefully it's possible to handle a timeout in the fixture gracefully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants