Skip to content

TypeError: Cannot read properties of undefined (reading 'onError') #3857

@CoffeeFlux

Description

@CoffeeFlux

Bug Description

Some requests made through Undici with HTTP 2 seem to result in the following:

    at Object.errorRequest (/workspace/node_modules/undici/lib/core/util.js:638:13)
    at ClientHttp2Session.onHTTP2GoAway (/workspace/node_modules/undici/lib/dispatcher/client-h2.js:245:8)
    at ClientHttp2Session.emit (node:events:517:28)
    at ClientHttp2Session.emit (node:domain:489:12)
    at Http2Session.onGoawayData (node:internal/http2/core:677:11)

Reproducible By

Unfortunately, I don't have a nice way to reproduce this locally; I've only seen it on prod. I'm trying to get a repro and if I can find one I'll update this issue. I opened this in the meantime to see if I'm doing something wrong or if the stack trace alone is helpful in fixing it.

Expected Behavior

No type error.

Logs & Screenshots

Environment

Ubuntu 20.04, Node 16, Undici 6.20.1

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    H2Pull requests or issues related to HTTP/2bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions