fish2018/pansou · error
重新登录失败
Error message
重新登录失败: %w
What it means
Wraps the failure of p.doLogin (the actual site login with the decrypted username/password) during a re-login attempt. doLogin returns a cloudflare-bypassing scraper and session cookie; if the login request itself fails, this error propagates it with context that it happened during re-login.
Solutions
- Verify the stored username/password are still valid on the site and re-save them if changed.
- Enable DebugLog to see doLogin's printed failure reason.
- Retry later if the site or network is temporarily down.
- Update cloudscraper/plugin to handle the current anti-bot challenge.
Defensive patterns
Strategy: retry
Validate before calling
if user.Username == "" || user.EncryptedPassword == "" {
return errors.New("missing credentials for re-login")
} Try / catch
scraper, cookie, err := p.doLogin(user.Username, password)
if err != nil {
if isTemporary(err) {
time.Sleep(backoff)
scraper, cookie, err = p.doLogin(user.Username, password)
}
if err != nil {
return fmt.Errorf("re-login failed, check credentials: %w", err)
}
} Prevention
- Keep stored credentials up to date when site passwords change.
- Persist session cookies to avoid frequent re-logins.
- Keep cloudscraper updated against new anti-bot challenges.
When it happens
Trigger: reloginUser -> decryptPassword succeeds -> p.doLogin(user.Username, password) returns an error: wrong credentials, CAPTCHA/challenge not solved, site unreachable, or cloudscraper failing to obtain a clearance cookie.
Common situations: Password changed on the site; site added new anti-bot protections; temporary network outage; account locked/banned; cloudscraper version outdated against current Cloudflare challenge.
Related errors
AI-assisted analysis of fish2018/pansou@beaa561337 (2026-09-07).
Data as JSON: /api/errors/e3008983d7b83da2.
Report an issue: GitHub.
Appendix: source
Thrown at plugin/gying/gying.go:2285
fmt.Printf("[Gying] 🔄 开始重新登录用户: %s\n", user.Username)
}
// 解密密码
password, err := p.decryptPassword(user.EncryptedPassword)
if err != nil {
if DebugLog {
fmt.Printf("[Gying] ❌ 解密密码失败: %v\n", err)
}
return fmt.Errorf("解密密码失败: %w", err)
}
// 执行登录
scraper, cookie, err := p.doLogin(user.Username, password)
if err != nil {
if DebugLog {
fmt.Printf("[Gying] ❌ 重新登录失败: %v\n", err)
}
return fmt.Errorf("重新登录失败: %w", err)
}
// 更新scraper实例
p.scrapers.Store(user.Hash, scraper)
// 更新用户信息
user.Cookie = cookie
user.LoginAt = time.Now()
user.ExpireAt = time.Now().AddDate(0, 4, 0)
user.Status = "active"
if err := p.saveUser(user); err != nil {
if DebugLog {
fmt.Printf("[Gying] ⚠️ 保存用户失败: %v\n", err)
}
}
if DebugLog {View on GitHub (pinned to beaa561337)