{"record":{"id":"a23d914c2da831ef","repo":"AlistGo/alist","slug":"resolve-root-folder-path-failed-folder-q-not-fou-a23d91","errorCode":null,"errorMessage":"resolve root folder path failed: folder %q not found under parent %s","messagePattern":"resolve root folder path failed: folder %q not found under parent (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/guangyapan/driver.go","lineNumber":524,"sourceCode":"\t\t}\n\t\tfor _, item := range resp.Data.List {\n\t\t\tseen++\n\t\t\tif item.ResType == 2 && item.FileName == name {\n\t\t\t\treturn item.FileID, nil\n\t\t\t}\n\t\t}\n\t\tif len(resp.Data.List) < pageSize {\n\t\t\tbreak\n\t\t}\n\t\tif resp.Data.Total > 0 && seen >= resp.Data.Total {\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif parentID == \"\" {\n\t\treturn \"\", fmt.Errorf(\"resolve root folder path failed: folder %q not found under /\", name)\n\t}\n\treturn \"\", fmt.Errorf(\"resolve root folder path failed: folder %q not found under parent %s\", name, parentID)\n}\n\nfunc (d *GuangYaPan) ensureAccessToken(ctx context.Context) error {\n\tif strings.TrimSpace(d.AccessToken) != \"\" {\n\t\treturn nil\n\t}\n\tif strings.TrimSpace(d.RefreshToken) == \"\" {\n\t\tif d.canSMSLogin() {\n\t\t\treturn d.loginBySMSCode(ctx)\n\t\t}\n\t\tif d.PhoneNumber != \"\" {\n\t\t\treturn errors.New(\"not logged in yet: please fill verify_code and save storage to finish SMS login\")\n\t\t}\n\t\treturn errors.New(\"access token is empty\")\n\t}\n\treturn d.refreshToken(ctx)\n}\n","sourceCodeStart":506,"sourceCodeEnd":542,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/guangyapan/driver.go#L506-L542","documentation":"Same RootPath resolution walk, but for a nested segment: the folder named `name` was not found under the already-resolved parent whose ID is parentID. Only the first segment produces the 'under /' variant; every deeper segment produces this one.","triggerScenarios":"resolveRootFolderID iterates segments of RootPath; for segment index > 0 it lists children of the resolved parent and finds no match, then returns this error naming the offending parent ID.","commonSituations":"A subfolder in RootPath (/photos/2024) was renamed or deleted; case-sensitive name mismatch (Photos vs photos); partial visibility of a shared folder.","solutions":["Check each intermediate folder in RootPath exists with the exact spelling and case.","Shorten RootPath to a known-good parent and browse down to confirm where resolution breaks.","Fix or recreate the missing intermediate folder on the provider."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err := storage.Init(ctx); err != nil {\n    if strings.Contains(err.Error(), \"not found under parent\") {\n        // nested segment missing: prompt user to verify each path level\n    }\n}","preventionTips":["Keep RootPath shallow to reduce resolution failures.","Use exact casing; folder matching here is exact-string.","After provider-side reorganizations, re-validate the configured path."],"tags":["root-path","folder-not-found","nested-path","configuration","guangyapan"],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}