[Bug]: page.evaluate in Chromium never settles when its argument nests 60 objects deep

Abierto
#44,060 5 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Ya se ha fusionado un pull request relacionado.

  • #44069 de @microsoft-playwright-automation — fusionado
  • #44070 de @yury-s — cerrado sin fusionar

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
25/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
node.js, typescript

Línea de trabajo

Start by reading the page.evaluate argument serialization path and the protocol handling for Chromium's Runtime.callFunctionOn response; the issue provides a reproducer in repro.mjs from the linked repository. Run it with arguments 59 and 60 objects deep and inspect the protocol trace. Done means the 60-deep call resolves or rejects with a useful depth error instead of hanging; two linked pull requests are already open.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

agent-triage
Version

main (d3ca7ab), with the Chromium it pins, 158.0.8127.18

Steps to reproduce
  1. Clone https://github.com/YevheniiKotyrlo/playwright-chromium-evaluate-deep-argument
  2. Run node repro.mjs with Node 18 or later and git. It clones main, runs npm ci and npm run build, installs the Chromium main pins, writes DEBUG=pw:protocol to a file, and in a new page calls
let argument = 0;
for (let level = 0; level < objects; level += 1) {
  argument = { children: [argument] };
}
await page.evaluate((value) => JSON.stringify(value).length, argument);

with objects at 59, then at 60, each raced against 10 seconds.

Expected behavior

The call with the argument 60 objects deep settles as the one 59 deep does: it resolves with the length, or rejects with an error that names the depth.

Actual behavior

It neither resolves nor rejects, so the caller waits until its own timeout. Chromium answers its Runtime.callFunctionOn with a parse error that carries no id:

microsoft/playwright d3ca7ab, Chromium 158.0.8127.18, Node v26.12.1, win32 x64
page.evaluate with an argument 59 objects deep: resolved with 886 after 14 ms
page.evaluate with an argument 60 objects deep: neither resolved nor rejected within 10 s after 10009 ms
Chromium's answer with no id: {"error":{"code":-32700,"message":"JSON: stack limit exceeded at position 2223"}}
summary: microsoft/playwright d3ca7ab with Chromium 158.0.8127.18 resolves page.evaluate with an argument 59 objects deep and neither resolves nor rejects it with one 60 deep
Environment
microsoft/playwright d3ca7ab, Chromium 158.0.8127.18, Node v26.12.1, win32 x64 (Windows 11 Pro)
Lenguaje dominante
TypeScript
Estrellas
99.7k
Forks
6.8k
Merge medio
16 h 10 min
PR fusionados (30 d)
301

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de microsoft/playwright

Todos los issues de microsoft/playwright

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.