AlistGo/alist · error
login err: %w, data: %s
Error message
login err: %w, data: %s
What it means
During LanZou account login (mlogin.php), the response matched the acw_sc__v2 challenge pattern but CalcAcwScV2 failed to extract/derive the cookie value, so login aborts with both the parse error and the raw body. The account-mode driver cannot obtain session cookies until the challenge is solved.
Source
Thrown at drivers/lanzou/util.go:181
"setSig": "",
"setScene": "",
"setTocen": "",
"formhash": "",
})
if d.UserAgent != "" {
req.SetHeader("User-Agent", d.UserAgent)
}
if acwScV2 != "" {
req.SetCookie(&http.Cookie{Name: "acw_sc__v2", Value: acwScV2})
}
resp, err = req.Post(loginURL)
if err != nil {
return nil, err
}
if findAcwScV2Reg.Match(resp.Body()) {
vs, e := CalcAcwScV2(resp.String())
if e != nil {
return nil, fmt.Errorf("login err: %w, data: %s", e, resp.Body())
}
acwScV2 = vs
continue
}
break
}
if utils.Json.Get(resp.Body(), "zt").ToInt() != 1 {
return nil, fmt.Errorf("login err: %s", resp.Body())
}
d.Cookie = CookieToString(resp.Cookies())
return resp.Cookies(), nil
}
/*
通过cookie获取数据
*/
// 获取文件和文件夹,获取到的文件大小、更改时间不可信View on GitHub (pinned to 843d9dc814)
Solutions
- Inspect the logged body (use debug level) to identify the new challenge format
- Wait several minutes and retry login — stricter challenges are often temporary after burst attempts
- Update OpenList to get the current CalcAcwScV2 implementation; if maintaining a fork, widen the arg1 regex and verify the XOR key
Defensive patterns
Strategy: retry
Type guard
func isChallengeParseFailure(err error) bool {
return err != nil && strings.Contains(err.Error(), "login err:") && strings.Contains(err.Error(), "acw")
} Try / catch
cookies, err := d.Login()
if err != nil && isChallengeParseFailure(err) {
// back off: stricter WAF challenge after burst attempts
time.Sleep(10 * time.Minute)
cookies, err = d.Login()
} Prevention
- Avoid tight login retry loops — they escalate the challenge strictness
- Persist cookies (d.Cookie) so logins are rare rather than per-request
- Keep the CalcAcwScV2 solver current via driver updates
When it happens
Trigger: Login POST returns a WAF challenge page whose arg1 payload does not match the extraction regex (format change/escaped HTML), making FindStringSubmatch fail inside CalcAcwScV2.
Common situations: WAF frontend updated with a new challenge variant; login attempts too frequent triggering a stricter challenge; CDN/regional differences serving incompatible challenge pages; body contains the marker string only incidentally (e.g. inside the debug log text).
Related errors
AI-assisted analysis of AlistGo/alist@843d9dc814 (2026-08-15).
Data as JSON: /api/errors/c5257b53e335f69c.
Report an issue: GitHub.