JosefNemec/Playnite · error · Exception
No URL was given.
Error message
No URL was given.
What it means
Thrown by NavigateUrl(string) when the resolved url is null or empty after IsNullOrEmpty check. The command requires a non-empty target before it can process template tokens (e.g. {DocsRootUrl}) and launch the browser, so an empty value is rejected up front.
Source
Thrown at source/Playnite/Commands/GlobalCommands.cs:84
else if (url is Link linkUrl)
{
NavigateUrl(linkUrl.Url);
}
else if (url is Uri uriUrl)
{
NavigateUrl(uriUrl.OriginalString);
}
else
{
throw new Exception("Unsupported URL format.");
}
}
public static void NavigateUrl(string url)
{
if (url.IsNullOrEmpty())
{
throw new Exception("No URL was given.");
}
if (url.StartsWith("{DocsRootUrl}", StringComparison.OrdinalIgnoreCase))
{
url = Url.Combine(PlayniteEnvironment.DocsRootUrl, url.Replace("{DocsRootUrl}", ""));
}
url = url.Replace("{AppBranch}", PlayniteEnvironment.AppBranch);
if (!Regex.IsMatch(url, @"^.*:\/\/"))
{
if (Paths.IsFullPath(url))
{
// Do nothing, some people put local file paths to link fields: #2562
}
else
{
url = "http://" + url;
}
View on GitHub (pinned to 5911f4e964)
Solutions
- Check !url.IsNullOrEmpty() before calling NavigateUrl and skip if empty.
- Validate Link objects have a non-empty Url before they reach the command.
- Clean imported data to remove or default empty-URL link entries.
Example fix
// before
Commands.NavigateUrl(link.Url);
// after
if (!link.Url.IsNullOrEmpty())
{
Commands.NavigateUrl(link.Url);
} Defensive patterns
Strategy: validation
Validate before calling
if (!url.IsNullOrEmpty())
{
Commands.NavigateUrl(url);
} Try / catch
try { Commands.NavigateUrl(url); }
catch (Exception e) when (e.Message.Contains("No URL was given"))
{ logger.Warn("Empty URL ignored."); } Prevention
- Guard NavigateUrl(string) with an IsNullOrEmpty check.
- Filter out Link entries with empty Url before dispatch.
- Validate imported data so blank URLs never reach commands.
When it happens
Trigger: Calling NavigateUrl with an empty string, null, or a value that resolves to empty (e.g. a Link.Url that was empty forwarded from the dispatcher).
Common situations: A game/link has a blank Url field; a command binding passes an unbound/empty property; string interpolation produced empty; a data import created link entries with no URL.
Related errors
- Unsupported URL format.
- Backup output path not specified!
- Source directory does not exist or could not be found: {sour
- The icon is corrupt. Couldn't read the header.
- Non empty process name must be specified.
AI-assisted analysis of JosefNemec/Playnite@5911f4e964 (2026-08-13).
Data as JSON: /api/errors/50ba89d2c669eccc.
Report an issue: GitHub.