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

InvalidStateError #1322

Closed
WardPearce opened this issue Jun 26, 2024 · 2 comments
Closed

InvalidStateError #1322

WardPearce opened this issue Jun 26, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@WardPearce
Copy link

WardPearce commented Jun 26, 2024

Current Behavior:

When using Dash with Vidstack, the following error occurs a lot

Media resource blob:https://app.materialio.us/143454dd-ad55-49bd-bcc0-0e65c7406c8c could not be decoded. [7XjlmvToPLo](https://app.materialio.us/watch/7XjlmvToPLo)
This error message will be blank when privacy.resistFingerprinting = true.  If it is really necessary, please add it to the whitelist in MediaError::GetMessage: NS_ERROR_DOM_MEDIA_DECODE_ERR (0x806e0004) - virtual mozilla::MediaResult mozilla::FFmpegVideoDecoder<60>::DoDecode(mozilla::MediaRawData*, uint8_t*, int, bool*, mozilla::MediaDataDecoder::DecodedData&): avcodec_send_packet error: Unknown error occurred [vidstack-DqOrqs52.BG0M2Q7Q.js:1:4442](https://app.materialio.us/_app/immutable/chunks/vidstack-DqOrqs52.BG0M2Q7Q.js)
This error message will be blank when privacy.resistFingerprinting = true.  If it is really necessary, please add it to the whitelist in MediaError::GetMessage: NS_ERROR_DOM_MEDIA_DECODE_ERR (0x806e0004) - virtual mozilla::MediaResult mozilla::FFmpegVideoDecoder<60>::DoDecode(mozilla::MediaRawData*, uint8_t*, int, bool*, mozilla::MediaDataDecoder::DecodedData&): avcodec_send_packet error: Unknown error occurred [StreamController.js:1398:12](webpack://dashjs/src/streaming/controllers/StreamController.js)
This error message will be blank when privacy.resistFingerprinting = true.  If it is really necessary, please add it to the whitelist in MediaError::GetMessage: NS_ERROR_DOM_MEDIA_DECODE_ERR (0x806e0004) - virtual mozilla::MediaResult mozilla::FFmpegVideoDecoder<60>::DoDecode(mozilla::MediaRawData*, uint8_t*, int, bool*, mozilla::MediaDataDecoder::DecodedData&): avcodec_send_packet error: Unknown error occurred [StreamController.js:1399:26](webpack://dashjs/src/streaming/controllers/StreamController.js)
[2991][StreamController] Video Element Error: MEDIA_ERR_DECODE (NS_ERROR_DOM_MEDIA_DECODE_ERR (0x806e0004) - virtual mozilla::MediaResult mozilla::FFmpegVideoDecoder<60>::DoDecode(mozilla::MediaRawData*, uint8_t*, int, bool*, mozilla::MediaDataDecoder::DecodedData&): avcodec_send_packet error: Unknown error occurred) [Debug.js:169:25](webpack://dashjs/src/core/Debug.js)
[2991][StreamController] [object MediaError] [Debug.js:169:25](webpack://dashjs/src/core/Debug.js)
Specified “type” attribute of “application/dash+xml” is not supported. Load of media resource https://invidious.materialio.us/api/manifest/dash/id/7XjlmvToPLo?local=true failed. [7XjlmvToPLo](https://app.materialio.us/watch/7XjlmvToPLo)
[2986][SourceBufferSink][video] getAllBufferRanges exception: An attempt was made to use an object that is not, or is no longer, usable [Debug.js:169:25](webpack://dashjs/src/core/Debug.js)
[2986][SourceBufferSink][audio] getAllBufferRanges exception: An attempt was made to use an object that is not, or is no longer, usable [Debug.js:169:25](webpack://dashjs/src/core/Debug.js)
All candidate resources failed to load. Media load paused. [7XjlmvToPLo](https://app.materialio.us/watch/7XjlmvToPLo)
GET
[https://invidious.materialio.us/sb/i/7XjlmvToPLo/storyboard3_L3/M0.jpg?sqp=-oaymwENSDfyq4qpAwVwAcABBqLzl_8DBgjEweyzBg==&amp;sigh=rs$AOn4CLBep_V-XpEpts8AgOcXrsdwoeqaPA](https://invidious.materialio.us/sb/i/7XjlmvToPLo/storyboard3_L3/M0.jpg?sqp=-oaymwENSDfyq4qpAwVwAcABBqLzl_8DBgjEweyzBg%3D%3D&amp;sigh=rs%24AOn4CLBep_V-XpEpts8AgOcXrsdwoeqaPA)

A resource is blocked by OpaqueResponseBlocking, please check browser console for details. [M0.jpg](https://invidious.materialio.us/sb/i/7XjlmvToPLo/storyboard3_L3/M0.jpg?sqp=-oaymwENSDfyq4qpAwVwAcABBqLzl_8DBgjEweyzBg%3D%3D&amp;sigh=rs%24AOn4CLBep_V-XpEpts8AgOcXrsdwoeqaPA)
[10599][SourceBufferSink][video] getAllBufferRanges exception: An attempt was made to use an object that is not, or is no longer, usable [Debug.js:169:25](webpack://dashjs/src/core/Debug.js)
[10600][SourceBufferSink][audio] getAllBufferRanges exception: An attempt was made to use an object that is not, or is no longer, usable

Sometimes this error when loading a new video

[634754][SourceBufferSink][video] getAllBufferRanges exception: i is undefined [Debug.js:169:25](webpack://dashjs/src/core/Debug.js)
[634754][SourceBufferSink][audio] getAllBufferRanges exception: i is undefined

Expected Behavior:

NA

Steps To Reproduce:

Use https://app.materialio.us for a decent amount of time with sponser skip enabled in settings , source code here https://github.com/Materialious/Materialious.

Appears to be a issue if a video instantly skips forwards.

Reproduction Link: How to create a repro?

Environment:

Example:

  • Framework: Svelte
  • Node: 18
  • Device: Any
  • OS: Any
  • Browser: Firefox
@WardPearce WardPearce added the bug Something isn't working label Jun 26, 2024
@mihar-22
Copy link
Member

mihar-22 commented Jul 4, 2024

Please test it in the dash reference player and see if it works there. If it does without issues then I can reopen here. I'll need a test URL to reproduce the problem.

@mihar-22 mihar-22 closed this as completed Jul 4, 2024
@WardPearce
Copy link
Author

Please test it in the dash reference player and see if it works there. If it does without issues then I can reopen here. I'll need a test URL to reproduce the problem.

Was unable to replicate using the manifest https://invidious.materialio.us/api/manifest/dash/id/ttglJH4Htgg on the dash reference player (Please note I had to disable CORs temporarily on that page to test it).

My possible ideas currently to why this is occurring is some sort of state management issue when using sveltekit, with Materialious I've imported a player component like so https://github.com/Materialious/Materialious/blob/main/materialious/src/routes/(app)/watch/%5Bslug%5D/%2Bpage.svelte#L409

And then manually destroy the state once the video id changes.
https://github.com/Materialious/Materialious/blob/main/materialious/src/lib/Player.svelte#L262

Also another thing to note, when passing the manifest it quickly displays the video as being live, even tho its set not to be live.

Also typically on Firefox these errors don't crash the player, while the same errors on Chrome do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants