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
{{ message }}
Repository navigation
Uncatchable exception from webstream adapter #64120
import{connect,createServer}from"net";import{Duplex}from"stream";constserver=createServer();server.on("connection",(socket)=>{socket.end();});server.listen(8444,()=>{console.log("server listening on port 8444");});constsocket=connect({host: "localhost",port: 8444});constconn=Duplex.toWeb(socket);constreader=conn.readable.getReader();constwriter=conn.writable.getWriter();try{awaitreader.read();awaitwriter.close();}catch{}
How often does it reproduce? Is there a required condition?
Happens consistently on Node 26.3.0 and 26.3.1
Doesn't happen on Node 26.2.0
What is the expected behavior? Why is that the expected behavior?
It should not produce an uncatchable exception.
What do you see instead?
Node will exit with the uncaught exception:
node:internal/webstreams/adapters:224
controller.error(new AbortError());
^
TypeError: Cannot read properties of undefined (reading 'error')
at Socket.<anonymous> (node:internal/webstreams/adapters:224:16)
at Socket.<anonymous> (node:internal/util:581:20)
at Socket.onfinish (node:internal/streams/end-of-stream:238:16)
at Socket.emit (node:events:509:20)
at finish (node:internal/streams/writable:955:10)
at process.processTicksAndRejections (node:internal/process/task_queues:90:21)
Activity
stream: fix uncatchable error closing half-open Duplex.toWeb() writable
stream: fix uncatchable error closing half-open Duplex.toWeb() writable
stream: fix uncatchable error closing half-open Duplex.toWeb() writable
stream: fix uncatchable error closing half-open Duplex.toWeb() writable