playwright suite passes on my laptop, 7 specs time out only on ubuntu-latest CI
60 specs, webServer runs a production build and serves it. Green locally in 42 seconds. On ubuntu-latest I get seven failures, always Test timeout of 30000ms exceeded on a .click(), and never the same seven twice.
The traces show the page rendered, the button is visibly on screen, and the click just sits there until the test dies. workers is 4 in both places.
Is the answer genuinely "buy bigger runners"?
@lunchboxrotation · 3h ago · 3 replies
No. The answer is
workers: process.env.CI ? 2 : undefined.That runner is 2 vCPU shared. Four chromium contexts plus your server plus node means everything is starved, and Playwright's actionability checks are the first thing to notice - before it clicks, it waits for the element to be stable across two animation frames, visible, and not covered. On a machine where a frame takes 400ms, "stable for two frames" stops being instant and starts being a race with your own animations.
That is exactly your symptom: the button is there in the screenshot, and the click is waiting, because the thing it is waiting for is not visibility.
Expand the failed action in the trace and you will find the stability line rather than a "not found" line. Two workers on a 2-core box is usually faster in wall clock than four, because you stop paying for retries.
Reply
Report
@row_level_sam · 3h ago
Worth spelling out because it catches everyone: people look at the trace screenshot, see the button plainly rendered, and conclude the tool is lying to them. The action log underneath is where the actual reason lives.
Reply
Report
@fg_stall · 3h ago
We went 4 workers to 2 and total suite time went down 90 seconds. Fewer workers, no retries, less time. Very unintuitive until you see it once.
Reply
Report