AlistGo/alist · error
baidu youth list metadata incomplete for %s
Error message
baidu youth list metadata incomplete for %s
What it means
Returned by BaiduYouth.resolveDownloadMeta (drivers/baidu_youth/util.go:357): the file was found in the directory listing by path, but its entry is missing path, fs_id, or md5, so the trio needed to sign a locatedownload cannot be assembled. It indicates a truncated/unusual server listing rather than a missing file (a total miss returns the ObjectNotFound error below it).
Source
Thrown at drivers/baidu_youth/util.go:357
func (d *BaiduYouth) resolveDownloadMeta(ctx context.Context, file model.Obj) (string, string, string, error) {
parentDir := stdpath.Dir(file.GetPath())
if parentDir == "." {
parentDir = "/"
}
files, err := d.getFiles(ctx, parentDir)
if err != nil {
return "", "", "", err
}
for _, listedFile := range files {
if listedFile.Path != file.GetPath() {
continue
}
fileID := strconv.FormatInt(listedFile.FsId, 10)
if listedFile.Path != "" && fileID != "" && listedFile.Md5 != "" {
return listedFile.Path, fileID, listedFile.Md5, nil
}
return "", "", "", fmt.Errorf("baidu youth list metadata incomplete for %s", file.GetPath())
}
return "", "", "", errs.NewErr(errs.ObjectNotFound, "baidu youth list metadata not found: %s", file.GetPath())
}
func normalizeLocatedownloadURL(rawURL string) (string, error) {
if rawURL == "" {
return "", fmt.Errorf("baidu youth locatedownload url is empty")
}
if !strings.Contains(rawURL, "response-cache-control=") {
sep := "&"
if !strings.Contains(rawURL, "?") {
sep = "?"
}
rawURL += sep + "response-cache-control=private"
}
return rawURL, nil
}
View on GitHub (pinned to 843d9dc814)
Solutions
- Confirm the target of Link is a file, not a folder
- Re-list the parent directory to refresh metadata and retry resolve
- If md5 stays empty for that file, use the video dlink path (buildVideoLink) for media instead
Defensive patterns
Strategy: validation
Validate before calling
// resolve metadata from a fresh listing and require all fields before signing
files, err := d.getFiles(ctx, parentDir)
if err != nil {
return err
}
for _, f := range files {
if f.Path == file.GetPath() && f.Path != "" && f.Md5 != "" && f.FsId != 0 {
return signAndServe(f)
}
}
return errs.NewErr(errs.ObjectNotFound, "file %s lacks download metadata", file.GetPath()) Type guard
func hasDownloadMeta(f File) bool {
return f.Path != "" && f.FsId != 0 && f.Md5 != ""
} Prevention
- Never call Link on directories with this driver
- Re-list the parent right before downloading instead of trusting old metadata
- For files whose md5 stays empty, route to the video-dlink path
When it happens
Trigger: Listing returns a matching path whose Md5 is empty (folders, special files, or server-side redacted entries); concurrent deletion between list and resolve; API returning partial metadata for some entries.
Common situations: Calling Link on an object that is actually a directory; files Baidu keeps without md5 (streaming uploads still processing); race with a delete.
Related errors
- missing cookie or qrcode account
- server returns no url
- empty download url
- cannot download a submodule
- addr is nil
AI-assisted analysis of AlistGo/alist@843d9dc814 (2026-08-15).
Data as JSON: /api/errors/4c0f62daa1a4673b.
Report an issue: GitHub.