Jackett/Jackett · error · Exception

invalid passkey configured: expected length: 32, 48, or 56,

Error message

invalid passkey configured: expected length: 32, 48, or 56, got 

What it means

Thrown in AnimeBytes.ApplyConfiguration when the configured passkey length is not exactly 32, 48, or 56 characters. AnimeBytes has shipped passkeys of different lengths over time; this allowlist accepts the known-good ones and rejects everything else, appending the actual length received.

Source

Thrown at src/Jackett.Common/Indexers/Definitions/AnimeBytes.cs:123

            caps.Categories.AddCategoryMapping("audio", TorznabCatType.Audio, "Music");
            caps.Categories.AddCategoryMapping("gamec[game]", TorznabCatType.PCGames, "Game");
            caps.Categories.AddCategoryMapping("gamec[visual_novel]", TorznabCatType.PCGames, "Game Visual Novel");
            caps.Categories.AddCategoryMapping("printedtype[manga]", TorznabCatType.BooksComics, "Manga");
            caps.Categories.AddCategoryMapping("printedtype[oneshot]", TorznabCatType.BooksComics, "Oneshot");
            caps.Categories.AddCategoryMapping("printedtype[anthology]", TorznabCatType.BooksComics, "Anthology");
            caps.Categories.AddCategoryMapping("printedtype[manhwa]", TorznabCatType.BooksComics, "Manhwa");
            caps.Categories.AddCategoryMapping("printedtype[light_novel]", TorznabCatType.BooksComics, "Light Novel");
            caps.Categories.AddCategoryMapping("printedtype[artbook]", TorznabCatType.BooksComics, "Artbook");

            return caps;
        }

        public override async Task<IndexerConfigurationStatus> ApplyConfiguration(JToken configJson)
        {
            LoadValuesFromJson(configJson);

            if (ConfigData.Passkey.Value.Length is not 32 and not 48 and not 56)
                throw new Exception("invalid passkey configured: expected length: 32, 48, or 56, got " + ConfigData.Passkey.Value.Length);

            var results = await PerformQuery(new TorznabQuery());
            if (!results.Any())
                throw new Exception("no results found, please report this bug");

            IsConfigured = true;
            SaveConfig();
            return IndexerConfigurationStatus.Completed;
        }

        protected override async Task<IEnumerable<ReleaseInfo>> PerformQuery(TorznabQuery query)
        {
            var releases = new List<ReleaseInfo>();

            releases.AddRange(await GetResults(query, "anime", CleanSearchTerm(query.SanitizedSearchTerm.Trim())));

            if (ContainsMusicCategories(query.Categories))
            {

View on GitHub (pinned to adff194147)

Solutions

  1. Re-copy the passkey from the AnimeBytes profile page and trim any whitespace.
  2. Confirm the pasted string is exactly 32, 48, or 56 characters.
  3. If your current valid passkey is a different length, the indexer definition may need updating — report it.
Defensive patterns

Strategy: validation

Validate before calling

var passkey = ConfigData.Passkey.Value?.Trim() ?? "";
if (passkey.Length is not 32 and not 48 and not 56)
    throw new ArgumentOutOfRangeException(nameof(passkey),
        $"Passkey length {passkey.Length} is not one of 32/48/56.");

Type guard

static bool IsValidAnimeBytesPasskey(string key) =>
    !string.IsNullOrEmpty(key) && key.Length is 32 or 48 or 56;

Try / catch

if (ConfigData.Passkey.Value?.Trim().Length is not (32 or 48 or 56))
    return IndexerConfigurationStatus.RequiresTesting; // do not call ApplyConfiguration's PerformQuery
await indexer.ApplyConfiguration(configJson);

Prevention

When it happens

Trigger: LoadValuesFromJson runs, then the length check fails because ConfigData.Passkey.Value.Length is not in {32, 48, 56}.

Common situations: Passkey copied with leading/trailing whitespace; wrong field copied (e.g. username or a hash); passkey truncated by a copy mistake; legacy passkey format after a site-side format change.

Related errors


AI-assisted analysis of Jackett/Jackett@adff194147 (2026-08-13). Data as JSON: /api/errors/05141e6c7fc771ce. Report an issue: GitHub.