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]: Multiple Playwright instances causes Playwright UI to drop data after tests run #30283

Closed
eighty4 opened this issue Apr 7, 2024 · 6 comments

Comments

@eighty4
Copy link

eighty4 commented Apr 7, 2024

Version

1.43.0

Steps to reproduce

git clone git@github.com:eighty4/qwerky.git
cd qwerky
pnpm i
cd qwerky
pnpm build:watch &
pnpm start:watch &
cd ../ui
pnpm dev &
pnpm test:ui

Expected behavior

Interact with test results in user interface

Actual behavior

Test UI resets after every test run

Additional context

I have a recreation of #26835. My program runs Playwright (not for testing), and I added Playwright to test the UI that calls an API that runs Playwright on the backend. Tests are visible in the UI until the test finishes and then resets and loses all state/data/screenshots. This has never happened on any projects that only run Playwright as the test stack and not as the test stack interacting with a Playwright instance.

Here is the frontend package that's testing with an up to date Playwright

That UI is interacting with Playwright running on the backend via a WebSocket

Is it possible to get the test UI to work if with multiple Playwright instances working? The UI filter section doesn't mention any other Browsers, Pages or Contexts.

Environment

System:
    OS: macOS 14.4.1
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 18.96 MB / 16.00 GB
  Binaries:
    Node: 20.9.0 - /usr/local/bin/node
    Yarn: 1.22.21 - /usr/local/bin/yarn
    npm: 10.1.0 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  Languages:
    Bash: 3.2.57 - /bin/bash
@eighty4 eighty4 changed the title [Bug]: [Bug]: Multiple Playwright instances causes Playwright UI to drop data after tests run Apr 7, 2024
@mxschmitt
Copy link
Member

It's expected, that the UI Mode won't show the other Playwright instances, which were created on the backend. This is because the test-runner and the backend don't know each other in this case, and the backends Playwright instance did not run inside the test-runner process.

I tried to follow the repro instructions, but was not able to repro, it does not resets after ever test run. Could you maybe share a video or give us exact steps which buttons you click inside UI Mode?

Screen.Recording.2024-04-08.at.09.20.43.mov

@Solicia
Copy link

Solicia commented Apr 8, 2024

@mxschmitt , can you try without filtering the projects? In my repo I have three projects: setup, chromium and firefox. If i set the filter to any single one, it works as intended. However any combination, or "all", will result in all state being lost after tests are done.

@SrBrahma
Copy link

SrBrahma commented Apr 8, 2024

I am also having this issue on 1.43.0.

It only happens on a specific test, for whatever reason.

@eighty4
Copy link
Author

eighty4 commented Apr 8, 2024

After a restart and a new day the issue is no longer happening!

@mxschmitt
Copy link
Member

Since the original issue has been solved / cannot reproduced anymore, I'm going to close it.

For the others, please re-file with exact reproduction steps or a video + repository ideally, so we can reproduce it by following the steps, thanks for your understanding!

@mxschmitt
Copy link
Member

Looks like its the same as #30300 - I was able to repro it there.

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

No branches or pull requests

4 participants