rancher/rancher · error
parsing AppID: %w
Error message
parsing AppID: %w
What it means
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.
Source
Thrown at pkg/auth/providers/githubapp/githubapp_client.go:330
}
return getDataForApp(ctx, appID, []byte(config.PrivateKey), installationID, getAPIURL("", config))
}
// TODO: Move this into a method on the struct and cache!
func getInstallationClientFromConfig(ctx context.Context, config *apiv3.GithubAppConfig) (*github.Client, error) {
appID, installationID, err := getInstallationAndAppIDFromConfig(config)
if err != nil {
return nil, err
}
return getInstallationClient(ctx, appID, []byte(config.PrivateKey), installationID, getAPIURL("", config))
}
func getInstallationAndAppIDFromConfig(config *apiv3.GithubAppConfig) (int64, int64, error) {
appID, err := strconv.ParseInt(config.AppID, 10, 64)
if err != nil {
return 0, 0, fmt.Errorf("parsing AppID: %w", err)
}
var installationID int64
if config.InstallationID != "" {
parsed, err := strconv.ParseInt(config.InstallationID, 10, 64)
if err != nil {
return 0, 0, fmt.Errorf("parsing InstallationID: %w", err)
}
installationID = parsed
}
return appID, installationID, nil
}
View on GitHub (pinned to 932558d4e6)
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
Example fix
# before (authconfigs githubapp) spec: appID: rancher-auth # after spec: appID: "401234"
Defensive patterns
Strategy: validation
Validate before calling
// Validate before the API call (e.g. in config save / admission path)
if _, err := strconv.ParseInt(strings.TrimSpace(config.AppID), 10, 64); err != nil {
return fmt.Errorf("appID must be the numeric GitHub App ID (from Developer settings), got %q: %w", config.AppID, err)
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- parsing InstallationID: %w
- parsing GitHub App ID: %w
- parsing GitHub installation ID: %w
- could not create token authority url: %w
- creating MS Graph client: %w
AI-assisted analysis of rancher/rancher@932558d4e6 (2026-08-16).
Data as JSON: /api/errors/45fc911d0b5058ae.
Report an issue: GitHub.