{"record":{"id":"b75234ad81bd0744","repo":"rancher/rancher","slug":"parsing-github-app-id-w","errorCode":null,"errorMessage":"parsing GitHub App ID: %w","messagePattern":"parsing GitHub App ID: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/auth/providers/githubapp/githubapp_provider.go","lineNumber":444,"sourceCode":"\tprivateKeyName, err := common.CreateOrUpdateSecrets(g.secrets, privateKeyInfo, privateKeyField, strings.ToLower(config.Type))\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tconfig.PrivateKey = privateKeyName\n\n\t_, err = g.authConfigs.ObjectClient().Update(config.ObjectMeta.Name, config)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\nfunc getAppDataWithConfig(ctx context.Context, config *apiv3.GithubAppConfig) (*gitHubAppData, error) {\n\tappID, err := strconv.ParseInt(config.AppID, 10, 64)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"parsing GitHub App ID: %w\", err)\n\t}\n\n\tvar installationID int64\n\tif config.InstallationID != \"\" {\n\t\ti, err := strconv.ParseInt(config.InstallationID, 10, 64)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"parsing GitHub installation ID: %w\", err)\n\t\t}\n\t\tinstallationID = i\n\t}\n\n\treturn getDataForApp(ctx, appID, []byte(config.PrivateKey), installationID, getAPIURL(\"\", config))\n}\n\nfunc chooseClientID(host string, sourceConfig *apiv3.GithubAppConfig) *apiv3.GithubAppConfig {\n\tif host == \"\" {\n\t\treturn sourceConfig\n\t}","sourceCodeStart":426,"sourceCodeEnd":462,"githubUrl":"https://github.com/rancher/rancher/blob/932558d4e68565aff2d2f36e89ec4a391b06e7c5/pkg/auth/providers/githubapp/githubapp_provider.go#L426-L462","documentation":"Same misconfiguration as the client-side 'parsing AppID' error, but thrown from the provider path (getAppDataWithConfig) when Rancher tries to fetch GitHub App data: config.AppID is not parseable as a base-10 int64. The saved GithubAppConfig contains a non-numeric app ID.","triggerScenarios":"AppID empty, set to the app name, or set to the client ID (Iv1./Ov23 prefix) instead of the numeric App ID; copy-paste artifacts (spaces, quotes) in the field.","commonSituations":"Config saved through kubectl/helm bypassing UI validation; confusion between App ID and Client ID in GitHub Developer settings.","solutions":["Copy the numeric App ID from GitHub Settings > Developer settings > GitHub Apps","Update spec.appID in the GithubAppConfig and save (this also triggers a data refetch)","Add upstream UI/client-side numeric validation so it cannot be saved again"],"exampleFix":"# before\nappID: my-rancher-app\n\n# after\nappID: \"401234\"","handlingStrategy":"validation","validationCode":"if _, err := strconv.ParseInt(strings.TrimSpace(config.AppID), 10, 64); err != nil {\n    return fmt.Errorf(\"refusing to fetch app data: appID %q is not the numeric GitHub App ID: %w\", config.AppID, err)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate appID at config-save time so the provider never sees it","Copy IDs from Developer settings, never retype them","Add UI numeric validation for the GitHub App form"],"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"}