AlistGo/alist · error
uid variable not find
Error message
uid variable not find
What it means
Thrown by the lanzou driver's login/account bootstrap when fetching https://pc.woozooo.com/mydisk.php?item=files&action=index and the returned HTML does not contain a 'uid="..."' assignment (regex `uid=([^'"&;]+)`). The uid is required for subsequent account API calls (listing, managing files on your own lanzou account storage).
Source
Thrown at drivers/lanzou/util.go:587
size, _ := strconv.ParseInt(res.Header().Get("Content-Length"), 10, 64)
return &size, &time
}
func (d *LanZou) getVeiAndUid() (vei string, uid string, err error) {
// mydisk.php 同样可能返回 acw_sc__v2 反爬挑战页,需经 getHtml 处理后再解析
html, err := d.getHtml("https://pc.woozooo.com/mydisk.php", func(req *resty.Request) {
req.SetQueryParams(map[string]string{
"item": "files",
"action": "index",
})
})
if err != nil {
return
}
// uid
uids := regexp.MustCompile(`uid=([^'"&;]+)`).FindStringSubmatch(html)
if len(uids) < 2 {
err = fmt.Errorf("uid variable not find")
return
}
uid = uids[1]
// vei
data, err := htmlJsonToMap(html)
if err != nil {
return
}
vei = data["vei"]
return
}
View on GitHub (pinned to 843d9dc814)
Solutions
- Log in to pc.woozooo.com in a browser, copy the full fresh Cookie header, and update the storage's Cookie field.
- Verify the cookie works by opening https://pc.woozizzo.com/mydisk.php?item=files&action=index while logged out of other sessions — it must show the file list, not a login form.
- If the browser shows a slider captcha, complete it, then re-copy cookies.
- Update OpenList/AList in case the uid extraction regex was fixed upstream.
Example fix
// before: stale cookies -> login page HTML -> no uid -> error // after: refresh cookie and pre-validate before saving storage // (browser check) curl -s 'https://pc.woozooo.com/mydisk.php?item=files&action=index' \ // -H 'Cookie: <your cookie>' | grep -o 'uid=[^"&;]*' // must print a uid; otherwise refresh the cookie
Defensive patterns
Strategy: validation
Validate before calling
// Before saving the storage, verify cookies yield a uid
html, _ := getHtmlWithCookie("https://pc.woozooo.com/mydisk.php?item=files&action=index", cookie)
if len(regexp.MustCompile(`uid=([^'"&;]+)`).FindStringSubmatch(html)) < 2 {
return errors.New("cookie invalid: no uid in mydisk page; refresh cookie")
} Try / catch
if err := d.Init(ctx); err != nil {
if strings.Contains(err.Error(), "uid variable not find") {
// prompt user to re-paste cookie instead of retrying
return promptReauth("lanzou cookie expired")
}
} Prevention
- Refresh lanzou cookies on a schedule; sessions expire.
- Copy the complete Cookie header from a logged-in pc.woozooo.com tab.
- Complete any slider captcha in the same browser before copying cookies.
When it happens
Trigger: Creating/initializing a lanzou storage that uses account cookies (Cookie filled in addition) when the mydisk.php response lacks the uid variable: invalid or expired cookies, a redirect to the login page, or a WAF/verification page returned by pc.woozooo.com.
Common situations: Cookie string pasted incorrectly or missing key entries (phpdisk_info / ylogin), cookies expired (lanzou sessions rotate), IP flagged by the WAF, or a lanzou frontend change to the mydisk page markup.
Related errors
AI-assisted analysis of AlistGo/alist@843d9dc814 (2026-08-15).
Data as JSON: /api/errors/3cd6bebe80167027.
Report an issue: GitHub.