AlistGo/alist · error
wukong detail failed: code=%d message=%s
Error message
wukong detail failed: code=%d message=%s
What it means
The Wukong driver's Link path posts file IDs to /netdisk/user_file/detail and requires code 0. Non-zero codes with their server message are wrapped as 'wukong detail failed'. This happens before URL extraction, so no download link is produced even though the file lists fine.
Source
Thrown at drivers/wukong/driver.go:164
var resp rawResp
_, err := d.client.R().
SetContext(ctx).
SetQueryParams(map[string]string{
"aid": d.Aid,
"device_platform": "web",
"language": d.Language,
}).
SetBody(map[string]any{
"file_id_list": []any{asIDValue(fileID)},
}).
SetResult(&resp).
Post("/netdisk/user_file/detail")
if err != nil {
return nil, err
}
if resp.Code != 0 {
return nil, fmt.Errorf("wukong detail failed: code=%d message=%s", resp.Code, resp.Message)
}
url := extractDetailMainURL(resp.Data)
if url == "" {
url = extractURL(resp.Data)
}
if url == "" {
return nil, errs.NotImplement
}
return &model.Link{
URL: url,
Header: http.Header{
"Referer": []string{webReferer},
"Cookie": []string{d.Cookie},
},
}, nil
}View on GitHub (pinned to 843d9dc814)
Solutions
- Refresh login/credentials and retry the link request.
- Re-list the parent folder to confirm the file still exists; if deleted, remove the stale entry (clear path cache).
- If the API consistently refuses one file, test it in the official wukong client — policy-restricted files cannot be linked.
Defensive patterns
Strategy: retry
Try / catch
link, err := d.getLink(fileID)
if err != nil && strings.Contains(err.Error(), "wukong detail failed") {
// re-list parent to confirm file still exists, refresh login, retry once
if _, lerr := d.listDir(fatherID); lerr != nil { return lerr }
link, err = d.getLink(fileID)
} Prevention
- Re-validate file existence after long-running jobs before linking
- Refresh credentials on detail failures
- Test policy-restricted files in the official client to confirm linkability
When it happens
Trigger: Requesting a download link for a file whose detail endpoint rejects the ID — file deleted between List and Link, expired auth, or link-generation not permitted for that file state.
Common situations: Copy/download jobs racing deletions, tokens expiring mid-job, or files in a state (e.g. uploading, violating policy) where the API refuses link issuance.
Related errors
- server returns no url
- empty download url
- cannot download a submodule
- failed to create direct link: %w
- wukong list failed: code=%d message=%s
AI-assisted analysis of AlistGo/alist@843d9dc814 (2026-08-15).
Data as JSON: /api/errors/070c23ee5ca59e48.
Report an issue: GitHub.