feat: Auto-install Playwright browsers on container start#1005
Open
moortekweb-art wants to merge 1 commit intoagent0ai:mainfrom
Open
feat: Auto-install Playwright browsers on container start#1005moortekweb-art wants to merge 1 commit intoagent0ai:mainfrom
moortekweb-art wants to merge 1 commit intoagent0ai:mainfrom
Conversation
Add automatic Playwright browser installation to the container entrypoint. This ensures browser automation works without manual intervention, even after container rebuilds or cache clearing. Changes: - Check if playwright command is available - Only install if browsers are not already present - Install only Chromium by default (lightweight) - Silent failure doesn't break container startup Note: System dependencies for Playwright (libgstreamer, libnss3, etc.) should be installed in the base image for this to work properly.
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.
Problem
When using Playwright for browser automation in Agent Zero, browsers need to be installed separately. If the container is rebuilt or the Playwright cache is cleared, browser automation fails silently.
Solution
Add Playwright browser auto-installation to the container entrypoint script (run_A0.sh). This ensures browsers are always available without manual intervention.
Changes
File: docker/run/fs/exe/run_A0.sh
Notes
For Playwright to work, system packages (libgstreamer, libnss3, libcups2, etc.) should be in the base image.
Testing