Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Three Playwright/Apify bugs that took me way too long to find (and the fixes)

Описание и применение

Три скрытых бага в Playwright + Camoufox + Apify Actor, которые привели к сбоям, зависаниям и потере данных. Решения: закрепить Playwright 1.60.0, заменить .click() на .fill() для текстовых полей, убедиться, что входные данные всегда возвращают результаты, и использовать именованный ключ‑значение‑хранилище для сохранения состояния.

Задача

Three subtle bugs in a Playwright + Camoufox + Apify Actor caused failures, hangs, and data loss, wasting development time.

Результат

Actor runs reliably, no hangs, data persists, and daily tests pass.

Рабочий процесс

  • 1. Identify Playwright/Camoufox version incompatibility by checking launch errors.
  • 2. Pin Playwright to 1.60.0 instead of the base image’s 1.61.0.
  • 3. Replace Locator.click() on text inputs with Locator.fill(value) to avoid intermittent hangs.
  • 4. Ensure default Actor input returns results consistently and fits within the 5‑minute SLA.
  • 5. Use Actor.openKeyValueStore(name=…) to persist state across runs.
  • 6. Test Actor daily to confirm success and non‑empty dataset.

Доказательства

Pinning playwright==1.60.0 fixed it immediately.

Источник

If your default input is a narrow query that occasionally has zero real-world matches, a perfectly correct run with zero results still counts as a failure.

Источник

  • Дата записи: 2026-09-12T15:32:35.990Z