Skip to content

Commit f394c75

Browse files
authored
test: install matching Chromium in e2e playwright Dockerfile (#904)
## Summary The e2e `playwright.Dockerfile` does `pip install --force-reinstall -r requirements.txt`, which can pull a newer Playwright via `crawlee[playwright]` than the one pre-installed in the `apify/actor-python-playwright` base image. When that happens, the matching Chromium binary isn't on disk and the Actor fails at browser launch with: ``` BrowserType.launch_persistent_context: Executable doesn't exist at /pw-browsers/chromium_headless_shell-1223/chrome-headless-shell-linux64/chrome-headless-shell ``` This broke both `test_playwright_crawler` and `test_adaptive_playwright_crawler` on master after a fresh crawlee/playwright release. Failing CI run: https://github.com/apify/apify-sdk-python/actions/runs/26033470032/job/76525272306 ## Fix Run `playwright install chromium` after the pip force-reinstall so the browser binary always matches the just-installed Playwright version, regardless of how stale the base image's bundled Chromium is.
1 parent 1edc546 commit f394c75

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tests/e2e/test_crawlee/actor_source/playwright.Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,8 @@ RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
66

77
RUN pip install --force-reinstall -r requirements.txt
88

9+
# Reinstall the Chromium binary so it matches the just-installed Playwright version
10+
# (the base image's pre-installed browser can lag behind a newer Playwright pulled via crawlee[playwright]).
11+
RUN playwright install chromium
12+
913
CMD ["sh", "-c", "python server.py & python -m src"]

0 commit comments

Comments
 (0)