{"record":{"id":"70f6a47f9e739250","repo":"TeamNewPipe/NewPipe","slug":"url-not-known-to-service-service-url","errorCode":null,"errorMessage":"Url not known to service. service={} url={}","messagePattern":"Url not known to service\\. service=(.+?) url=(.+?)","errorType":"exception","errorClass":"ExtractionException","httpStatus":null,"severity":"error","filePath":"app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java","lineNumber":741,"sourceCode":"        final Intent mIntent = new Intent(context, MainActivity.class);\n        mIntent.putExtra(Constants.KEY_SERVICE_ID, serviceId);\n        mIntent.putExtra(Constants.KEY_URL, url);\n        mIntent.putExtra(Constants.KEY_LINK_TYPE, type);\n        return mIntent;\n    }\n\n    public static Intent getIntentByLink(final Context context, final String url)\n            throws ExtractionException {\n        return getIntentByLink(context, NewPipe.getServiceByUrl(url), url);\n    }\n\n    public static Intent getIntentByLink(final Context context,\n                                         final StreamingService service,\n                                         final String url) throws ExtractionException {\n        final StreamingService.LinkType linkType = service.getLinkTypeByUrl(url);\n\n        if (linkType == StreamingService.LinkType.NONE) {\n            throw new ExtractionException(\"Url not known to service. service=\" + service\n                    + \" url=\" + url);\n        }\n\n        return getOpenIntent(context, url, service.getServiceId(), linkType);\n    }\n\n    public static Intent getChannelIntent(final Context context,\n                                          final int serviceId,\n                                          final String url) {\n        return getOpenIntent(context, url, serviceId, StreamingService.LinkType.CHANNEL);\n    }\n\n    public static Intent getStreamIntent(final Context context,\n                                         final int serviceId,\n                                         final String url,\n                                         @Nullable final String title) {\n        return getOpenIntent(context, url, serviceId, StreamingService.LinkType.STREAM)\n                .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK)","sourceCodeStart":723,"sourceCodeEnd":759,"githubUrl":"https://github.com/TeamNewPipe/NewPipe/blob/9e8be091560a69f35d44bd252eb00bc7911c977b/app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java#L723-L759","documentation":"Thrown by NavigationHelper.getIntentByLink when the resolved StreamingService returns LinkType.NONE for the given URL — meaning the URL does not match any of the service's recognized URL patterns. getLinkTypeByUrl runs the URL against the service's registered regex/handlers; NONE indicates no match, so the app cannot determine whether the URL is a video, channel, or playlist for that service.","triggerScenarios":"getIntentByLink(context, service, url) is called; service.getLinkTypeByUrl(url) returns StreamingService.LinkType.NONE; the equality check at line 740 fires. Happens when the URL belongs to a service whose patterns have changed, when the URL is a new/unsupported page type (e.g. a service's settings page), or when NewPipe.getServiceByUrl resolved the wrong service for the URL.","commonSituations":"YouTube/other service changed their URL structure and the extractor's pattern list is outdated; user pasted a URL for an unsupported page (account settings, search results, embed); a short URL (youtu.be) or share URL whose redirect target is not in the pattern list; mismatched service-to-URL mapping.","solutions":["Update the NewPipeExtractor dependency to a version with current URL patterns for the service.","Validate the URL type before calling getIntentByLink: call service.getLinkTypeByUrl(url) yourself and handle NONE gracefully.","If the URL is a share/short URL, follow redirects to resolve the canonical URL first.","Surface a user-facing 'unsupported link' message instead of letting the ExtractionException propagate."],"exampleFix":"// before\nIntent intent = NavigationHelper.getIntentByLink(context, service, url);\n\n// after — check link type before delegating\nStreamingService.LinkType type = service.getLinkTypeByUrl(url);\nif (type == StreamingService.LinkType.NONE) {\n    Toast.makeText(context, R.string.unsupported_url, Toast.LENGTH_SHORT).show();\n    return;\n}\nIntent intent = NavigationHelper.getIntentByLink(context, service, url);","handlingStrategy":"validation","validationCode":"// Check link type before calling getIntentByLink:\nStreamingService service = NewPipe.getServiceByUrl(url);\nStreamingService.LinkType type = service.getLinkTypeByUrl(url);\nif (type == StreamingService.LinkType.NONE) {\n    // URL not recognized — do not call getIntentByLink\n    return null;\n}","typeGuard":null,"tryCatchPattern":"try {\n    Intent intent = NavigationHelper.getIntentByLink(context, service, url);\n} catch (ExtractionException e) {\n    if (e.getMessage() != null && e.getMessage().startsWith(\"Url not known to service\")) {\n        // show user-facing 'unsupported link' and stop\n        Toast.makeText(context, R.string.url_not_supported, Toast.LENGTH_SHORT).show();\n    } else throw e;\n}","preventionTips":["Always call service.getLinkTypeByUrl(url) and handle NONE before getIntentByLink.","Keep the NewPipeExtractor dependency updated for current URL patterns.","Resolve share/short URLs to canonical form before type detection."],"tags":["navigation","url-routing","extractor","streaming-service"],"backgroundTag":null,"analyzedSha":"9e8be091560a69f35d44bd252eb00bc7911c977b","analyzedAt":"2026-08-14T00:11:33.519Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}