You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
✖ repro (5.626125ms)
'Promise resolution is still pending but the event loop has already resolved'
ℹ tests 1
ℹ suites 0
ℹ pass 0
ℹ fail 0
ℹ cancelled 1
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 8.293458
✖ failing tests:
test at file:/Users/matteo/Repositories/node/repro.mjs:6:1
✖ repro (5.626125ms)
'Promise resolution is still pending but the event loop has already resolved'
It seems that #51255 unveiled a problem of a lingering promise not being resolved properly after the two MessagePorts have been closed.
Activity
mcollina commentedon Jan 16, 2024
cc @jasnell
H4ad commentedon Jan 16, 2024
Do you think the #51131 can fix both issues? Or did we just find a new bug after fixing the old bug?
mcollina commentedon Jan 16, 2024
I think this unveiled a new bug. I'm not sure if #51131 fixes it, I would not expect it to, but I haven't time to track down that lingering promise.
marco-ippolito commentedon Jan 16, 2024
I tested it on main but cannot reproduce it
mcollina commentedon Jan 16, 2024
This reproduces solidly on my end and undici CI on both Linux and Mac OS X, have you pulled the latest commits @marco-ippolito?
marco-ippolito commentedon Jan 16, 2024
Yes, head at
e133e5115a829aa7a445cfd8754df3a3dd586b0acleaned up build toomcollina commentedon Jan 16, 2024
fun! :D
RafaelGSS commentedon Jan 16, 2024
@marco-ippolito are you running it as a
.mjs?marco-ippolito commentedon Jan 16, 2024
Right I was running it as cjs 😮 so its mjs only infact as mjs I can reproduce
mcollina commentedon Jan 16, 2024
Even more fun!
H4ad commentedon Jan 16, 2024
Using
.mjsand #51131:Edit: I needed to revert #51255 in order to make the test work.
mcollina commentedon Jan 16, 2024
Based on nodejs/undici#2617 (comment), I propose we revert #51255 asap.
Trott commentedon Jan 22, 2024
Am I mistaken or should this be closed now that #51491 has landed and 21.6.1 has been released?
mcollina commentedon Jan 22, 2024
yes
anonrig commentedon Feb 28, 2024
Is it intended to throw when you try to transfer an already detached array buffer?
[Fix] `ES2015`+: `DetachArrayBuffer`: node v21.0.0+ structuredClone t…
[Fix] `ES2015`+: `DetachArrayBuffer`: node v21.0.0+ structuredClone t…
mcollina commentedon Feb 28, 2024
@anonrig you might want to open a fresh issue