{"record":{"id":"f28246ca10c1ef4e","repo":"TeamNewPipe/NewPipe","slug":"could-not-create-a-dash-media-source-manifest-from","errorCode":null,"errorMessage":"Could not create a DASH media source/manifest from the manifest text","messagePattern":"Could not create a DASH media source/manifest from the manifest text","errorType":"exception","errorClass":"ResolverException","httpStatus":null,"severity":"error","filePath":"app/src/main/java/org/schabi/newpipe/player/resolver/PlaybackResolver.java","lineNumber":327,"sourceCode":"            throwResolverExceptionIfUrlNullOrEmpty(stream.getContent());\n            return dataSource.getDashMediaSourceFactory().createMediaSource(\n                    new MediaItem.Builder()\n                            .setTag(metadata)\n                            .setUri(Uri.parse(stream.getContent()))\n                            .setCustomCacheKey(cacheKey)\n                            .build());\n        }\n\n        try {\n            return dataSource.getDashMediaSourceFactory().createMediaSource(\n                    createDashManifest(stream.getContent(), stream),\n                    new MediaItem.Builder()\n                            .setTag(metadata)\n                            .setUri(manifestUrlToUri(stream.getManifestUrl()))\n                            .setCustomCacheKey(cacheKey)\n                            .build());\n        } catch (final IOException e) {\n            throw new ResolverException(\n                    \"Could not create a DASH media source/manifest from the manifest text\", e);\n        }\n    }\n\n    private static DashManifest createDashManifest(final String manifestContent,\n                                                   final Stream stream) throws IOException {\n        return new DashManifestParser().parse(manifestUrlToUri(stream.getManifestUrl()),\n                new ByteArrayInputStream(manifestContent.getBytes(StandardCharsets.UTF_8)));\n    }\n\n    private static HlsMediaSource buildHlsMediaSource(final PlayerDataSource dataSource,\n                                                      final Stream stream,\n                                                      final String cacheKey,\n                                                      final MediaItemTag metadata)\n            throws ResolverException {\n        if (stream.isUrl()) {\n            throwResolverExceptionIfUrlNullOrEmpty(stream.getContent());\n            return dataSource.getHlsMediaSourceFactory(null).createMediaSource(","sourceCodeStart":309,"sourceCodeEnd":345,"githubUrl":"https://github.com/TeamNewPipe/NewPipe/blob/9e8be091560a69f35d44bd252eb00bc7911c977b/app/src/main/java/org/schabi/newpipe/player/resolver/PlaybackResolver.java#L309-L345","documentation":"Thrown by PlaybackResolver.buildDashMediaSource when the DASH manifest content embedded in the stream cannot be parsed into a DashManifest. The method calls createDashManifest (which runs DashManifestParser over the content bytes) and catches IOException, wrapping it as a ResolverException. This path is taken when the stream's DASH content is inline text (stream.isUrl() is false) rather than a remote manifest URL.","triggerScenarios":"A DASH stream whose content is an inline manifest string (not a URL) where DashManifestParser.parse throws an IOException during XML parsing of that string. The malformed manifest causes the parser to fail.","commonSituations":"Corrupt or incomplete DASH manifest text provided by the extractor, a manifest whose schema the bundled ExoPlayer DashManifestParser does not understand (version mismatch), truncated content, or an extractor bug generating invalid XML.","solutions":["Log and inspect the manifest string being parsed to find the malformed element.","Update the extractor and ExoPlayer so the manifest format matches what the parser expects.","Retry fetching the manifest; transient truncation can resolve on the next attempt.","Fall back to a different stream/itag or delivery method if DASH parsing consistently fails."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"try {\n    createDashManifest(stream.getContent(), stream); // validate parseability first\n} catch (final IOException e) {\n    // manifest text invalid; choose another stream\n}","typeGuard":null,"tryCatchPattern":"try {\n    return buildDashMediaSource(dataSource, stream, cacheKey, metadata);\n} catch (final ResolverException e) {\n    // DASH manifest parse failed; fall back to HLS/progressive if available\n}","preventionTips":["Log the manifest text when parsing fails to locate malformed elements.","Keep the extractor and ExoPlayer versions aligned so manifest formats are understood.","Retry once on transient truncation before giving up."],"tags":["playback","resolver","dash","manifest-parsing","media-source"],"backgroundTag":null,"analyzedSha":"9e8be091560a69f35d44bd252eb00bc7911c977b","analyzedAt":"2026-08-14T00:11:33.519Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}