{"record":{"id":"8df793a211a60f98","repo":"fatedier/frp","slug":"invalid-configuration-file-not-found-common-sec","errorCode":null,"errorMessage":"invalid configuration file, not found [common] section","messagePattern":"invalid configuration file, not found \\[common\\] section","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/config/legacy/client.go","lineNumber":187,"sourceCode":"\tPprofEnable bool `ini:\"pprof_enable\" json:\"pprof_enable\"`\n}\n\n// Supported sources including: string(file path), []byte, Reader interface.\nfunc UnmarshalClientConfFromIni(source any) (ClientCommonConf, error) {\n\tf, err := ini.LoadSources(ini.LoadOptions{\n\t\tInsensitive:         false,\n\t\tInsensitiveSections: false,\n\t\tInsensitiveKeys:     false,\n\t\tIgnoreInlineComment: true,\n\t\tAllowBooleanKeys:    true,\n\t}, source)\n\tif err != nil {\n\t\treturn ClientCommonConf{}, err\n\t}\n\n\ts, err := f.GetSection(\"common\")\n\tif err != nil {\n\t\treturn ClientCommonConf{}, fmt.Errorf(\"invalid configuration file, not found [common] section\")\n\t}\n\n\tcommon := GetDefaultClientConf()\n\terr = s.MapTo(&common)\n\tif err != nil {\n\t\treturn ClientCommonConf{}, err\n\t}\n\n\tcommon.Metas = GetMapWithoutPrefix(s.KeysHash(), \"meta_\")\n\tcommon.OidcAdditionalEndpointParams = GetMapWithoutPrefix(s.KeysHash(), \"oidc_additional_\")\n\n\treturn common, nil\n}\n\n// if len(startProxy) is 0, start all\n// otherwise just start proxies in startProxy map\nfunc LoadAllProxyConfsFromIni(\n\tprefix string,","sourceCodeStart":169,"sourceCodeEnd":205,"githubUrl":"https://github.com/fatedier/frp/blob/6c8a8d0a97d03b44e9528d30b30c70cb9d61b405/pkg/config/legacy/client.go#L169-L205","documentation":"Legacy INI-format client configuration loader (pkg/config/legacy). After parsing the .ini file it fetches the required 'common' section via f.GetSection('common'); if the section is absent, loading fails with this error. Every valid legacy frpc ini file must start with a [common] section holding the client-wide settings.","triggerScenarios":"Loading an ini config whose first section is a proxy (e.g. [ssh]) with no [common] header, a TOML/YAML file passed to the ini loader path, or a [Common]/[COMMON] variant — the ini.File here is loaded without case-insensitive sections (InsensitiveSections: false), so only the exact lowercase 'common' matches.","commonSituations":"Users migrating from very old frp versions whose examples omitted [common]; accidental deletion of the header during edits; case mismatch like [Common]; feeding the newer TOML-format frpc.toml into code paths that still call the legacy ini loader.","solutions":["Add a [common] section header (exact lowercase) as the first section of the ini file","Move client-wide keys (server_addr, server_port, token/oidc settings) under it","If the file is actually TOML/YAML, load it through the current config loader instead of the legacy ini path","Prefer migrating to frpc.toml since the ini format is legacy"],"exampleFix":"; before\n[ssh]\ntype = tcp\nlocal_port = 22\n\n; after\n[common]\nserver_addr = \"x.x.x.x\"\nserver_port = 7000\n\n[ssh]\ntype = tcp\nlocal_port = 22","handlingStrategy":"validation","validationCode":"data, _ := os.ReadFile(path)\nif !regexp.MustCompile(`(?m)^\\[common\\]`).Match(data) {\n    return errors.New(\"legacy ini config must contain a [common] section\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Start every legacy ini config with [common]","Use the exact lowercase section name","Migrate to frpc.toml; the ini path is legacy"],"tags":["frp","config","ini","legacy","client"],"backgroundTag":null,"analyzedSha":"6c8a8d0a97d03b44e9528d30b30c70cb9d61b405","analyzedAt":"2026-08-15T06:53:27.215Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}