Commit 0483e17
authored
chore: camoufox-cloudflare e2e + camoufox-ts template on Playwright 1.60 (apify#3749)
The `camoufox-cloudflare` e2e started failing after apify#3717 (which fixed
challenge **detection** and removed a long-standing false-green). Once
detection was honest, two real problems surfaced. This also fixes the
`camoufox-ts` template, which apify#3742 broke.
## Fix the e2e (LOCAL / MEMORY)
- **`useFingerprints: false`** — Crawlee's fingerprint injection
conflicts with Camoufox's own anti-detection, so Cloudflare never
cleared the challenge. Disabling it matches the documented Camoufox
usage.
- **preNavigationHook page-error swallower** — Cloudflare's challenge
throws cross-origin `Script error.`s with no location; Camoufox's
juggler forwards them without a `location`, and Playwright 1.60+ then
crashes the driver on `pageError.location.url`. Playwright declined to
guard it (microsoft/playwright#40982); fixed producer-side in
daijro/camoufox#625 but not in a released Camoufox build yet, so we
swallow the errors until then (`TODO` to remove).
## Enable the PLATFORM variant
Skipped with a stale "fails to build the docker image" TODO. Real cause
was an `EACCES`: the Camoufox base image builds as non-root `myuser`, so
the copied workspace packages were root-owned and `npm` couldn't create
their `node_modules`. Rewrote the Dockerfile to a single stage that
copies with `--chown=myuser` (matching the `camoufox-ts` template) and
dropped the skip.
## Fix the `camoufox-ts` template
apify#3742 (renovate) bumped the template to `playwright: 1.61.0`, but
camoufox-js 0.11 ships Firefox 150, whose juggler Playwright 1.61 can't
drive — the browser fails to launch (`Browser.setDefaultViewport`
protocol error). Pinned back to **1.60**.
## Note
The e2e actor also stays on Playwright 1.60 for the same reason. Both
will be able to move to 1.61 once a Camoufox build for it ships.
Renovate will try to re-bump the template (playwright isn't in
`ignoreDeps`) — a scoped rule to hold it at 1.60 may be worth adding.1 parent 78f888d commit 0483e17
6 files changed
Lines changed: 56 additions & 20 deletions
File tree
- packages/templates/templates/camoufox-ts
- test/e2e/camoufox-cloudflare
- actor
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
29 | 37 | | |
30 | 38 | | |
31 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
2 | 4 | | |
3 | | - | |
4 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
5 | 13 | | |
6 | 14 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
| 15 | + | |
| 16 | + | |
19 | 17 | | |
20 | 18 | | |
21 | 19 | | |
22 | 20 | | |
23 | 21 | | |
| 22 | + | |
| 23 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
17 | 41 | | |
18 | 42 | | |
19 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
5 | 9 | | |
6 | 10 | | |
7 | 11 | | |
| |||
0 commit comments