Skip to content

Uncaught exception in web stream adapter #63761

@basro

Description

@basro

Version

V26.3.0

Platform

Microsoft Windows NT 10.0.19045.0 x64

Subsystem

No response

What steps will reproduce the bug?

Unfortunately, while I can reproduce the bug with certainty on my app. I have been unable to find a way to reproduce it in isolation.

This error is happening shortly after a TLSSocket that was adapted to web stream closes.

TypeError: Cannot read properties of undefined (reading 'error')
    at TLSSocket.<anonymous> (node:internal/webstreams/adapters:214:18)
    at TLSSocket.<anonymous> (node:internal/util:581:20)
    at TLSSocket.onerror (node:internal/streams/end-of-stream:261:14)
    at TLSSocket.emit (node:events:521:24)
    at emitErrorNT (node:internal/streams/destroy:170:8)
    at emitErrorCloseNT (node:internal/streams/destroy:129:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:90:21)

My hope is that the stack trace is enough to point to the cause of the error.
I will continue to try to isolate a reproduction.

How often does it reproduce? Is there a required condition?

It seems to happen 100% of the time in my app.

It does not happen in node v26.2.0.

What is the expected behavior? Why is that the expected behavior?

webstream adapters should not throw an uncaught exception

What do you see instead?

an uncaught exception is thrown

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions