-
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
feat(logs): Add extra logging for 3015 errors #4932
feat(logs): Add extra logging for 3015 errors #4932
Conversation
Not sure what title prefix should be added to this type of PR as im only adding some logs. If the current one is wrong would appreciate some guidance |
lib/media/media_source_engine.js
Outdated
@@ -1265,6 +1265,7 @@ shaka.media.MediaSourceEngine = class { | |||
shaka.util.Error.Severity.CRITICAL, | |||
shaka.util.Error.Category.MEDIA, | |||
shaka.util.Error.Code.MEDIA_SOURCE_OPERATION_THREW, | |||
this.video_.error || 'No error in the media element', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be the second data item, not the first, so as to not change the order of the data items. E.g. so that people checking error.data[0]
to find what the exception was won't suddenly be seeing the video error instead.
You should also update the documentation for this error code, in lib/util/error.js
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. Have changed it now
lib/media/media_source_engine.js
Outdated
@@ -1308,6 +1309,7 @@ shaka.media.MediaSourceEngine = class { | |||
shaka.util.Error.Severity.CRITICAL, | |||
shaka.util.Error.Category.MEDIA, | |||
shaka.util.Error.Code.MEDIA_SOURCE_OPERATION_THREW, | |||
this.video_.error || 'No error in the media element', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Incremental code coverage: 100.00% |
Our PROD app has been getting some 3015 errors where the exception message is as follows:
Error: Failed to execute 'appendBuffer' on 'SourceBuffer': The HTMLMediaElement.error attribute is not null
We have added some extra logging to add what is inside the error property in hopes of having a better ideia of what is causing it since we ourselves haven't quite been able to reproduce the issue.
Wanted to bring this back to the main repo in case it could help others. Because the exception Shaka gets only has that message so could be useful to know what was the exact error that the media element got that caused the
appendBuffer
call to fail.