[Bug]: Browser plugin — suite hangs silently with the websocket alive and the browser never navigating (distinct from #1801)
I maintainer di solito rispondono entro 5 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Tranquilla
- Stack tecnologico
- php, playwright
- Ambito
- testing-qa
Direzione di ricerca
Start with PlaywrightNpmServer::start() and Client::execute(), then reproduce the Browser testsuite hang in the containerised CI environment. Inspect the wait around poll_schedule_timeout and the server startup output. Done means the relevant waits are bounded and a failure reports enough server or websocket context to diagnose the stall.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What Happened
The browser suite hangs forever with zero output — not a test name, not a header — while every
component it depends on is demonstrably healthy. The Playwright server is listening, Chromium is running
with a live renderer, and PHP's websocket to the server is ESTABLISHED. PHP simply never issues the
navigation: it blocks in poll_schedule_timeout waiting for a websocket reply that never arrives.
Filed here because issues are disabled on pestphp/pest-plugin-browser.
Related but distinct from #1801. That one is the closed-connection case: receive() returns null
immediately and execute() busy-loops at ~100% CPU in state R. This is the opposite: the connection is
alive, receive() never returns, and the process sits idle in state S at 0% CPU. Same underlying design
gap — nothing in the stack bounds the wait — reached from the other direction, so a fix for #1801's empty-read
loop would not cover this.
Process photograph taken 150s into a hang, in CI:
php pest --testsuite=Browser ← blocked in poll_schedule_timeout, 0 bytes of output
└─ sh -c ./node_modules/.bin/playwright run-server --host 127.0.0.1 --port 50049 --mode launchServer
└─ node ./node_modules/.bin/playwright run-server …
└─ chrome-headless-shell --no-sandbox --headless
├─ gpu-process, network service
└─ renderer ← a page exists
tcp LISTEN 127.0.0.1:50049 playwright server
tcp LISTEN 127.0.0.1:35837 the plugin's in-process Amp HTTP server (the app)
tcp ESTAB 127.0.0.1:50049 ↔ :36284 PHP → playwright server
tcp ESTAB 172.26.0.5 → …:32826 Postgres
(nothing connected to 35837)
Nothing ever connects to the app's own HTTP server. So the stall is after PlaywrightNpmServer::start(),
after the websocket connect, and after a page has been created — but before the browser is told to navigate.
Two things make this undiagnosable from the outside, and both look worth bounding regardless of the root cause:
PlaywrightNpmServer::start()callssetTimeout(0)and then
waitUntil(str_contains($output, 'Listening on')). If that line never appears the suite waits forever,
having printed nothing at all — no header, no test name. A bounded wait with the server's own output on
failure would turn this class of problem into a message.Client::execute()has no bound on a reply either (the other half of #1801).
For what it's worth, the plugin declares PLAYWRIGHT_VERSION = '1.54.1' while resolving [email protected]
via ^1.62.1. That is constant across my working and failing environments so it is not the cause here,
but if the run-server protocol has moved between those versions it may be worth pinning or checking.
How to Reproduce
I cannot offer a minimal reproduction, and that is the honest state of it: the same suite, same commit, same
Playwright version passes locally in ~180s and hangs indefinitely in CI. The environmental difference is
a containerised Linux runner (ubuntu:24.04, jobs run as a non-root runner user, Docker available via a
sidecar daemon) versus a Windows host.
What I eliminated by direct probe rather than by argument, in case it saves anyone time:
| Suspect | Verdict |
|---|---|
playwright run-server fails to start |
Starts and prints Listening on ws://127.0.0.1:PORT/ in 4s |
| Chromium cannot launch in a container | chromium.launch() + newPage() + render + close all succeed |
| Chromium sandbox | Playwright already passes --no-sandbox; confirmed in the live process args |
| PHP version | Hangs identically on 8.3.33 and 8.5.9 |
A stale DB lock blocking migrate:fresh |
0 sessions on the test databases, 0 ungranted locks, still hangs |
| Playwright version mismatch | 1.62.1 in both the working and failing environments |
Package Versions
pestphp/pest4.4.3,pest-plugin-browser(bundled with that release)playwright1.62.1 (npm, lockfile-pinned)- PHP 8.5.9 and 8.3.33 (identical behaviour)
- Laravel 13, Postgres 18
- Fails: containerised
ubuntu:24.04CI runner. Passes: Windows 11 host.
- Lingua principale
- PHP
- Stelle
- 11.8k
- Fork
- 559
- Merge medio
- 5g 23h
- PR unite (30g)
- 24
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di pestphp/pest
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 5 giorni
-
[Bug]: --mutate hides unreadable files, so mutants behind a failed read can never be killedForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 5 giorni
-
[Bug]: [mutate] Windows: @pest-mutate-ignore comments land on line 1 in files with LF line endingsForse già presa @webdevsamran l’ha presa 57 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 5 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
I maintainer di solito rispondono entro 5 giorni
-
[pest-plugin-browser] Page::waitForLoadState() never sends its message — waitForEvent() is a silent no-opForse già presa @asllanmaciel l’ha presa 70 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
pestphp/pest#1892 · 2 commenti ·
I maintainer di solito rispondono entro 5 giorni
Tutte le issue di pestphp/pest
Issue simili
-
Group 2 - Data Storage | Tripal DBX | Chado Group 5 - Search | ElasticSearch | Views Priority - Medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
-
nginx update required due to NGINX2RootForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 65/100
mailcow/mailcow-dockerized#7668 · 5 commenti · 2 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
lara-zeus/spatie-translatable#80 ·
I maintainer di solito rispondono entro 1 giorno
-
small
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
uiowa/uiowa#10296 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
asyncapi/modelina#2709 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno