Radarr/Radarr · warning · KeyNotFoundException
Url no longer in cache
Error message
Url no longer in cache
What it means
MediaCoverProxy keeps a 24-hour in-memory cache mapping a SHA256 hash of a cover-art URL to the original URL. GetUrl throws KeyNotFoundException when the hash is not present because the entry expired or was never registered (the cache is lost on every process restart).
Source
Thrown at src/NzbDrone.Core/MediaCover/MediaCoverProxy.cs:56
}
var hash = url.SHA256Hash();
_cache.Set(hash, url, TimeSpan.FromHours(24));
_cache.ClearExpired();
var fileName = Path.GetFileName(url);
return _configFileProvider.UrlBase + @"/MediaCoverProxy/" + hash + "/" + fileName;
}
public string GetUrl(string hash)
{
var result = _cache.Find(hash);
if (result == null)
{
throw new KeyNotFoundException("Url no longer in cache");
}
return result;
}
public async Task<byte[]> GetImage(string hash)
{
var url = GetUrl(hash);
var request = new HttpRequest(url);
var response = await _httpClient.GetAsync(request);
return response.ResponseData;
}
}
}
View on GitHub (pinned to ca451608dc)
Solutions
- Re-request the cover through the normal MediaCover endpoint so it is re-registered and a fresh hash issued.
- Reload the movie/detail page or clear the client cache so stale proxy URLs are discarded.
- Treat the proxy as best-effort; missing covers auto-recover on next refresh.
Example fix
// before: using a stale hash after restart var bytes = await proxy.GetImage(oldHash); // after: re-register to obtain a valid hash, fall back gracefully var freshUrl = proxy.RegisterUrl(originalUrl); var bytes = freshUrl == null ? null : await proxy.GetImage(extractHash(freshUrl));
Defensive patterns
Strategy: fallback
Validate before calling
if (!cacheFound) { url = proxy.RegisterUrl(originalUrl); } Try / catch
try { return await proxy.GetImage(hash); }
catch (KeyNotFoundException) { return Array.Empty<byte>(); /* re-register on next cover refresh */ } Prevention
- Re-register URLs through the normal MediaCover flow after restarts.
- Treat proxy URLs as short-lived (24h).
- Avoid persisting proxy URLs in clients.
When it happens
Trigger: GetUrl/GetImage is called with a hash whose cache entry has expired (>24h) or was never set, most often after an application restart while a stale /MediaCoverProxy/{hash}/... URL is still being requested by a client or cached UI.
Common situations: Browser/app caches an old proxy URL across a Radarr restart, a URL older than 24h, or a directly bookmarked proxy link; the in-memory cache does not survive restarts.
Related errors
- Simkl API responded with html content. Site is likely blocke
- StevenLu responded with html content. Site is likely blocked
- TMDb responded with html content. Site is likely blocked or
- Trakt API responded with html content. Site is likely blocke
- Couldn't find requested release in cache, try searching agai
AI-assisted analysis of Radarr/Radarr@ca451608dc (2026-08-13).
Data as JSON: /api/errors/aaf2e61bf5a1aaca.
Report an issue: GitHub.