docs(playwright): warn against playwright install-deps without root#2737
Draft
DaveHanns wants to merge 1 commit into
Draft
docs(playwright): warn against playwright install-deps without root#2737DaveHanns wants to merge 1 commit into
DaveHanns wants to merge 1 commit into
Conversation
The `actor-node-playwright-*` Docker images already ship every system library Playwright needs, so users setting up a local Actor project should not run `npx playwright install-deps`. That command shells out to `sudo`/`su` to install Debian packages, and in unprivileged environments (agent sandboxes, restricted shells, some CI runners) it fails with a cryptic `su: must be suid to work properly. Failed to install browser dependencies.` message that offers no actionable next step. Add a note under "Node.js base images" in the Dockerfile reference that: - explains why `install-deps` is not needed when using the base image, - recommends `apify run` (which uses the image) or `apify push` followed by a remote run instead, and - calls out that `npx playwright install` (browser download only, writes to the user's cache dir) is still safe to run locally. Surfaced during an evaluation of Apify surfaces for agent-driven Actor development. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Summary
Add a note in the Dockerfile reference explaining that users developing a Playwright Actor locally should not run
npx playwright install-deps. That command requiressudo, and in unprivileged environments (agent sandboxes, restricted shells, some CI runners) it fails with a cryptic error and blocks the user from making progress.The
apify/actor-node-playwright-*base images already include every system library Playwright needs, so the workaround is just: rely on the base image viaapify run, or push to Apify and run remotely.Rationale
When a user new to Playwright follows the Playwright docs verbatim and runs the recommended local setup command:
...they hit a dead end. Nothing in the current Dockerfile docs tells them that this step is redundant when using an Apify base image. Adding one small note under the "Node.js base images" section prevents the whole class of "Playwright won't install locally" support questions.
Change
sources/platform/actors/development/actor_definition/docker.md— add a:::noteadmonition immediately below the Node.js base images table, covering:libnss3,libatk1.0-0, etc.playwright install-depsrequires root and will fail as shown above in unprivileged environments.apify run(uses the base image) orapify push+ run remotely.npx playwright install(browser binaries only, user-owned dir) is still fine.Test plan
apify run,apify push) resolve to the CLI reference.typos.toml.Surfaced during an evaluation of Apify surfaces for agent-driven Actor development.