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

OPERATION_ABORTED when preload is destroyed immediately after creation #7618

Closed
HokkanenTeemu opened this issue Nov 18, 2024 · 2 comments · Fixed by #7619 · May be fixed by #7597
Closed

OPERATION_ABORTED when preload is destroyed immediately after creation #7618

HokkanenTeemu opened this issue Nov 18, 2024 · 2 comments · Fixed by #7619 · May be fixed by #7597
Assignees
Labels
priority: P1 Big impact or workaround impractical; resolve before feature release type: bug Something isn't working correctly
Milestone

Comments

@HokkanenTeemu
Copy link

Have you read the FAQ and checked for duplicate open issues?
Yes

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

What version of Shaka Player are you using?

4.12.0
I have also seen this error with many earlier versions (4.10.x, 4.11.x).

Can you reproduce the issue with our latest release version?
Yes

Can you reproduce the issue with the latest code from main?
Yes

Are you using the demo app or your own custom app?
Custom

If custom app, can you reproduce the issue using our demo app?
I have not tested

What browser and OS are you using?
Many, including MacOS 15 + Safari 18 and Windows 11 + Edge 130.0.6723.117

For embedded devices (smart TVs, etc.), what model and firmware version are you using?

What are the manifest and license server URIs?

What configuration are you using? What is the output of player.getNonDefaultConfiguration()?

What did you do?

I try to destroy preload after soon after creating it.

shaka.polyfill.installAll()
const video = document.querySelector("video")
const player = new shaka.Player()
await player.attach(video)

const preload = await player.preload("https://storage.googleapis.com/shaka-demo-assets/angel-one/dash.mpd")
await preload.destroy()

What did you expect to happen?
According to the preload tutorial I should be able to cancel preload with destroy, so I expect no error to be thrown.

What actually happened?
Shaka error is logged to console with code 7001, which I'm not expecting as explanation for the code is:
An internal error which indicates that an operation was aborted. This should not be seen by applications.

Are you planning send a PR to fix it?
No

@HokkanenTeemu HokkanenTeemu added the type: bug Something isn't working correctly label Nov 18, 2024
@avelad avelad added the priority: P1 Big impact or workaround impractical; resolve before feature release label Nov 18, 2024
@avelad avelad added this to the v4.13 milestone Nov 18, 2024
@HokkanenTeemu
Copy link
Author

I found out that I can catch the error with preloadManager.waitForFinish so that it won't propagate to console.
This "fix" applies also to some other errors that I'm seeing when destroying non finished preload.

shaka.polyfill.installAll()
const video = document.querySelector("video")
const player = new shaka.Player()
await player.attach(video)

const preload = await player.preload("https://storage.googleapis.com/shaka-demo-assets/angel-one/dash.mpd")
preload.waitForFinish().catch(()=> {}) // ignore error
await preload.destroy()

@theodab
Copy link
Contributor

theodab commented Nov 19, 2024

It looks like while we're catching operation aborted errors that are fired during segment prefetching, we still surface operation aborted errors from other network requests. In this case, from the network request to load the manifest.

I'll just change the preload manager to not surface aborted errors at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: P1 Big impact or workaround impractical; resolve before feature release type: bug Something isn't working correctly
Projects
None yet
3 participants