Shaka-player: Error 4001 for 1h+ DASH videos on Xbox One

Created on 14 Oct 2019  路  7Comments  路  Source: google/shaka-player

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

What version of Shaka Player are you using?
V2.5.5 Compiled (Release)

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

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

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

If custom app, can you reproduce the issue using our demo app?
Yes

What browser and OS are you using?
N/A

For embedded devices (smart TVs, etc.), what model and firmware version are you using?
Xbox One, OS v.10.0.18363.7194 October 2019

What are the manifest and license server URIs?

N/A, but any DASH manifest which is big enough (1K+ lines) will work

What did you do?

I tried to play the video with a duration of over 1h on the Xbox One. In our case, our manifests include SegmentTimeline tag.

What did you expect to happen?
The video will start playback.

What actually happened?

Player throws an error when we try to play the video:

Can not load manifest: shaka.util.Error { "severity": 2, "category": 4, "code": 4001, "data": [ "https://example-site.com/master.mpd" ], "handled": false }

Which is DASH_INVALID_XML, 4001, The DASH Manifest contained invalid XML markup.

It works well on v2.5.2 and it does not on v2.5.3.
We looked deeper and found that it鈥檚 playing fine if we change string utility fromCharCode back to the implementation of what it was in v2.5.2.
Also, we found that this issue is only reproducible with Compiled (Release) code, it鈥檚 playing fine in the Compiled (Debug) and Uncompiled modes.

archived bug

Most helpful comment

I'll make the arbitrary decision to start assembling the v2.5.9 release on Monday Feb 3. :-) It isn't always completed in the same day, but you can expect it some time next week.

All 7 comments

Thanks for the report, and especially for digging into the various versions and builds. We'll take a look.

@joeyparrish anything we can do to help with triage?

I can reproduce this with the latest version and with master. Be sure to use the compiled version and use the following manifest URL (note that it won't play since the segments are incorrect, but you should get the 4001 error on Xbox One):

https://storage.googleapis.com/wvtemp/modmaker/long-segment-timeline.mpd

Looks like the closure compiler version update and milestone 2.6 are far.
I wanted to find a better solution earlier and found that the issue is in the spread operator polyfill, spread operators were introduced in v2.5.3 with a change to theshaka.util.StringUtils.fromCharCodeImpl_.

So I decided to find a replacement, there are actually two approaches (there's two places where we need to replace the spread operator), examples:

  • es6: const foo = String.fromCharCode['apply'](null, Array.from(buffer)); (no polyfill was applied)
  • es5: const foo = String.fromCharCode['apply'](null, [].slice.call(buffer));

Tested on:

  • The latest version and master
  • The same device but new firmware: Xbox One, OS v.10.0.18363.8131 November 2019

@joeyparrish Thanks! Any estimations when it will be released? 馃殌

I'll make the arbitrary decision to start assembling the v2.5.9 release on Monday Feb 3. :-) It isn't always completed in the same day, but you can expect it some time next week.

Cherry-picked to v2.5.9.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

diogoazevedos picture diogoazevedos  路  5Comments

gabor picture gabor  路  3Comments

interpegasus picture interpegasus  路  3Comments

mateon01 picture mateon01  路  3Comments

dakom picture dakom  路  3Comments