Kareadita/Kavita · info · KavitaException

Could not grab publisher image for {publisherName}

Error message

Could not grab publisher image for {publisherName}

What it means

Thrown by DownloadPublisherImageAsync when FallbackToKavitaReaderPublisher(publisherName) returns an empty string — Kavita's curated publisher-override list (publishers.txt, cached or fetched from the NewHost) contains no match for the publisher. Unlike the favicon path, the negative result is cached (SetAsync) so subsequent lookups short-circuit by returning empty rather than rethrowing.

Source

Thrown at Kavita.Services/Metadata/CoverDbService.cs:209

    {
        try
        {
            // Sanitize user input
            publisherName = publisherName.Replace(Environment.NewLine, string.Empty).Replace("\r", string.Empty).Replace("\n", string.Empty);
            var provider = _cacheFactory.GetCachingProvider(EasyCacheProfiles.Publisher);
            var res = await provider.GetAsync<string>(publisherName, ct);
            if (res.HasValue)
            {
                _logger.LogDebug("Kavita has already tried to fetch Publisher: {PublisherName} and failed. Skipping duplicate check", publisherName);
                // Do not throw to prevent duplicate log spam when visiting series
                return string.Empty;
            }

            await provider.SetAsync(publisherName, string.Empty, _cacheTime, ct);
            var publisherLink = await FallbackToKavitaReaderPublisher(publisherName);
            if (string.IsNullOrEmpty(publisherLink))
            {
                throw new KavitaException($"Could not grab publisher image for {publisherName}");
            }

            // Create the destination file path
            var filename = ImageService.GetPublisherFormat(publisherName, encodeFormat);

            _logger.LogTrace("Fetching publisher image from {Url}", publisherLink.Sanitize());
            await DownloadImageFromUrl(publisherName, encodeFormat, publisherLink, _directoryService.PublisherDirectory);

            _logger.LogDebug("Publisher image for {PublisherName} downloaded and saved successfully", publisherName.Sanitize());

            return filename;
        } catch (Exception ex)
        {
            _logger.LogError(ex, "Error downloading image for {PublisherName}", publisherName.Sanitize());
            throw;
        }
    }

View on GitHub (pinned to 9c3e540000)

Solutions

  1. Normalize the publisher name (trim, consistent casing) in metadata so it can alias-match the override list.
  2. Confirm Kavita can fetch the publishers.txt override file from NewHost (network/DNS check).
  3. If the publisher genuinely has no curated art, accept the empty result and let the UI show a default.
  4. Contribute the publisher to the upstream override list if you maintain it.
Defensive patterns

Strategy: fallback

Validate before calling

var publisherLink = await FallbackToKavitaReaderPublisher(publisherName);
if (string.IsNullOrEmpty(publisherLink)) return null; // no art; UI uses default

Try / catch

try { img = await coverDbService.DownloadPublisherImageAsync(name, fmt, ct); }
catch (KavitaException ex) when (ex.Message.Contains("Could not grab publisher image"))
{ img = null; }

Prevention

When it happens

Trigger: Series metadata references a publisher whose name isn't in the remote publishers.txt override file (and has no alias entry). First call throws this; later calls within TTL return empty (no throw) due to the cached failure marker.

Common situations: Obscure/niche publisher not yet curated in Kavita's override list; publisher name in metadata has trailing whitespace or alternate transliteration that doesn't alias-match; upstream override endpoint is unreachable so the list is empty.

Related errors


AI-assisted analysis of Kareadita/Kavita@9c3e540000 (2026-08-13). Data as JSON: /api/errors/c611833ceac63552. Report an issue: GitHub.