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

AbortController exception in the wrong place and cannot be caught #55742

Open
uriva opened this issue Nov 6, 2024 · 6 comments
Open

AbortController exception in the wrong place and cannot be caught #55742

uriva opened this issue Nov 6, 2024 · 6 comments

Comments

@uriva
Copy link

uriva commented Nov 6, 2024

Version

23.1.0

What steps will reproduce the bug?

the code in question is https://github.com/webtorrent/bittorrent-tracker/blob/master/lib/client/http-tracker.js#L147

I'm getting the DOMException from the line where the AbortController is created, that is outside the try/catch

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

Haven't been able to reproduce it locally, happens on a google cloud run instance

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

The exception should be caught by the try/catch

What do you see instead?

The exception is thrown from an unexpected location.

@avivkeller
Copy link
Member

Can you provide a minimal reproduction?

@uriva
Copy link
Author

uriva commented Nov 7, 2024

@redyetidev I think this is fixed by nodejs/undici#3354 which iiuc is part of unidici 7.0.0

Any idea how I can get this fix in my docker image today? (I don't care which node I'm running)

@avivkeller
Copy link
Member

You can manually use undici? Or build Node.js manually with the upgraded version.

@uriva
Copy link
Author

uriva commented Nov 8, 2024

Actually I see this still hasn't been fixed. There is an active discussion about fix/WAI/bug that I haven't been able to fully figure out.

@geeksilva97
Copy link
Contributor

Actually I see this still hasn't been fixed. There is an active discussion about fix/WAI/bug that I haven't been able to fully figure out.

Could you leave a repro on this issue then?

@uriva
Copy link
Author

uriva commented Nov 12, 2024

@geeksilva97 I don't have a repro, it happens in production under unknown conditions, but others have experienced the same issue, and the same fix works for everyone. You can see the discussion in the pr I linked above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants