Issue Task Resolved

#110472Stabilize browser test suites by awaiting php-fpm

Stefan Bürk 08/13/26, 10:43 updated 08/13/26, 14:15

Description

Problem

Browser based test suites fail sporadically on the very first expectation of a
test, although the HTTP request itself succeeds. Affected are the playwright
“e2e-install” and “e2e” suites and, on 13.4, the codeception acceptance suites.

Example, nightly job 5787899 of pipeline 106622 on branch 14.3:

bc. e2e-install/install-postgresql.spec.ts:25 – install TYPO3 on PostgreSQL (10.2s)
Error: expect(locator).toBeVisible() failed
Locator: getByText(‘Installing TYPO3’)
Timeout: 10000ms
Error: element(s) not found

The captured page snapshot shows what the browser actually received:

bc. Proxy Error
The proxy server could not handle the request
Reason: DNS lookup failure for: phpfpm

Cause

“Build/Scripts/runTests.sh” starts the php-fpm container and the apache
container directly after each other and then waits only for apache:

bc. waitFor web 80

Apache resolves the “phpfpm” network alias lazily, on the first proxied
request. When that request arrives before the container DNS has registered the
alias, mod_proxy answers with its own error page instead of proxying. Once a
mod_proxy worker is put into error state, apache does not retry it for 60
seconds by default, so the run cannot recover within the test timeout.

“waitFor web 80” only probes the apache listener. Neither the php-fpm backend
nor the resolvability of its network alias is ever awaited.

The failure is not specific to a database backend. In a CI like local sequence
the mariadb and mysql runs failed with exactly the same proxy error. postgres
merely lost the race in the reported job, where it is the third and, due to the
warm composer cache, fastest of the four bundled runs.

Solution

Wait for the php-fpm backend before any request can reach apache:

bc. waitFor phpfpm 9000
waitFor web 80

Call sites are runPlaywright() and runPlaywrightInstall() on main and 14.3, and
the four places starting an apache and php-fpm pair on 13.4.

Reproduced and verified locally on 14.3 with podman, PHP 8.2 and postgres 10.
An additional proxied request issued right after “waitFor web 80” amplifies the
existing race:

bc. unmodified, plain runs: 0 of 6 failed
unmodified, amplified: 3 of 6 failed
patched, amplified: 0 of 6 failed

Diagnostics

The failing job produced no usable evidence of the browser state. The
“e2e-install” playwright project sets retries to 0, while the shared
configuration uses trace on-first-retry, so a trace is never written, and no
screenshot is configured. Playwright does write its page snapshot into the
output directory “typo3temp/var/tests/playwright-results”, but the CI artifact
paths only collect “typo3temp/var/tests/playwright-reports”.

Adding the results directory to the artifact paths, and enabling trace
retain-on-failure plus screenshot only-on-failure for the e2e-install project,
makes such failures debuggable from the job artifacts alone.

Branches

Fix targets main, 14.3 and 13.4.

Reviews 3

History 312

  1. Stefan Bürk commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-08-13T14:15:13+00:00" > 08/13/26, 14:15 </span>

    Applied in changeset commit:8815be4fd013efcad46534942f8c9ec2ef4786fe.