Jackett/Jackett · error · Exception

The user is not logged in. It is possible that the cookie ha

Error message

The user is not logged in. It is possible that the cookie has expired or you made a mistake when copying it. Please check the settings.

What it means

Thrown in TorrentDay's PerformQuery when the search response is a redirect whose target contains 'login.php'. A redirect to the login page means the stored cookie no longer represents an authenticated session, so the search cannot return data. The message explains the cookie likely expired or was copied incorrectly.

Source

Thrown at src/Jackett.Common/Indexers/Definitions/TorrentDay.cs:215

            var searchUrl = SearchUrl + "?" + catStr;

            if (query.IsImdbQuery)
                searchUrl += ";q=" + query.ImdbID;
            else
            if (query.IsGenreQuery)
                searchUrl += ";q=" + WebUtilityHelpers.UrlEncode(query.GetQueryString() + " " + query.Genre, Encoding);
            else
                searchUrl += ";q=" + WebUtilityHelpers.UrlEncode(query.GetQueryString(), Encoding);

            if (((BoolConfigurationItem)configData.GetDynamic("freeleech")).Value)
                searchUrl += ";free=on";

            var results = await RequestWithCookiesAndRetryAsync(searchUrl);

            // Check for being logged out
            if (results.IsRedirect)
                if (results.RedirectingTo.Contains("login.php"))
                    throw new Exception("The user is not logged in. It is possible that the cookie has expired or you made a mistake when copying it. Please check the settings.");
                else
                    throw new Exception($"Got a redirect to {results.RedirectingTo}, please adjust your the alternative link");

            try
            {
                var rows = JsonConvert.DeserializeObject<dynamic>(results.ContentString);

                foreach (var row in rows)
                {
                    var title = (string)row.name;
                    if ((!query.IsImdbQuery || !TorznabCaps.MovieSearchImdbAvailable) && !query.MatchQueryStringAND(title))
                        continue;
                    var torrentId = (long)row.t;
                    var details = new Uri(SiteLink + "details.php?id=" + torrentId);
                    var seeders = (int)row.seeders;
                    var imdbId = (string)row["imdb-id"];
                    var downloadMultiplier = (double?)row["download-multiplier"] ?? 1;
                    var link = new Uri(SiteLink + "download.php/" + torrentId + "/" + torrentId + ".torrent");

View on GitHub (pinned to adff194147)

Solutions

  1. Re-copy a fresh cookie from a currently logged-in TorrentDay browser session and update the indexer config.
  2. Reconfigure the indexer to refresh the stored CookieHeader.
  3. If the site logs out all sessions on password change, redo setup after any account change.
Defensive patterns

Strategy: validation

Validate before calling

// Detect a likely-expired cookie before searching by checking it is present and non-trivial.
var cookie = configData.Cookie?.Value ?? indexer.CookieHeader;
if (string.IsNullOrWhiteSpace(cookie))
    throw new InvalidOperationException("TorrentDay cookie is missing; reconfigure.");

Try / catch

// In the search path, a redirect-to-login is a recoverable config error, not a transient blip.
try { return await indexer.PerformQuery(query); }
catch (Exception ex) when (ex.Message.Contains("cookie has expired"))
{ logger.Warn("TorrentDay cookie expired; reconfiguration required."); throw; }

Prevention

When it happens

Trigger: RequestWithCookiesAndRetryAsync(searchUrl) returns a result where IsRedirect is true and RedirectingTo contains 'login.php'. Causes: cookie expired, cookie overwritten by a logout, session invalidated server-side, or a partial cookie that authenticated setup but later lapsed.

Common situations: A configured TorrentDay indexer that worked, then starts failing days/weeks later as the cookie expires; cookie copied at setup from a session that has since been logged out.

Related errors


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