Fix Playwright ERR_BLOCKED_BY_CLIENT in Docker by adding sandbox bypass flags#691
Merged
Fix Playwright ERR_BLOCKED_BY_CLIENT in Docker by adding sandbox bypass flags#691
Conversation
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix Playwright MCP server browser navigation error due to security policy
Fix Playwright ERR_BLOCKED_BY_CLIENT in Docker by adding sandbox bypass flags
Feb 5, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes the Playwright MCP server's browser navigation failure in Docker environments by adding required Chromium sandbox bypass flags and enhanced security documentation.
Changes:
- Added Docker-specific Chromium launch flags (
--no-sandbox,--disable-setuid-sandbox,--disable-gpu) toPLAYWRIGHT_LAUNCH_OPTIONS - Enhanced security warning with explicit multi-line documentation about disabled security features
- Added reference to official Playwright Docker documentation
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Playwright MCP server was failing navigation with
ERR_BLOCKED_BY_CLIENTdespite container launching successfully. Chromium's sandbox requirements aren't met in Docker containers without explicit bypass flags.Changes
Added Docker-specific Chromium launch flags to
PLAYWRIGHT_LAUNCH_OPTIONS:--no-sandbox- bypass Linux sandbox restrictions--disable-setuid-sandbox- additional sandbox bypass--disable-gpu- disable GPU acceleration (unavailable in headless containers)Enhanced security warning to explicitly note these flags disable critical browser protections and should only be used in controlled CI environments.
Standard pattern for Playwright in Docker per official docs.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.