{"record":{"id":"0102892278c66981","repo":"tailscale/tailscale","slug":"error-parsing-config-no-version-field-provided","errorCode":null,"errorMessage":"error parsing config: no \"version\" field provided","messagePattern":"error parsing config: no \"version\" field provided","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kube/k8s-proxy/conf/conf.go","lineNumber":93,"sourceCode":"\tIssueCerts  opt.Bool                      `json:\",omitempty\"` // Whether this replica should issue TLS certs for the Tailscale Service.\n}\n\n// Load reads and parses the config file at the provided path on disk.\nfunc Load(raw []byte) (c Config, err error) {\n\tc.Raw = raw\n\tc.Std, err = hujson.Standardize(c.Raw)\n\tif err != nil {\n\t\treturn c, fmt.Errorf(\"error parsing config as HuJSON/JSON: %w\", err)\n\t}\n\tvar ver VersionedConfig\n\tif err := json.Unmarshal(c.Std, &ver); err != nil {\n\t\treturn c, fmt.Errorf(\"error parsing config: %w\", err)\n\t}\n\trootV1Alpha1 := (ver.Version == v1Alpha1)\n\tbackCompatV1Alpha1 := (ver.V1Alpha1 != nil)\n\tswitch {\n\tcase ver.Version == \"\":\n\t\treturn c, errors.New(\"error parsing config: no \\\"version\\\" field provided\")\n\tcase rootV1Alpha1 && backCompatV1Alpha1:\n\t\t// Exactly one of these should be set.\n\t\treturn c, errors.New(\"error parsing config: both root and v1alpha1 config provided\")\n\tcase rootV1Alpha1 != backCompatV1Alpha1:\n\t\tc.Version = v1Alpha1\n\t\tswitch {\n\t\tcase rootV1Alpha1 && ver.ConfigV1Alpha1 != nil:\n\t\t\tc.Parsed = *ver.ConfigV1Alpha1\n\t\tcase backCompatV1Alpha1:\n\t\t\tc.Parsed = *ver.V1Alpha1\n\t\tdefault:\n\t\t\tc.Parsed = ConfigV1Alpha1{}\n\t\t}\n\tdefault:\n\t\treturn c, fmt.Errorf(\"error parsing config: unsupported \\\"version\\\" value %q; want \\\"%s\\\"\", ver.Version, v1Alpha1)\n\t}\n\n\treturn c, nil","sourceCodeStart":75,"sourceCodeEnd":111,"githubUrl":"https://github.com/tailscale/tailscale/blob/cfe32b8be6a33f8e24fbc369cbfbf7c729d9e042/kube/k8s-proxy/conf/conf.go#L75-L111","documentation":"Error \"error parsing config: no \"version\" field provided\" thrown in tailscale/tailscale.","triggerScenarios":"Thrown at kube/k8s-proxy/conf/conf.go:93 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"cfe32b8be6a33f8e24fbc369cbfbf7c729d9e042","analyzedAt":"2026-08-15T19:58:31.583Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}