-
Notifications
You must be signed in to change notification settings - Fork 152
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 'trim') #379
Comments
Same |
Looks related to hls.js v1.5.x released 2 days ago. I added version="1.4.14" as workaround in the Hls props to mitigate this issue. debug logs:
|
did you by any chance get a workaround on this? especially on hls videos? |
A workaround is (like @ashveen mentioned):
Just use the older version 1.4.14 of the HLS package, not the latest one. |
Thanks for the quick workaround @ashveen |
Yeah, that seems to be a bad implementation in @vime/vue for using dependencies with cdn @mihar-22, I know this is not actually your package fault but in case if you use all other dependencies with their cdn. they will get updated from time to time even with bugs that what users currently face even they don't have updated their package. As you guys are going toward #Vidtack package. Please keep in mind that you should use dependencies as module part of your package not as cdn So, your package could be stable till every update you launch. |
Downgrading HLS to 1.4.14 does not fix the issue on Safari. On desktop Safari half the times it works other half not. |
On Safari this seems to be related to how sources are used. In Chrome the actual m3u8 URL with type Here's how it looks in Chrome for comparison: |
I've turned on debug logs in HLS.js in Safari and collected this one: Tracking it down I've noticed HLS.js sets an object URL and changes the This fires the
This listener is called with the And then again after the element was replaced with This appears to be happening right here:
onSrcChanged event fires when get src() returns something else. It's returning nothing since it only looks for m3u8 or the mpeg content type. Either way it doesn't find it and the loadSource function is called again with undefined .
Investigating fixes; I'm not familiar with Vime's build pipeline but it seems like this could be the hotspot to focus on. |
I've put together a change that seems to have fixed the problem; a cache has been added to the HLS source URL that will return if it ends up getting set. That way if HLS.js sets the URL to an object URL it won't try to load the new |
Hi,
since the 10.01.2024 all our users get the bug:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'trim')
at Object.buildAbsoluteURL (url-toolkit.js:21:33)
at e.loadSource (hls.ts:401:39)
at HLS. (video-player
user-account.js?id=fd885bb62350cccedb83:82493:65)user-account.js?id=fd885bb62350cccedb83:82360:67at Generator.next ()
at video-player
at new Promise ()
at push../node_modules/@vime/core/dist/custom-elements/index.js.__awaiter$f (video-player
user-account.js?id=fd885bb62350cccedb83:82346:10)user-account.js?id=fd885bb62350cccedb83:82490:12)at HLS.onSrcChange (video-player
at t. (video-player~user-account.js?id=fd885bb62350cccedb83:82413:16)
at o.emit (index.js:203:33)
when using the HLS Player. I didn't change the code for months.
There was a Chrome, Edge, Safari Update on the 10.01.24 and that's when the errors started. Could it be a problem on your end ?
EDIT:
Your HLS demo has the same issue:
https://vimejs.com/demo
The text was updated successfully, but these errors were encountered: