Skip to content

Playwright-MCP 0.0.22 is causing " Execution context was destroyed, most likely because of a navigation" failures with an existing browser #439

Closed
@mastrzyz

Description

@mastrzyz

Updating @playwright/mcp from 0.0.20 to 0.0.22

Gives us the following error

Error: MCP Tool browser_snapshot failed with error: [{"type":"text","text":"Error: page._snapshotForAI: Execution context was destroyed, most likely because of a navigation"}]

The Tool with this error is browser_snapshot

We start the @playwright/mcp programatically with an already running browser :

  const server = await createConnection({
    browser: {
      cdpEndpoint: `http://localhost:${CDP_PORT}`,
    },
  });

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