{"record":{"id":"6d0f6557e69e8f73","repo":"AlistGo/alist","slug":"no-share-ids-found","errorCode":null,"errorMessage":"no share_ids found","messagePattern":"no share_ids found","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"drivers/doubao_share/util.go","lineNumber":221,"sourceCode":"\ttopLevelNodes := d._extractTopLevelNodes(rootMap, rootShares)\n\tif len(topLevelNodes) == 0 {\n\t\treturn fmt.Errorf(\"no valid share_ids found\")\n\t}\n\n\t// 存储结果\n\td.RootFiles = topLevelNodes\n\n\treturn nil\n}\n\n// 从配置中解析分享ID和路径\nfunc (d *DoubaoShare) _parseShareConfigs() (map[string]string, []string, error) {\n\tshareConfigs := make(map[string]string) // 路径 -> 分享ID\n\trootShares := make([]string, 0)         // 根目录显示的分享ID\n\n\tlines := strings.Split(strings.TrimSpace(d.Addition.ShareIds), \"\\n\")\n\tif len(lines) == 0 {\n\t\treturn nil, nil, fmt.Errorf(\"no share_ids found\")\n\t}\n\n\tfor _, line := range lines {\n\t\tline = strings.TrimSpace(line)\n\t\tif line == \"\" {\n\t\t\tcontinue\n\t\t}\n\n\t\t// 解析分享ID和路径\n\t\tparts := strings.Split(line, \"|\")\n\t\tvar shareId, sharePath string\n\n\t\tif len(parts) == 1 {\n\t\t\t// 无路径分享，直接在根目录显示\n\t\t\tshareId = _extractShareId(parts[0])\n\t\t\tif shareId != \"\" {\n\t\t\t\trootShares = append(rootShares, shareId)\n\t\t\t}","sourceCodeStart":203,"sourceCodeEnd":239,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/doubao_share/util.go#L203-L239","documentation":"_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.","triggerScenarios":"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.","commonSituations":"Refactoring the parsing chain and introducing a splitter with different semantics; dead-code confusion when grepping for share_ids errors.","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."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// defensive only; strings.Split never returns 0 elements\nlines := strings.Split(strings.TrimSpace(s), \"\\n\")\nif len(lines) == 0 { return fmt.Errorf(\"no share_ids found\") }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep the upstream empty-value guard so this branch stays unreachable.","Preserve strings.Split semantics if refactoring the parser."],"tags":["doubao-share","config","dead-code"],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}