Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
CoffeeFlux opened this issue Nov 20, 2024 · 7 comments
Open

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

CoffeeFlux opened this issue Nov 20, 2024 · 7 comments
Labels
bug Something isn't working H2 Pull requests or issues related to HTTP/2

Comments

@CoffeeFlux
Copy link

CoffeeFlux commented Nov 20, 2024

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

@CoffeeFlux CoffeeFlux added the bug Something isn't working label Nov 20, 2024
@metcoder95 metcoder95 added the H2 Pull requests or issues related to HTTP/2 label Nov 21, 2024
@metcoder95
Copy link
Member

If you can provide an
Minimum Reproducible Example that will be pretty useful

@CoffeeFlux
Copy link
Author

I'm certainly trying. It's difficult when it's seemingly caused by an error case I can't identify.

@metcoder95
Copy link
Member

I might have an idea of how; if it is in the GOAWAY frame, it might be worth it to try just the server send that frame with no request (or requests sparse in time), as I imagine this has to be with the fact of receiving the frame and no request actually being made.

(also checking this on my side)

@tsightler
Copy link

Isn't this a dupe of #3753?

@CoffeeFlux
Copy link
Author

CoffeeFlux commented Nov 21, 2024 via email

@metcoder95
Copy link
Member

If you can share a reproduction, that would be great; otherwise it can be a duplicate

@CoffeeFlux
Copy link
Author

CoffeeFlux commented Nov 22, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working H2 Pull requests or issues related to HTTP/2
Projects
None yet
Development

No branches or pull requests

3 participants