{"record":{"id":"b623a6787a460050","repo":"AdguardTeam/AdGuardHome","slug":"version-json-bad-key-q-w","errorCode":null,"errorMessage":"version.json: bad key %q: %w","messagePattern":"version\\.json: bad key %q: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/updater/check.go","lineNumber":120,"sourceCode":"\terr = json.Unmarshal(data, &versionJSON)\n\tif err != nil {\n\t\treturn info, fmt.Errorf(\"version.json: %w\", err)\n\t}\n\n\tfor k, v := range versionJSON {\n\t\terr = validate.NotEmpty(\"version_json_value\", v)\n\t\tif err != nil {\n\t\t\treturn info, fmt.Errorf(\"bad value for %q key: %w\", k, err)\n\t\t}\n\t}\n\n\tinfo.NewVersion = versionJSON[\"version\"]\n\tinfo.Announcement = versionJSON[\"announcement\"]\n\tinfo.AnnouncementURL = versionJSON[\"announcement_url\"]\n\n\tpackageURL, key, found := u.downloadURL(ctx, versionJSON)\n\tif !found {\n\t\treturn info, fmt.Errorf(\"version.json: bad key %q: %w\", key, errors.ErrNoValue)\n\t}\n\n\tisNewVersion := info.NewVersion != u.version\n\tif isNewVersion {\n\t\tu.logger.InfoContext(\n\t\t\tctx,\n\t\t\t\"a new version is available\",\n\t\t\t\"current_version\", u.version,\n\t\t\t\"new_version\", info.NewVersion,\n\t\t)\n\t} else {\n\t\tu.logger.DebugContext(\n\t\t\tctx,\n\t\t\t\"the current version is up-to-date\",\n\t\t\t\"current_version\", u.version,\n\t\t)\n\t}\n","sourceCodeStart":102,"sourceCodeEnd":138,"githubUrl":"https://github.com/AdguardTeam/AdGuardHome/blob/b41aefbe51c8dde65e2c50f093996afa0502edf9/internal/updater/check.go#L102-L138","documentation":"Thrown when none of the known download-URL keys are present in version.json. The updater looks for a platform/key combination via downloadURL; if no matching package URL is found, it reports the missing key with errors.ErrNoValue.","triggerScenarios":"VersionInfo on a version.json that lacks the key for the current OS/arch (e.g. 'linux_armv7' or 'windows_amd64') the updater was built for.","commonSituations":"Running an unsupported or newly-added platform not yet published in channel metadata; typo'd key names in a self-hosted/mirror version.json; checking for a version whose package build failed.","solutions":["Inspect version.json keys and confirm one matches your GOOS/GOARCH package key","Upgrade AdGuard Home to a build whose platform is included in the metadata","Fix the mirror/pipeline to include all platform keys","Use the correct channel URL if pointed at an incomplete one"],"exampleFix":"// before\n{\"version\":\"v0.107.0\",\"linux_arm64\":\"https://.../pkg.tar.gz\"}\n// after\n{\"version\":\"v0.107.0\",\"linux_arm64\":\"https://.../pkg.tar.gz\",\"linux_amd64\":\"https://.../pkg.tar.gz\"}","handlingStrategy":"validation","validationCode":"if _, ok := vj[fmt.Sprintf(\"%s_%s\", runtime.GOOS, goarch)]; !ok {\n    // platform key missing; skip update or report unsupported platform\n}","typeGuard":null,"tryCatchPattern":"if _, err := u.VersionInfo(ctx); err != nil {\n    if errors.Is(err, agherrors.ErrNoValue) { /* no package for this platform */ }\n}","preventionTips":["Pin to platforms your release pipeline actually publishes","Test update checks on all shipped GOOS/GOARCH combos"],"tags":["update-check","platform-support","metadata"],"backgroundTag":"missing-required-json-key","analyzedSha":"b41aefbe51c8dde65e2c50f093996afa0502edf9","analyzedAt":"2026-08-27T04:57:55.097Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}