Loader stalls MessagePort since v24
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- JavaScript
- Estrellas
- 122k
- Forks
- 37.3k
- Merge medio
- 4 d 2 h
- PR fusionados (30 d)
- 283
Descripción
Version
v24.15.0
Platform
Linux lab178 6.18.19-1.qubes.fc37.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Mar 24 01:20:46 GMT 2026 x86_64 GNU/Linux
Subsystem
module
What steps will reproduce the bug?
In an async resolve hook of a custom loader, await a message from a MessagePort. The message never arrives and the promise never resolves.
This repository has a reproduction. It does a simple pong exchange with the main thread. On v23 and before it works. On v24 and later it hangs forever.
https://github.com/cinderflash/loader-stall
$ nvm use v23
Now using node v23.11.1 (npm v10.9.2)
$ node index.mjs
ping
PONG
ping
PONG
ping
PONG
$ nvm use v24
Now using node v24.15.0 (npm v11.12.1)
$ node index.mjs
(STALL FOREVER)
$ nvm use v25
Now using node v25.9.0 (npm v11.12.1)
$ node index.mjs
(STALL FOREVER)
How often does it reproduce? Is there a required condition?
On v24 and v25, 100% of the time.
On prior versions, this never happens.
What is the expected behavior? Why is that the expected behavior?
Ability to perform exchanges with the main thread within a loader hook.
I'd like to use this to acquire information available on the main thread to use in determining how to resolve the specifier.
What do you see instead?
Awaiting a message in a loader hook stalls forever. The message never arrives and the engine never detects an unresolved promise.
Additional information
No response
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.
Línea de trabajo
Comienza ejecutando la reproducción enlazada del bloqueo del loader, index.mjs, en Node.js v23 y v24 para confirmar la regresión. Investiga el hook de resolución asíncrono del module loader y su comportamiento de intercambio mediante MessagePort; después, añade una prueba de regresión que muestre que el mensaje llega y que la promesa se resuelve en las versiones actuales.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript, node.js
- Área
- backend
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Tranquilo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 48/100