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]: Chrome tab and inspector not closing after terminating session in terminal #33204

Closed
romankhomitskyi opened this issue Oct 21, 2024 · 8 comments · Fixed by #33269
Closed
Assignees
Labels

Comments

@romankhomitskyi
Copy link

Version

1.47.1

Steps to reproduce

repro.bug.mp4

Expected behavior

Chrome tab and the inspector should be closed when using Сontrol + C in terminal

Actual behavior

Chrome tab and inspector not closed, next runs of your testsnpx playwright test crawler.spec.ts --debug multiplying chrome tab and inspector

Additional context

in 1.46.0 PW version everything is ok

Environment

OS: macOS 14.6.1
CPU: (10) arm64 Apple M1 Max
Memory: 182.75 MB / 32.00 GB
Binaries:
Node: 20.15.1 - ~/.nvm/versions/node/v20.15.1/bin/node
Yarn: 1.22.22 - ~/.nvm/versions/node/v20.15.1/bin/yarn
npm: 10.7.0 - ~/.nvm/versions/node/v20.15.1/bin/npm
IDEs:
VSCode: 1.92.2 - /usr/local/bin/code
Languages:
Bash: 5.2.15 - /opt/homebrew/bin/bash
npmPackages:
@playwright/test: 1.47.1 => 1.47.1

@romankhomitskyi romankhomitskyi changed the title [Bug]: [Bug]: Chrome tab and inspector not closing after terminating session in terminal [Bug]: Chrome tab and inspector not closing after terminating session in terminal Oct 21, 2024
@mxschmitt
Copy link
Member

I unfortunately can't reproduce - does this happen on a new project you create with npm init playwright@latest?

@romankhomitskyi
Copy link
Author

I unfortunately can't reproduce - does this happen on a new project you create with npm init playwright@latest?

I tried npm init playwright@latest clean project, and found out that it has smth to do with screenshot: 'only-on-failure' in config
once you add it, you cannot terminate debug mode

@romankhomitskyi
Copy link
Author

Image
Image

@romankhomitskyi
Copy link
Author

It eventually closes, but not immediately as it without screenshot option, it takes some time to close

@mxschmitt
Copy link
Member

Sorry to hear! For us its really hard to debug issues like this which we can't reproduce.

Could you try it with a normal Terminal instead of the IDE terminal?

Otherwise I would recommend bisecting (checking which versions is the exact daily one which was the last good / bad one which was working from our Canary builds.

Does it also happen if you set trace to off? So if you update Playwright to v1.49 which is the latest version and set screenshot to off its also good?

@romankhomitskyi
Copy link
Author

Sorry to hear! For us its really hard to debug issues like this which we can't reproduce.

Could you try it with a normal Terminal instead of the IDE terminal?

Otherwise I would recommend bisecting (checking which versions is the exact daily one which was the last good / bad one which was working from our Canary builds.

Does it also happen if you set trace to off? So if you update Playwright to v1.49 which is the latest version and set screenshot to off its also good?

The last good version: 1.46.1
Bad version: 1.47.0, 147.1, 1.48.0

I am using clean npm init playwright@latest project, nothing more

Does it also happen if you set trace to off - yes

reprosss.mp4

@mxschmitt
Copy link
Member

mxschmitt commented Oct 23, 2024

I can reproduce, thank you!

1.47.0-alpha-2024-08-29 bad
1.47.0-alpha-2024-08-28 good
RANGE: 0b5456d...6763d5a

@mxschmitt
Copy link
Member

Repro steps:

  1. Apply this diff
diff --git a/tests/library/playwright.config.ts b/tests/library/playwright.config.ts
index 759dc70ed..31834b00a 100644
--- a/tests/library/playwright.config.ts
+++ b/tests/library/playwright.config.ts
@@ -122,6 +122,7 @@ for (const browserName of browserNames) {
         devtools
       },
       trace: trace ? 'on' : undefined,
+      screenshot: 'only-on-failure',
     },
     metadata: {
       platform: process.platform,
  1. DEBUG=pw:api,pw:channel,pw:browser npm run ctest -- fill:23 --debug
  2. Press Command + C in the terminal

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

Successfully merging a pull request may close this issue.

3 participants