{"record":{"id":"ff9c46375b60e574","repo":"fatedier/frp","slug":"failed-to-load-config-from-aggregator-w","errorCode":null,"errorMessage":"failed to load config from aggregator: %w","messagePattern":"failed to load config from aggregator: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"client/service.go","lineNumber":182,"sourceCode":"\tif err := setServiceOptionsDefault(&options); err != nil {\n\t\treturn nil, err\n\t}\n\n\tauthRuntime, err := auth.BuildClientAuth(&options.Common.Auth)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif options.ConfigSourceAggregator == nil {\n\t\treturn nil, fmt.Errorf(\"config source aggregator is required\")\n\t}\n\n\tconfigSource := options.ConfigSourceAggregator.ConfigSource()\n\tstoreSource := options.ConfigSourceAggregator.StoreSource()\n\n\tproxyCfgs, visitorCfgs, loadErr := options.ConfigSourceAggregator.Load()\n\tif loadErr != nil {\n\t\treturn nil, fmt.Errorf(\"failed to load config from aggregator: %w\", loadErr)\n\t}\n\tproxyCfgs, visitorCfgs = config.FilterClientConfigurers(options.Common, proxyCfgs, visitorCfgs)\n\tproxyCfgs = config.CompleteProxyConfigurers(proxyCfgs)\n\tvisitorCfgs = config.CompleteVisitorConfigurers(visitorCfgs)\n\n\t// Create the web server after all fallible steps so its listener is not\n\t// leaked when an earlier error causes NewService to return.\n\tvar webServer *httppkg.Server\n\tif options.Common.WebServer.Port > 0 {\n\t\tws, err := httppkg.NewServer(options.Common.WebServer)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\twebServer = ws\n\t}\n\n\ts := &Service{\n\t\tctx:              context.Background(),","sourceCodeStart":164,"sourceCodeEnd":200,"githubUrl":"https://github.com/fatedier/frp/blob/6c8a8d0a97d03b44e9528d30b30c70cb9d61b405/client/service.go#L164-L200","documentation":"Returned by client.NewService (frpc startup) when ConfigSourceAggregator.Load() fails while gathering proxy/visitor configs from the configured sources (config file, and with aggregator setups, additional sources). The wrapped error identifies which source failed; frpc aborts creation before starting the web server or logging in.","triggerScenarios":"RunClient with a config file that fails to parse or load (bad TOML/YAML/JSON syntax, unreadable file path), or an included/watched source erroring during the initial Load call.","commonSituations":"Syntax error in frpc.toml (unterminated string, wrong bracket type); includes pointing at missing files; permission errors reading the config; env-var-expanded paths that resolve incorrectly.","solutions":["Read the wrapped error — it names the failing source and underlying parse error.","Validate the config file: frpc verify -c frpc.toml (or frpc check) to surface syntax problems.","Fix any include paths / file permissions referenced by the aggregator.","After edits, re-run verification before starting frpc."],"exampleFix":"# before (frpc.toml) — broken quoting\nauth.token = \"abc\n\n# after\nauth.token = \"abc\"","handlingStrategy":"validation","validationCode":"// CI / pre-deploy gate: parse the config before starting frpc\n// (Go embedders)\nif _, err := config.LoadConfigureWithType(path, \"toml\"); err != nil {\n    return fmt.Errorf(\"refusing to start: config invalid: %w\", err)\n}","typeGuard":null,"tryCatchPattern":"svc, err := client.NewService(options)\nif err != nil && strings.Contains(err.Error(), \"load config from aggregator\") {\n    // run `frpc verify -c frpc.toml`, fix reported syntax error, restart\n}","preventionTips":["Run frpc verify in CI for every config change.","Write config edits atomically (temp file + rename).","Pin include paths and check file readability before start."],"tags":["config","startup","frpc","parse-error"],"backgroundTag":null,"analyzedSha":"6c8a8d0a97d03b44e9528d30b30c70cb9d61b405","analyzedAt":"2026-08-15T06:53:27.215Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}