{"record":{"id":"2440a383374a1148","repo":"AlistGo/alist","slug":"share-ids-is-empty","errorCode":null,"errorMessage":"share_ids is empty","messagePattern":"share_ids is empty","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/doubao_share/util.go","lineNumber":185,"sourceCode":"\n\t\t// 记录当前游标\n\t\tcursorHistory[r.NodeInfoData.NextCursor] = true\n\n\t\t// 递归获取下一页\n\t\tnextFiles, err := d.getShareOverviewWithHistory(shareId, r.NodeInfoData.NextCursor, cursorHistory)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tresp = append(resp, nextFiles...)\n\t}\n\n\treturn resp, nil\n}\n\nfunc (d *DoubaoShare) initShareList() error {\n\tif d.Addition.ShareIds == \"\" {\n\t\treturn fmt.Errorf(\"share_ids is empty\")\n\t}\n\n\t// 解析分享配置\n\tshareConfigs, rootShares, err := d._parseShareConfigs()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// 检查路径冲突\n\tif err := d._detectPathConflicts(shareConfigs); err != nil {\n\t\treturn err\n\t}\n\n\t// 构建树形结构\n\trootMap := d._buildTreeStructure(shareConfigs, rootShares)\n\n\t// 提取顶级节点\n\ttopLevelNodes := d._extractTopLevelNodes(rootMap, rootShares)","sourceCodeStart":167,"sourceCodeEnd":203,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/doubao_share/util.go#L167-L203","documentation":"DoubaoShare.initShareList refuses to start when the addition field share_ids is empty. share_ids is the mount's only source of configuration (one share per line, optionally 'path|share_id'), so an empty value means the storage was added with no configuration.","triggerScenarios":"Creating a doubao_share storage mount and leaving the share_ids text field blank; the config was saved but the field failed validation/serialization; automation provisioning the mount without the field.","commonSituations":"First-time setup where the user skipped the required field; config imported from another instance missing the field; the UI marking it required but an API-created mount bypassing that.","solutions":["Open the storage's settings in the admin UI and fill share_ids with at least one line: 'share_id' or 'mount_path|share_id'.","If created via API/CLI, include \"addition\": {\"share_ids\": \"...\"} in the payload.","Restart/refresh the storage after saving so initShareList re-runs."],"exampleFix":"// before\n{\"driver\": \"DoubaoShare\", \"addition\": {\"share_ids\": \"\"}}\n\n// after\n{\"driver\": \"DoubaoShare\", \"addition\": {\"share_ids\": \"7412365891234567890\"}}","handlingStrategy":"validation","validationCode":"if strings.TrimSpace(d.Addition.ShareIds) == \"\" {\n    return fmt.Errorf(\"share_ids is empty: add at least one 'share_id' or 'path|share_id' line\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat share_ids as required when creating the mount (the UI marks it required).","Include the field in API/CLI provisioning payloads."],"tags":["doubao-share","config","validation"],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}