-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Safari Fairplay: null is not an object (evaluating 'n.g.initData') #4902
Comments
I don't doubt your data on this, but it's not enough for us to debug the issue. If you have a way to reliably reproduce the issue in the future, please let us know. |
I did some quick digging, and the only instance of shaka-player/lib/media/drm_engine.js Line 483 in eeb647c
There are two places where If you think this could be it, I could work on a PR to mitigate the issue. |
A PR would be welcome, even without solid repro. It would be really great if you could come up with a unit test that reproduces the condition, though. With other components and browser APIs mocked out, it is often feasible to control the timing of things that are normally asynchronous, and to reproduce unlikely race conditions. |
This issue just increased by several magnitudes in our error tracking systems, from once or twice every other day to dozens per day. My thought is that it's hiding a deeper DRM/content problem (on our side). I'll be looking more at it and put up a PR for discussion. |
Closes #4902 This is not intended to be a complete fix for the issue, I do not understand the effect this new ternary on the shaka player as a whole. I have not found the root cause for `this.currentDrmInfo_` being `undefined` when accessed. It does, however, look like it has previously been acceptable for this property to be `undefined`. During the work to add Fairplay support in 2022, accessing `this.currentDrmInfo_` was added on line 483. This line **does not** accept that `this.currentDrmInfo_` can be undefined. A few lines below this, `this.createOrLoad()` is called, which **does** accept that `this.currentDrmInfo_` can be `undefined`. The latter piece of code was last modified in 2019. https://github.com/shaka-project/shaka-player/blob/c471d23bc25db11dda85a18870ebd3fe37971848/lib/media/drm_engine.js#L483-L498 https://github.com/shaka-project/shaka-player/blob/c471d23bc25db11dda85a18870ebd3fe37971848/lib/media/drm_engine.js#L626-L629
Closes #4902 This is not intended to be a complete fix for the issue, I do not understand the effect this new ternary on the shaka player as a whole. I have not found the root cause for `this.currentDrmInfo_` being `undefined` when accessed. It does, however, look like it has previously been acceptable for this property to be `undefined`. During the work to add Fairplay support in 2022, accessing `this.currentDrmInfo_` was added on line 483. This line **does not** accept that `this.currentDrmInfo_` can be undefined. A few lines below this, `this.createOrLoad()` is called, which **does** accept that `this.currentDrmInfo_` can be `undefined`. The latter piece of code was last modified in 2019. https://github.com/shaka-project/shaka-player/blob/c471d23bc25db11dda85a18870ebd3fe37971848/lib/media/drm_engine.js#L483-L498 https://github.com/shaka-project/shaka-player/blob/c471d23bc25db11dda85a18870ebd3fe37971848/lib/media/drm_engine.js#L626-L629
Closes #4902 This is not intended to be a complete fix for the issue, I do not understand the effect this new ternary on the shaka player as a whole. I have not found the root cause for `this.currentDrmInfo_` being `undefined` when accessed. It does, however, look like it has previously been acceptable for this property to be `undefined`. During the work to add Fairplay support in 2022, accessing `this.currentDrmInfo_` was added on line 483. This line **does not** accept that `this.currentDrmInfo_` can be undefined. A few lines below this, `this.createOrLoad()` is called, which **does** accept that `this.currentDrmInfo_` can be `undefined`. The latter piece of code was last modified in 2019. https://github.com/shaka-project/shaka-player/blob/c471d23bc25db11dda85a18870ebd3fe37971848/lib/media/drm_engine.js#L483-L498 https://github.com/shaka-project/shaka-player/blob/c471d23bc25db11dda85a18870ebd3fe37971848/lib/media/drm_engine.js#L626-L629
Have you read the FAQ and checked for duplicate open issues?
Yes
What version of Shaka Player are you using?
4.2.X
Can you reproduce the issue with our latest release version?
Presumably, need huge volumes of plays to see issue, and cannot take 4.3.X to prod.
Can you reproduce the issue with the latest code from
main
?n/a
Are you using the demo app or your own custom app?
custom
If custom app, can you reproduce the issue using our demo app?
n/a
What browser and OS are you using?
Safari, Mac OS
What did you do?
Check our playback error metrics, and noticed unhandled errors thrown inside of Shaka. The errors are rare, in the magnitude of a handful per thousands of plays.
useNativeHlsOnSafari: true
Play Fairplay DRM streams
What did you expect to happen?
Shaka plays the stream, or throws a Shaka Error.
What actually happened?
Shaka crashes with a native ReferenceError
null is not an object (evaluating 'n.g.initData')
Note: The issue is probably in our streams, but Shaka probably shouldn't crash with a ReferenceError when it happens.
The text was updated successfully, but these errors were encountered: