shaka-player: [ViacomCBS] - 4001 Error with Dash Manifests on Xbox
Have you read the Tutorials? Yes I have read it
Have you read the FAQ and checked for duplicate open issues? Yes I’ve read FAQ and couldn’t find relevant question. Also looked for duplicate open issues and didn’t see any.
What version of Shaka Player are you using? 3.2.0
Please ask your question
On Xbox whenever I attempt to play any Dash manifest I get this following error:
4001: MANIFEST.DASH_INVALID_XML
This only occurs on Xbox and not other platforms. Also this does not happen with Shaka Player 3.0.13. Not sure if anything changed with later versions of the player, or there is a problem with the XML schema. I’ve tried this with few different Dash manifests, including the following test asset from Bitmovin: https://bitmovin-a.akamaihd.net/content/MI201109210084_1/mpds/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.mpd
This occurs on Shaka 3.2.0 prod release and I also tried master branch and can reproduce on both. I thought I would first ask question, before I file a ticket. I searched and didn’t find any duplicate tickets. Is this a known issue?
I tried this with very simple vanilla Shaka player configuration:
const url = 'https://bitmovin-a.akamaihd.net/content/MI201109210084_1/mpds/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.mpd';
const video = document.querySelector('video');
shaka.polyfill.installAll();
shaka.log.setLevel(shaka.log.Level.DEBUG);
const player = new shaka.Player(video);
const config = player.getConfiguration();
player.configure(config);
player.load(url, 1500)
.then((e) => {
console.log('ready');
})
.catch((e) => {
onError(e);
});
function onErrorEvent(event) {
onError(event.detail);
}
function onError(error) {
console.error('Error code', error.code, 'object', error);
}
Some sort of guidance on this problem would be greatly appreciated.

About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 17 (17 by maintainers)
Commits related to this issue
- cleanup: Add error logs to all XML parser failure cases While working on the issues tagged below, I needed to explicitly debug the many possible error cases in the XML parser. Now, each one is a uni... — committed to shaka-project/shaka-player by joeyparrish 3 years ago
- cleanup: Add error logs to all XML parser failure cases While working on the issues tagged below, I needed to explicitly debug the many possible error cases in the XML parser. Now, each one is a uni... — committed to shaka-project/shaka-player by joeyparrish 3 years ago
We’re all going to get whiplash here. The debugger was printing the XML element objects in lowercase, even though the source isn’t.
So… no idea what’s wrong yet. 😢
@agajassi, we are happy to help. I’m only sorry it took so long to work out the root cause!
Please try with a TextDecoder polyfill installed, as we do in our demo and tests. This is a requirement for platforms without a native implementation, and not having it will cause
shaka.Player.isBrowserSupported()to returnfalse. This could be the root of your problem if you don’t have such a polyfill in your application on Xbox.We install
fastestsmallesttextencoderdecoderand loadnode_modules/fastestsmallesttextencoderdecoder/EncoderDecoderTogether.min.js. There is a brief mention in our v3 Upgrade Guide, but if this was too difficult to find, we can put something more obvious into the README.Does this help? Does this change your test results? Does this explain the issue in your application?
My test code was run in the context of Karma, Jasmine, and our automated tests.
shaka.testis defined there. If you’re extracting the code to run it in another way, you’ll need to make some changes.shaka.test.Util.fetchcan be replaced with the browser’sFetchAPI (assuming Xbox has implemented that) orXMLHttpRequest, or evenshaka.net.NetworkingEngine.request, though none of those have exactly the same API.shaka.test.Loader.loadShakais a utility to load the compiled bundle of Shaka Player into a local variable (instead of the global namespace). This may not be necessary. You can just skip the last test case (fromconst compiledShakatomanifest2), and try with the production build instead of debug to get the same effect.