TeamNewPipe/NewPipe · error · ResolverException

Null stream URL

Error message

Null stream URL

What it means

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.

Source

Thrown at app/src/main/java/org/schabi/newpipe/player/resolver/PlaybackResolver.java:547

        return dataSource.getYoutubeProgressiveMediaSourceFactory()
                .createMediaSource(new MediaItem.Builder()
                        .setTag(metadata)
                        .setUri(Uri.parse(stream.getContent()))
                        .setCustomCacheKey(cacheKey)
                        .build());
    }
    //endregion


    //region Utils
    private static Uri manifestUrlToUri(final String manifestUrl) {
        return Uri.parse(Objects.requireNonNullElse(manifestUrl, ""));
    }

    private static void throwResolverExceptionIfUrlNullOrEmpty(@Nullable final String url)
            throws ResolverException {
        if (url == null) {
            throw new ResolverException("Null stream URL");
        } else if (url.isEmpty()) {
            throw new ResolverException("Empty stream URL");
        }
    }
    //endregion


    //region Resolver exception
    final class ResolverException extends Exception {
        public ResolverException(final String message) {
            super(message);
        }

        public ResolverException(final String message, final Throwable cause) {
            super(message, cause);
        }
    }
    //endregion

View on GitHub (pinned to 9e8be09156)

Solutions

  1. Validate stream.getContent() is non-null before invoking the resolver and skip/report malformed streams.
  2. Update the extractor so it always populates the content URL for playable streams.
  3. Inspect the StreamInfo/Stream construction path to find where content is left null.
Defensive patterns

Strategy: validation

Validate before calling

if (stream.getContent() == null) {
    // skip stream; do not invoke resolver
}

Type guard

static boolean hasStreamUrl(final Stream stream) {
    return stream.getContent() != null;
}

Try / catch

try {
    throwResolverExceptionIfUrlNullOrEmpty(stream.getContent());
} catch (final ResolverException e) {
    // null content; skip this stream and pick another
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of TeamNewPipe/NewPipe@9e8be09156 (2026-08-14). Data as JSON: /api/errors/4e2f2629c35d314a. Report an issue: GitHub.