AlistGo/alist · warning
no share_ids found
Error message
no share_ids found
What it means
_parseShareConfigs returns this error when strings.Split of the trimmed share_ids yields zero lines. In practice this branch is unreachable: strings.Split always returns at least one element (Split("") returns [""]) and the empty-string case is already rejected by initShareList's own check, so hitting it indicates modified/duplicated validation logic.
Source
Thrown at drivers/doubao_share/util.go:221
topLevelNodes := d._extractTopLevelNodes(rootMap, rootShares)
if len(topLevelNodes) == 0 {
return fmt.Errorf("no valid share_ids found")
}
// 存储结果
d.RootFiles = topLevelNodes
return nil
}
// 从配置中解析分享ID和路径
func (d *DoubaoShare) _parseShareConfigs() (map[string]string, []string, error) {
shareConfigs := make(map[string]string) // 路径 -> 分享ID
rootShares := make([]string, 0) // 根目录显示的分享ID
lines := strings.Split(strings.TrimSpace(d.Addition.ShareIds), "\n")
if len(lines) == 0 {
return nil, nil, fmt.Errorf("no share_ids found")
}
for _, line := range lines {
line = strings.TrimSpace(line)
if line == "" {
continue
}
// 解析分享ID和路径
parts := strings.Split(line, "|")
var shareId, sharePath string
if len(parts) == 1 {
// 无路径分享,直接在根目录显示
shareId = _extractShareId(parts[0])
if shareId != "" {
rootShares = append(rootShares, shareId)
}View on GitHub (pinned to 843d9dc814)
Solutions
- Keep the empty-value guard in initShareList so this branch stays defensive only.
- If you refactored the splitter, ensure it mirrors strings.Split's guarantee of >= 1 element.
- No user-facing action needed on stock builds; configure share_ids to fix the related 733 error.
Defensive patterns
Strategy: validation
Validate before calling
// defensive only; strings.Split never returns 0 elements
lines := strings.Split(strings.TrimSpace(s), "\n")
if len(lines) == 0 { return fmt.Errorf("no share_ids found") } Prevention
- Keep the upstream empty-value guard so this branch stays unreachable.
- Preserve strings.Split semantics if refactoring the parser.
When it happens
Trigger: Only reachable in forks where the empty ShareIds guard in initShareList was removed or where the split logic was changed (e.g., a custom splitter that can return nil). Stock users see error 733 instead.
Common situations: Refactoring the parsing chain and introducing a splitter with different semantics; dead-code confusion when grepping for share_ids errors.
Related errors
- share_ids is empty
- no valid share_ids found
- 路径冲突: 路径 '%s' 被多个不同的分享ID使用: %s
- 路径冲突: 路径 '%s' (ID: %s) 与路径 '%s' (ID: %s) 存在层次冲突
- no matching share path found: %s
AI-assisted analysis of AlistGo/alist@843d9dc814 (2026-08-15).
Data as JSON: /api/errors/6d0f6557e69e8f73.
Report an issue: GitHub.