Skip to content

Logged in to sites, but the browser window opened by Playwright is not logged in #584

Closed
@alza-bitz

Description

@alza-bitz

Hi there,

My setup is as follows, I'm on Windows with MS edge, using Playwright with VSCode dev containers..

  1. Login to a website xyz, any can be used
  2. Start Playwright with npx @playwright/mcp@latest --port 8931 --browser msedge
  3. Open VSCode, create and start a VSCode dev container
  4. Install MCP server in VSCode with user settings:
    "mcp": {
        "servers": {
            "playwright-host": {
                "url": "http://localhost:8931/sse"
            }
        }
    }
  1. Open CoPilot in agent mode and add all Playwright tools
  2. Prompt CoPilot with a simple instruction, e.g. open website xyz

Expected:
Playwright opens a browser window on the host with site xyz, and it is logged in

Actual:
Playwright opens a browser window on the host with site xyz, but it is not logged in.

So it works, except for being logged in. Some kind of problem with cookies or sessions not being propagated, or did I do something wrong with my setup steps?

Note: I'm connecting to the Playwright MCP server using HTTP instead of a Playwright node module installed in the container, because I am issuing my CoPilot prompts from dev containers but I want to communicate with my host browser rather than some headless browser installed in the container.

Thanks 🙏

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