{"record":{"id":"e11090d27b6e463d","repo":"fatedier/frp","slug":"failed-to-create-store-source-w","errorCode":null,"errorMessage":"failed to create store source: %w","messagePattern":"failed to create store source: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/frpc/sub/root.go","lineNumber":155,"sourceCode":"func runClientWithAggregator(result *config.ClientConfigLoadResult, unsafeFeatures *security.UnsafeFeatures, cfgFilePath string) error {\n\tconfigSource := source.NewConfigSource()\n\tif err := configSource.ReplaceAll(result.Proxies, result.Visitors); err != nil {\n\t\treturn fmt.Errorf(\"failed to set config source: %w\", err)\n\t}\n\n\tvar storeSource *source.StoreSource\n\n\tif result.Common.Store.IsEnabled() {\n\t\tstorePath := result.Common.Store.Path\n\t\tif storePath != \"\" && cfgFilePath != \"\" && !filepath.IsAbs(storePath) {\n\t\t\tstorePath = filepath.Join(filepath.Dir(cfgFilePath), storePath)\n\t\t}\n\n\t\ts, err := source.NewStoreSource(source.StoreSourceConfig{\n\t\t\tPath: storePath,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"failed to create store source: %w\", err)\n\t\t}\n\t\tstoreSource = s\n\t}\n\n\taggregator := source.NewAggregator(configSource)\n\tif storeSource != nil {\n\t\taggregator.SetStoreSource(storeSource)\n\t}\n\n\tproxyCfgs, visitorCfgs, err := aggregator.Load()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to load config from sources: %w\", err)\n\t}\n\n\tproxyCfgs, visitorCfgs = config.FilterClientConfigurers(result.Common, proxyCfgs, visitorCfgs)\n\tproxyCfgs = config.CompleteProxyConfigurers(proxyCfgs)\n\tvisitorCfgs = config.CompleteVisitorConfigurers(visitorCfgs)\n","sourceCodeStart":137,"sourceCodeEnd":173,"githubUrl":"https://github.com/fatedier/frp/blob/6c8a8d0a97d03b44e9528d30b30c70cb9d61b405/cmd/frpc/sub/root.go#L137-L173","documentation":"The client store feature is enabled (common.store) but source.NewStoreSource failed while preparing the on-disk cache at the resolved store path. The path is joined with the config file's directory when relative, so failure usually means the filesystem location is unusable.","triggerScenarios":"NewStoreSource errors on an unwritable or nonexistent directory for the store file, a path that exists but has wrong type or permissions, or an unparsable existing store file at that path.","commonSituations":"store.path points to a location frpc cannot write (read-only volume, missing directory, permissions); relative store.path resolved against an unexpected cfgFile directory; a corrupted or hand-edited cache file from a previous version.","solutions":["Check the resolved store path: if relative it joins filepath.Dir(cfgFile); confirm the directory exists and frpc can write to it.","Fix permissions or pre-create the directory, or point store.path to an absolute writable location.","If a stale or corrupt cache file is the cause (parse error inside), delete it; the store is a cache and will be rebuilt.","If you don't need offline config caching, disable common.store."],"exampleFix":"# before (frpc.toml)\n[store]\nenabled = true\npath = \"/var/frpc/cache\"   # parent dir missing\n\n# after\n[store]\nenabled = true\npath = \"/var/frpc/cache/frpc_cache\"  # mkdir -p /var/frpc/cache first","handlingStrategy":"validation","validationCode":"if result.Common.Store.IsEnabled() {\n    p := result.Common.Store.Path\n    if !filepath.IsAbs(p) {\n        p = filepath.Join(filepath.Dir(cfgFilePath), p)\n    }\n    if f, err := os.OpenFile(p, os.O_RDWR|os.O_CREATE, 0o600); err != nil {\n        return fmt.Errorf(\"store path not writable: %w\", err)\n    } else {\n        f.Close()\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use absolute store paths in service deployments","Pre-create and permission the store directory for the frpc user","Container setups: mount a writable volume at the store path"],"tags":["config","filesystem","store","frpc"],"backgroundTag":null,"analyzedSha":"6c8a8d0a97d03b44e9528d30b30c70cb9d61b405","analyzedAt":"2026-08-15T06:53:27.215Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}