Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Bug]: Playwright-launched Chrome window cannot be closed #39468

@knowonething

Description

@knowonething

Version

latest

Steps to reproduce

Environment: Windows 11 + WSL (Ubuntu 24).

Case 1: When using AutoGen to call playwright-mcp, normally the Chrome window launched by Playwright closes automatically after the code exits. However, occasionally the window cannot be closed. Specifically, ps cannot find any chrome or playwright-related processes, but the Chrome window is still visible on the screen. Windows Task Manager also does not show a corresponding process that can be identified as this window.

Case 2: When using agent-framework to call agent-browser (which is based on Playwright), the same issue sometimes occurs. In most cases, agent-browser close can close the window, but occasionally it cannot. The window remains open and cannot be closed through normal commands.

The only way I have found to completely remove the unclosable window is to restart the computer.

Expected behavior

The Chrome window launched by Playwright should be able to be closed normally, either by killing the related process or by clicking the × button on the window.

Actual behavior

The Chrome window cannot be closed. Clicking the × button has no effect. ps cannot find any related process. The page inside the window is also unresponsive and cannot be interacted with.

Additional context

No response

Environment

System:
    OS: Linux 6.6 Ubuntu 24.04.3 LTS 24.04.3 LTS (Noble Numbat)
    CPU: (32) x64 AMD Ryzen 9 7945HX with Radeon Graphics
    Memory: 2.70 GB / 15.46 GB
    Container: Yes
  Binaries:
    Node: 18.19.1 - /usr/bin/node
    npm: 9.2.0 - /usr/bin/npm
  IDEs:
    VSCode: 1.109.5 - /mnt/c/Users/user/AppData/Local/Programs/Microsoft VS Code/bin/code
    Claude Code: 2.1.50 - /home/user/.local/bin/claude
  Languages:
    Bash: 5.2.21 - /usr/bin/bash

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions