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

[Regression]: Inspector and Browser doesn't close on CTRL+C #33000

Closed
Nav-2d opened this issue Oct 8, 2024 · 7 comments · Fixed by #33269
Closed

[Regression]: Inspector and Browser doesn't close on CTRL+C #33000

Nav-2d opened this issue Oct 8, 2024 · 7 comments · Fixed by #33269

Comments

@Nav-2d
Copy link
Contributor

Nav-2d commented Oct 8, 2024

Last Good Version

1.46.1

First Bad Version

1.47.2

Steps to reproduce

import { test, expect } from "@playwright/test";

test.only("get started link", async ({ page }) => {
  await page.goto("https://playwright.dev/");
  await page.getByRole("link", { name: "Get started" }).click();
  await expect(
    page.getByRole("heading", { name: "Installation" })
  ).toBeVisible();
});

Launch the debug mode using npx playwright test --debug

Expected behavior

Click CTRL+C and the inspector + browser should auto close

Actual behavior

Click CTRL+C and the inspector + browser doesn't auto close

Additional context

No response

Environment

OS: macOS 15.0
    CPU: (12) arm64 Apple M3 Pro
    Memory: 11.61 GB / 36.00 GB
  Binaries:
    Node: 20.11.1 - ~/.nvm/versions/node/v20.11.1/bin/node
    Yarn: 1.22.22 - /opt/homebrew/bin/yarn
    npm: 10.2.4 - ~/.nvm/versions/node/v20.11.1/bin/npm
  Languages:
    Bash: 3.2.57 - /bin/bash
  npmPackages:
    @playwright/test: ^1.47.2 => 1.47.2
@mxschmitt
Copy link
Member

I can't reproduce, for me it looks like this:

➜  1509 git:(master) ✗ npx playwright test --debug

Running 1 test using 1 worker
    1) [chromium] › feature-a.spec.ts:3:6 › get started link ─────────────────────────────────────────
^C
    Test was interrupted.

    Error: page.goto: Test ended.
    Call log:
      - navigating to "https://playwright.dev/", waiting until "load"


      2 |
      3 | test.only("get started link", async ({ page }) => {
    > 4 |   await page.goto("https://playwright.dev/");
        |              ^
      5 |   await page.getByRole("link", { name: "Get started" }).click();
      6 |   await expect(
      7 |     page.getByRole("heading", { name: "Installation" })

        at /Users/maxschmitt/Developer/tmp/1509/tests/feature-a.spec.ts:4:14

Testing stopped early after 1 maximum allowed failures.
  1 interrupted
    [chromium] › feature-a.spec.ts:3:6 › get started link ──────────────────────────────────────────
  1 error was not a part of any test, see above for details

To open last HTML report run:

  npx playwright show-report

Do you interact with the Inspector by any chance or just run the command, wait a bit and then do command + c?

@Nav-2d
Copy link
Contributor Author

Nav-2d commented Oct 8, 2024

Hi @mxschmitt - You don't need to interact with the inspector...just run the command and wait a bit and then do CTRL+C.
I see the same logs as you do but the browser and inspector is still present in the dock.
Screenshot 2024-10-08 at 10 48 45 AM

Also, I recently updated my mac to 15.0 so that could be an issue too.

@mxschmitt
Copy link
Member

I cannot reproduce, I'm also on 15.0, waited also a couple of minutes - could you try to reproduce it on a fresh project via npm init playwright@latest? Which Terminal are you using? VSCode or normal one?

@Nav-2d
Copy link
Contributor Author

Nav-2d commented Oct 8, 2024

Ok thanks Max. I will try to restart my mac (good old solution) and create a fresh project and update here later.

I am using VSCode terminal

@pavelfeldman
Copy link
Member

Thanks @Nav-2d! Responding this to clear the unread flag from our triaging system. Once you post the update we will take a look!

@Nav-2d
Copy link
Contributor Author

Nav-2d commented Oct 8, 2024

Works fine on a fresh project but still not working on my existing project. Tried re-installing node_modules and playwright browsers but no luck.

Oh well, I will keep debugging and will update here. Please feel free to close the issue and thanks for the help.

@pavelfeldman
Copy link
Member

Oh well, I will keep debugging and will update here. Please feel free to close the issue and thanks for the help.

With your permission!

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

Successfully merging a pull request may close this issue.

3 participants