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

feat(logs): Add extra logging for 3015 errors #4932

Merged
merged 2 commits into from
Jan 28, 2023

Conversation

PsychoSnake
Copy link
Contributor

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.

@PsychoSnake PsychoSnake changed the title Add extra logging for 3015 errors feat(logs): Add extra logging for 3015 errors Jan 25, 2023
@PsychoSnake
Copy link
Contributor Author

PsychoSnake commented Jan 25, 2023

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

@avelad avelad requested a review from joeyparrish January 25, 2023 11:36
@avelad avelad added type: enhancement New feature or request priority: P3 Useful but not urgent labels Jan 25, 2023
@@ -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',
Copy link
Contributor

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.

Copy link
Contributor Author

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

@@ -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',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@github-actions
Copy link
Contributor

Incremental code coverage: 100.00%

@avelad avelad requested a review from theodab January 27, 2023 12:00
@theodab theodab merged commit 67a2451 into shaka-project:main Jan 28, 2023
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Jul 25, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
priority: P3 Useful but not urgent status: archived Archived and locked; will not be updated type: enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants