{"record":{"id":"45fc911d0b5058ae","repo":"rancher/rancher","slug":"parsing-appid-w","errorCode":null,"errorMessage":"parsing AppID: %w","messagePattern":"parsing AppID: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/auth/providers/githubapp/githubapp_client.go","lineNumber":330,"sourceCode":"\t}\n\n\treturn getDataForApp(ctx, appID, []byte(config.PrivateKey), installationID, getAPIURL(\"\", config))\n}\n\n// TODO: Move this into a method on the struct and cache!\nfunc getInstallationClientFromConfig(ctx context.Context, config *apiv3.GithubAppConfig) (*github.Client, error) {\n\tappID, installationID, err := getInstallationAndAppIDFromConfig(config)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn getInstallationClient(ctx, appID, []byte(config.PrivateKey), installationID, getAPIURL(\"\", config))\n}\n\nfunc getInstallationAndAppIDFromConfig(config *apiv3.GithubAppConfig) (int64, int64, error) {\n\tappID, err := strconv.ParseInt(config.AppID, 10, 64)\n\tif err != nil {\n\t\treturn 0, 0, fmt.Errorf(\"parsing AppID: %w\", err)\n\t}\n\n\tvar installationID int64\n\tif config.InstallationID != \"\" {\n\t\tparsed, err := strconv.ParseInt(config.InstallationID, 10, 64)\n\t\tif err != nil {\n\t\t\treturn 0, 0, fmt.Errorf(\"parsing InstallationID: %w\", err)\n\t\t}\n\t\tinstallationID = parsed\n\t}\n\n\treturn appID, installationID, nil\n}\n","sourceCodeStart":312,"sourceCodeEnd":344,"githubUrl":"https://github.com/rancher/rancher/blob/932558d4e68565aff2d2f36e89ec4a391b06e7c5/pkg/auth/providers/githubapp/githubapp_client.go#L312-L344","documentation":"strconv.ParseInt on config.AppID failed: the GithubAppConfig CR's appID field is not a base-10 integer. The App ID is the numeric identifier shown on the GitHub App settings page (not the client ID, not the app name). This is a pure admin configuration error surfaced before any GitHub API call.","triggerScenarios":"AppID left empty; the app name (e.g. 'rancher-integration') pasted instead of the numeric ID; the client ID (Iv1.xxxx / Ov23xxx) entered in the App ID field; stray whitespace/quotes from copy-paste or helm values.","commonSituations":"Confusing the three identifiers in GitHub's Developer settings UI; hand-edited helm values or authconfigs CR; templating bugs injecting a label instead of a value.","solutions":["Open GitHub Settings > Developer settings > GitHub Apps > your app, and copy the numeric 'App ID'","Set spec.appID in the GithubAppConfig (authconfigs/githubapp) to that number string","Validate the value parses before saving: kubectl get authconfigs githubapp -o jsonpath='{.appID}' and strconv-check it"],"exampleFix":"# before (authconfigs githubapp)\nspec:\n  appID: rancher-auth\n\n# after\nspec:\n  appID: \"401234\"","handlingStrategy":"validation","validationCode":"// Validate before the API call (e.g. in config save / admission path)\nif _, err := strconv.ParseInt(strings.TrimSpace(config.AppID), 10, 64); err != nil {\n    return fmt.Errorf(\"appID must be the numeric GitHub App ID (from Developer settings), got %q: %w\", config.AppID, err)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Add numeric-only validation on the appID field in the UI/helm chart","Copy the App ID from the GitHub App settings header, not the client ID","Use server-side dry-run when applying authconfigs via GitOps"],"tags":["config","validation","github-app"],"backgroundTag":null,"analyzedSha":"932558d4e68565aff2d2f36e89ec4a391b06e7c5","analyzedAt":"2026-08-16T04:37:02.125Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}