{"record":{"id":"4e2f2629c35d314a","repo":"TeamNewPipe/NewPipe","slug":"null-stream-url","errorCode":null,"errorMessage":"Null stream URL","messagePattern":"Null stream URL","errorType":"exception","errorClass":"ResolverException","httpStatus":null,"severity":"error","filePath":"app/src/main/java/org/schabi/newpipe/player/resolver/PlaybackResolver.java","lineNumber":547,"sourceCode":"        return dataSource.getYoutubeProgressiveMediaSourceFactory()\n                .createMediaSource(new MediaItem.Builder()\n                        .setTag(metadata)\n                        .setUri(Uri.parse(stream.getContent()))\n                        .setCustomCacheKey(cacheKey)\n                        .build());\n    }\n    //endregion\n\n\n    //region Utils\n    private static Uri manifestUrlToUri(final String manifestUrl) {\n        return Uri.parse(Objects.requireNonNullElse(manifestUrl, \"\"));\n    }\n\n    private static void throwResolverExceptionIfUrlNullOrEmpty(@Nullable final String url)\n            throws ResolverException {\n        if (url == null) {\n            throw new ResolverException(\"Null stream URL\");\n        } else if (url.isEmpty()) {\n            throw new ResolverException(\"Empty stream URL\");\n        }\n    }\n    //endregion\n\n\n    //region Resolver exception\n    final class ResolverException extends Exception {\n        public ResolverException(final String message) {\n            super(message);\n        }\n\n        public ResolverException(final String message, final Throwable cause) {\n            super(message, cause);\n        }\n    }\n    //endregion","sourceCodeStart":529,"sourceCodeEnd":565,"githubUrl":"https://github.com/TeamNewPipe/NewPipe/blob/9e8be091560a69f35d44bd252eb00bc7911c977b/app/src/main/java/org/schabi/newpipe/player/resolver/PlaybackResolver.java#L529-L565","documentation":"Thrown by PlaybackResolver.throwResolverExceptionIfUrlNullOrEmpty when the stream URL (stream.getContent()) is null. The helper is called after confirming the content should be a URL (e.g. for progressive, DASH-URL, HLS, or YouTube progressive/OTF paths) but before building the MediaSource. A null content string is rejected explicitly.","triggerScenarios":"throwResolverExceptionIfUrlNullOrEmpty receives a null String from stream.getContent() on a stream that was expected to carry a URL. This occurs in buildProgressiveMediaSource, buildDashMediaSource (URL branch), buildHlsMediaSource, buildSSMediaSource, and the YouTube progressive/HLS/OTF paths that call the helper.","commonSituations":"The extractor produced a Stream with a null content field, a deserialization/serialization issue corrupted the StreamInfo, or an upstream resolver returned an incomplete stream. Indicates an extractor or data-model problem rather than a network issue.","solutions":["Validate stream.getContent() is non-null before invoking the resolver and skip/report malformed streams.","Update the extractor so it always populates the content URL for playable streams.","Inspect the StreamInfo/Stream construction path to find where content is left null."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if (stream.getContent() == null) {\n    // skip stream; do not invoke resolver\n}","typeGuard":"static boolean hasStreamUrl(final Stream stream) {\n    return stream.getContent() != null;\n}","tryCatchPattern":"try {\n    throwResolverExceptionIfUrlNullOrEmpty(stream.getContent());\n} catch (final ResolverException e) {\n    // null content; skip this stream and pick another\n}","preventionTips":["Check stream.getContent() for null before invoking the resolver.","Ensure the extractor always populates the content URL.","Filter out malformed streams in the UI before playback selection."],"tags":["playback","resolver","validation","null-check","media-source"],"backgroundTag":null,"analyzedSha":"9e8be091560a69f35d44bd252eb00bc7911c977b","analyzedAt":"2026-08-14T00:11:33.519Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}