Invalid string length
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- javascript, node.js, playwright
- Área
- devtools, testing-qa
Línea de trabajo
Comienza rastreando la instancia Step a través de safeSerialize() y luego hasta el Encoder.encodeAsString de socket.io-parser, utilizando los rangos de maxDepth indicados para reproducir el comportamiento. Comprueba el escenario I.amOnPage("https://github.com") en CodeceptUI y confirma que la serialización ya no provoca Invalid string length, mientras que la salida de finalización o fallo visual se sigue entregando.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Using a fresh installation of codeceptjs (v3.7.7) and @codeceptjs/ui (v1.3.8), when running a Hello World test (using both TypeScript and JavaScript, and both plain JS-driven scenario and Gherkin scenario), the UI keeps spinning endlessly, while giving me the following output in the terminal during the first I.amOnPage() statement (using https://github.com for this test purpose):
🌟 CodeceptUI started!
👉 Open http://localhost:3333 to see CodeceptUI in a browser
Unhandled rejection
Unhandled rejection
Application window opened, switch to it to run tests...
HTML Reporter: Starting HTML report generation...
CodeceptJS v3.7.7 #StandWithUkraine
Using test root "/path/to/tests"
Hello World --
As a Developer
I want to test Codecept.js with Gherkin
So I can make sure it will work for subsequent features
Unhandled rejection
Unhandled rejection
✖ Login page in 22208ms
-- FAILURES:
1) Hello World
Login page:
Invalid string length
RangeError:
at JSON.stringify (<anonymous>)
at Encoder.encodeAsString (node_modules/.pnpm/socket.io-parser@4.2.6/node_modules/socket.io-parser/build/cjs/index.js:93:25)
◯ File: file:///path/to/tests/features/hello.feature
◯ Scenario Steps:
✖ I.amOnPage("https://github.com") at ./definitions/steps.ts:12:7
◯ Metadata:
- browser: chromium
- browserVersion: 145.0.7632.6
- windowSize: 1280x720
FAIL | 0 passed, 1 failed // 23s
Run with --verbose flag to see complete NodeJS stacktrace
***************************************
nodeInfo: 24.10.0
osInfo: macOS 26.3
cpuInfo: (14) arm64 Apple M4 Pro
chromeInfo: 146.0.7680.153
edgeInfo: Not Found
firefoxInfo: Not Found
safariInfo: 26.3
playwrightBrowsers: "chromium: 145.0.7632.6, firefox: 146.0.1, webkit: 26.0"
If you need more detailed info, just run this: npx codeceptjs info
***************************************
HTML Report saved to: /path/to/tests/output/report.html
The actual code being executed is the following, in any case:
Feature('Hello World');
Scenario('Hello', ({ I }) => {
I.amOnPage('https://github.com');
I.see('GitHub');
});
I started the debugger and saw a Step instance being safeSerialize(), leading to the issue. I tried changing the maxDepth default argument value. The following lead to those results:
| maxDepth | result |
|---|---|
| 0 | No visual output (expected) |
| [1,9] | Worked (expected) |
| [10,17] | No visual completion output (kind of unexpected, haven't investigated) |
| [18,[ | Above error occurs, no visual failure output |
This was attempted with Node.js 20 and 24.
My best guess is we have some deep copies of certain large objects being serialized, I haven't investigated more into the issue. Happy to help reproduce and debug with whoever wants to give this a shot!
- Lenguaje dominante
- JavaScript
- Estrellas
- 84
- Forks
- 30
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de codeceptjs/ui
-
Dificultad 3/5 1-2 días Aptitud para principiantes 25/100
codeceptjs/ui#719 ·
-
_stringifyMetaStep crashes Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 55/100
codeceptjs/ui#685 ·
-
Outdates package/packages fix Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 52/100
codeceptjs/ui#673 ·
-
Missing CORS headers Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
codeceptjs/ui#536 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
codeceptjs/ui#189 ·
Todos los issues de codeceptjs/ui
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
area-deployment area-integrations triage:bot-seen
Dificultad 2/5 Medio día Aptitud para principiantes 86/100
-
Issue-Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
sugarlabs/musicblocks#8924 ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
ArduPilot/ardupilot_wiki#8088 ·
-
[BUG] createTool tools cannot be registered with Mastra when exactOptionalPropertyTypes is enabled Abiertocustomer-eng status: needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100