-
Notifications
You must be signed in to change notification settings - Fork 26
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 [ERR_INVALID_ARG_TYPE]: The "event" argument must be an instance of Event #73
Comments
I was able to reproduce the bug also in your unit test. If you use the native AbortController definition, the app crashes. |
Good catch @andreainnocenti. I'll pick this up and get it fixed soon. |
Hi @JoshMock, any update on this bug? |
I got sidetracked! I'm planning to publish some upgrades in the next few days so I'll try to fit this in. |
Got a fix for this in #78. I have another PR pending before I planned to push a new version to npm, but if that gets delayed I will try to remember to push a patch version in the next few days. |
* Dispatch events AbortSignal properly See #73 * Explicitly drop support for Node.js 14
8.4.0 was published today, including a fix for this. |
It's not uncommon that somebody already opened an issue or in the best case it's already fixed but not merged. That's the reason why you should search at first before submitting a new one.
Please read this entire template before posting any issue. If you ignore these instructions
and post an issue here that does not follow the instructions, your issue might be closed,
locked, and assigned the
not reproducible
label.🐛 Bug Report
According to https://nodejs.org/api/events.html#eventtargetdispatcheventevent, the
dispatchEvent
function must take in input an Event object but in https://github.com/elastic/elastic-transport-js/blob/v8.3.4/src/connection/UndiciConnection.ts#L144, the input is a string.Currently our microservice crashes if the search reaches the timeout:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Do not crash in case of timeouts.
Your Environment
@elastic/elasticsearch
version: >=8.7.0The text was updated successfully, but these errors were encountered: