-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
How to prevent an error that xhrSetup throws after package migration to v1.5.0? #6201
Comments
Hi @solprofi, Please provide a standalone example that reproduces the issue. Based on where the catch is something is throwing in What is the value of |
Hi @robwalch, great work on hls! I'm seeing So I'm seeing the errors Note: I'm using this hls as a dependency of another lib. Like @solprofi, I'm able to work around this by passing a config |
If you submit a PR that adds optional chaining operators to |
Thanks @robwalch I created a PR that fixes the |
Thanks for the PR @xta. I'll get it reviewed and merged. Do you need it in a patch for v1.5.x? I would still appreciate if you could provide steps to reproduce in this issue. Looking at the code I'm assuming that the instance of |
@robwalch I'm sorry I can't provide you with my next app to repro. The Thanks for your PR feedback! |
It's probably worth commenting on muxinc/elements@61a4cfe (cc @cjpillsbury) that the Using |
What do you want to do with Hls.js?
Hi!
I'm using hls.js in my React project.
After I updated the package from v1.4.14 to v1.5.0, I started seeing a new error in the console:
Uncaught (in promise) TypeError: Cannot read properties of null (reading 'onError')
It's coming from an internal method
loadInternal
(screenshot attached), which seems to be affected by xhrSetup.According to the docs, if xhrSetup throws, the error will be caught, and xhrSetup will be called a second time, which is exactly what's happening. The difference being that without any code changes from my side, the error is logged to the console in the latest version of the package.
I'm not doing anything special in my
xhrSetup
method:And if I remove this method from my hls config, the error goes away.
However, I haven't seen this error in the previous version of the package and I can't find anything related to this in the release changelog.
Could someone please point out if I can do anything to prevent this specific error from happening?
What have you tried so far?
No response
The text was updated successfully, but these errors were encountered: