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

Problems following error handling and retries documentation on Shaka 4.8.5 #6644

Closed
diego-za opened this issue May 21, 2024 · 3 comments
Closed
Assignees
Labels
status: archived Archived and locked; will not be updated type: docs Improvements or fixes to documentation type: question A question from the community
Milestone

Comments

@diego-za
Copy link

Have you read the Tutorials?
Yes

Have you read the FAQ and checked for duplicate open issues?
Yes, I also followed this https://shaka-player-demo.appspot.com/docs/api/tutorial-errors.html

If the question is related to FairPlay, have you read the tutorial?
not related

What version of Shaka Player are you using?
4.8.5

What browser and OS are you using?
125.0.6422.61 and Windows 11

Please ask your question
I need a custom error handling and I'm having troubles undestanding how it works on the new version.

To replicate the errors I'm using fiddler, I'm blocking the requests of the segments and attaching a status code: 404. Shaka throws two errors almost at the same time for both audio and video segment, so I'm ignoring the second one.

The custom error handling is like this:

  1. Ignore the first three streaming network errors (statusCode: 404). At the third error skip two seconds and retry streaming.
  2. After three skips throw the error and destroy the player.

Previously on version 4.3.5 I managed it like this using the failureCallback:

  • Set retryAttempts: 1 on streaming configuration so every error go to the failureCallback
  • Ignore the first two streaming error with retryStreaming
  • When the third error happen, ignore it, skip two second and call retryStreaming
  • Repeat the three request and skip again
  • After three skip throw the error and destroy the player.

Now with the new version 4.8.5 I noticed something different:

  • with 404 network errors failureCallback is not called anymore
  • the errors are visible only by listening on the error event after n retryAttempts (based on the streaming config)
  • listening the retry event from the networkingEngine and throwing an error from inside the callback does not stop retries or convert the error.
  • retryStreaming is not working, looks like Shaka just keep retrying even after the max retryAttempts are done, does not matter if I call retryStreaming or not
  • Sometimes the retries stop for a while and then start again, I tried changing all the timeout values on the streaming config and it didnt change this behaviour.

What am I doing wrong?
How should I apply my custom logic? Is there a way to stop retries and start them again programmatically?

Thanks!

@diego-za diego-za added the type: question A question from the community label May 21, 2024
@diego-za
Copy link
Author

Hi again, should I make a Demo showing some cases? Or can you explain in general how the retry logic works internally? Looks like it changes if I'm blocking only video segments or only audio segments.
Thanks

@avelad avelad self-assigned this Jul 16, 2024
@avelad avelad added the type: docs Improvements or fixes to documentation label Jul 16, 2024
@shaka-bot shaka-bot added this to the v4.11 milestone Jul 16, 2024
@avelad
Copy link
Member

avelad commented Jul 19, 2024

Shaka's current behavior is to deactivate the failed stream and switch to another stream. This is controlled with streaming.maxDisabledTime

Documentation:

 * @property {number} maxDisabledTime
 *   The maximum time a variant can be disabled when NETWORK HTTP_ERROR
 *   is reached, in seconds.
 *   If all variants are disabled this way, NETWORK HTTP_ERROR will be thrown.
 *   <br>
 *   Defaults to <code>30</code>.

If you use the value of 0 you disable this behavior and return to the old one.

@avelad avelad added the status: waiting on response Waiting on a response from the reporter(s) of the issue label Jul 19, 2024
@avelad avelad removed this from the v4.11 milestone Jul 19, 2024
@shaka-bot shaka-bot added this to the v4.11 milestone Jul 19, 2024
@shaka-bot
Copy link
Collaborator

Closing due to inactivity. If this is still an issue for you or if you have further questions, the OP can ask shaka-bot to reopen it by including @shaka-bot reopen in a comment.

@shaka-bot shaka-bot removed the status: waiting on response Waiting on a response from the reporter(s) of the issue label Jul 26, 2024
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Sep 24, 2024
@shaka-project shaka-project locked as resolved and limited conversation to collaborators Sep 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: docs Improvements or fixes to documentation type: question A question from the community
Projects
None yet
Development

No branches or pull requests

3 participants