-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Bug Report: Browser state not properly released after browser_close #1245
Description
Bug Report: Browser state not properly released after browser_close
Environment:
- OS: Windows 10/11
- Playwright MCP Server version: (latest)
- Chrome profile path: C:\Users<user>\AppData\Local\ms-playwright\mcp-chrome-18000cd
Description:
After calling browser_close, the MCP server's internal "browser in use" flag is not reset. Subsequent calls to browser_navigate,
browser_tabs, or any browser operation fail with:
Error: Browser is already in use for C:\Users\alide\AppData\Local\ms-playwright\mcp-chrome-18000cd, use --isolated to run
multiple instances of the same browser
Steps to Reproduce:
- Use browser_navigate to open a page
- Call browser_close
- Attempt to use browser_navigate again
Expected Behavior:
After browser_close, the MCP server should reset its internal state and allow a new browser session to be started with
browser_navigate.
Actual Behavior:
The MCP server returns "Browser is already in use" error even though:
- browser_close returned successfully with "No open tabs"
- The Chrome lock files (SingletonLock, SingletonSocket, SingletonCookie) were removed
- No Playwright-controlled Chrome window is visible
Workaround:
Restart Claude Code to restart the MCP server.
Additional Context:
The error originates from the MCP server's internal state management, not from Chrome's profile locking mechanism.