Jackett/Jackett · error · ExceptionWithConfigData
errorMessage
Error message
errorMessage
What it means
Thrown by LostFilm.ApplyConfiguration when the login API response does not contain '"success":true'. The code inspects the raw response string for specific error codes: error:1/2/4 are mapped to 'Captcha is incorrect', error:3 is mapped to 'E-mail or password is incorrect'. If none match, the raw response body is used as the error message. This is an ExceptionWithConfigData.
Source
Thrown at src/Jackett.Common/Indexers/Definitions/LostFilm.cs:216
{ "pass", configData.Password.Value },
{ "rem", "1" }
};
if (!string.IsNullOrWhiteSpace(configData.CaptchaText.Value))
{
data.Add("need_captcha", "1");
data.Add("captcha", configData.CaptchaText.Value);
}
var result = await RequestLoginAndFollowRedirect(ApiUrl, data, CookieHeader, true, SiteLink, ApiUrl, true);
await ConfigureIfOK(result.Cookies, result.ContentString != null && result.ContentString.Contains("\"success\":true"), () =>
{
var errorMessage = result.ContentString;
if (errorMessage.Contains("\"error\":1") || errorMessage.Contains("\"error\":2") || errorMessage.Contains("\"error\":4"))
errorMessage = "Captcha is incorrect";
if (errorMessage.Contains("\"error\":3"))
errorMessage = "E-mail or password is incorrect";
throw new ExceptionWithConfigData(errorMessage, configData);
});
return IndexerConfigurationStatus.RequiresTesting;
}
private async Task<bool> Logout()
{
logger.Info("Performing logout");
var data = new Dictionary<string, string>
{
{ "act", "users" },
{ "type", "logout" }
};
var response = await RequestWithCookiesAsync(ApiUrl, method: RequestType.POST, data: data);
logger.Debug("Logout result: " + response.ContentString);
View on GitHub (pinned to adff194147)
Solutions
- If the message says 'Captcha is incorrect', re-enter a fresh captcha and re-test quickly.
- If the message says 'E-mail or password is incorrect', verify and re-enter both fields.
- If the message is raw JSON, read the error code to understand the specific API rejection.
- Perform a manual login on LostFilm to confirm credentials and observe any captcha.
- Re-test the configuration immediately after entering a fresh captcha (they expire).
Defensive patterns
Strategy: try-catch
Validate before calling
// Validate credentials and captcha before login
if (string.IsNullOrWhiteSpace(configData.Username?.Value) || string.IsNullOrWhiteSpace(configData.Password?.Value))
throw new InvalidOperationException("LostFilm e-mail and password are required.");
if (!configData.Username.Value.Contains("@"))
throw new InvalidOperationException("LostFilm username must be an e-mail address."); Try / catch
try
{
await indexer.ApplyConfiguration(configJson);
}
catch (ExceptionWithConfigData ex)
{
// ex.Message may be 'Captcha is incorrect', 'E-mail or password is incorrect', or raw JSON
logger.Error("LostFilm login error: {Message}", ex.Message);
if (ex.Message.Contains("Captcha"))
{
// Re-enter a fresh captcha and retry immediately
}
else if (ex.Message.Contains("password"))
{
// Verify and re-enter credentials
}
} Prevention
- Enter the captcha text immediately before submitting — it expires quickly.
- Verify e-mail and password on LostFilm's website first.
- Handle the specific error codes (1/2/4 = captcha, 3 = credentials) programmatically.
- Re-test promptly after correcting captcha or credentials.
When it happens
Trigger: POST to ApiUrl with credentials returns a JSON object without success=true — captcha is wrong or expired (error 1/2/4), e-mail or password is wrong (error 3), or an unrecognized error code/shape is returned.
Common situations: The captcha text was typed incorrectly or expired before submission; the password is wrong; the e-mail is wrong (note: error 136 catches non-email usernames first, but a valid-format wrong email reaches here); LostFilm changed its API error codes.
Related errors
- e.Message
- {errorMessage ?? "Login failed."}
- {json.message}
- Login failed.
- errorMessage ?? "Login failed."
AI-assisted analysis of Jackett/Jackett@adff194147 (2026-08-13).
Data as JSON: /api/errors/ce5803679f32ea3c.
Report an issue: GitHub.