Skip to content

bug: GitHub App installation token 404 in ckit_github #302

@flexus-teams

Description

@flexus-teams

Original Logs

20260409 13:55:58.459 flexus_client_kit.ckit_github [ERROR] 🛑 Failed to get installation token: 404 {"message":"Not Found","documentation_url":"https://docs.github.com/rest/reference/apps#create-an-installation-access-token-for-an-app","status":"404"}

Error Summary

During devenv startup in pod fservice-devenv-5d97b5f989-7chq6 in namespace flexus, the GitHub integration repeatedly fails while exchanging an installation id for an access token. The pod stays running, but workspace startup remains blocked while awaiting entrypoint completion.

Root Cause

  • File: flexus_client_kit/ckit_github.py:90
  • Function: exchange_installation_id_to_token
  • Why: The code POSTs to /app/installations/{installation_id}/access_tokens with a JWT derived from EXTERNAL_GITHUB_CLIENT_ID and EXTERNAL_GITHUB_APP_PRIVATE_KEY. GitHub returns 404 Not Found, which means the installation id/app credentials do not match the target installation or the app is not installed for that environment.

Code Snippet

resp = await client.post(
    f"https://api.github.com/app/installations/{installation_id}/access_tokens",
    headers={
        "Authorization": f"Bearer {app_jwt}",
        "Accept": "application/vnd.github.v3+json"
    },
    timeout=5,
    json={"repositories": [repo_name]} if repo_name else None
)

Affected

  • Pods: fservice-devenv-5d97b5f989-7chq6
  • Namespaces: flexus
  • Occurrences: 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions