Skip to content

exception when trying to add or remove a repo #2063

@REBELinBLUE

Description

@REBELinBLUE

I was trying to add a repo to my digger install and just got a white page on the callback; so I tried to remove it and again got a white page, running v0.6.113

So I checked the logs

digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web [GIN] 2025/08/01 - 16:50:34 | 500 |     788.876µs |  80.208.218.141 | GET      "/github/callback?installation_id=XXXXXXX&setup_action=update"
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web 2025/08/01 16:50:34 [Recovery] 2025/08/01 - 16:50:34 panic recovered:
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web GET /github/callback?installation_id=61850236&setup_action=update HTTP/1.1
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web Host: digger.ci-cd.example.com
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web Accept-Encoding: gzip, deflate, br
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web Accept-Language: en-GB,en;q=0.9
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web Priority: u=0, i
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web Referer: https://github.com/
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web Sec-Fetch-Dest: document
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web Sec-Fetch-Mode: navigate
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web Sec-Fetch-Site: none
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.6 Safari/605.1.15
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web X-Forwarded-For: 80.208.218.141
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web X-Forwarded-Host: digger.ci-cd.example.com
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web X-Forwarded-Port: 443
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web X-Forwarded-Proto: https
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web X-Forwarded-Server: traefik-855c87f5d6-nn6vs
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web X-Real-Ip: 80.208.218.141
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web runtime error: index out of range [0] with length 0
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web /go/pkg/mod/github.com/getsentry/[email protected]/gin/sentrygin.go:116 (0x21cd639)
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web /usr/local/go/src/runtime/panic.go:787 (0x47def1)
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web /usr/local/go/src/runtime/panic.go:115 (0x4431f3)
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web /go/src/github.com/diggerhq/digger/backend/controllers/github.go:2417 (0x217d54e)
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web /go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:185 (0x21cd19d)
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web /go/pkg/mod/github.com/getsentry/[email protected]/gin/sentrygin.go:101 (0x21cd18b)
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web /go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:185 (0x1da6c0a)
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web /go/pkg/mod/github.com/gin-contrib/[email protected]/sessions.go:54 (0x21d2504)
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web /go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:185 (0x1da6c0a)
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web /go/pkg/mod/github.com/samber/[email protected]/middleware.go:137 (0x21d291b)
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web /go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:185 (0x1db498e)
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web /go/pkg/mod/github.com/gin-gonic/[email protected]/recovery.go:102 (0x1db497b)
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web /go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:185 (0x1db3ac4)
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web /go/pkg/mod/github.com/gin-gonic/[email protected]/logger.go:249 (0x1db3aab)
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web /go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:185 (0x1db2ed1)
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web /go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:633 (0x1db2960)
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web /go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:589 (0x1db2489)
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web /usr/local/go/src/net/http/server.go:3301 (0x7d534d)
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web /usr/local/go/src/net/http/server.go:2102 (0x7b3ea4)
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web /usr/local/go/src/runtime/asm_amd64.s:1700 (0x4863e0)

It looks like the error is here https://github.com/diggerhq/digger/blob/v0.6.113/backend/controllers/github.go#L2417C1-L2418C1 which sort of seems valid, as indeed there is no "code" parameter in the URL.

I noticed the URL contains setup_action=update so turned off Redirect on update in the app and of course I don't get an error anymore but naturally digger doesn't work for the repo I was adding as you then see in the log

digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web time=2025-08-01T17:00:49.894Z level=ERROR msg="Failed to get GitHub installation" installationId=61850236 repoFullName=example/infrastructure-aws-connect error="GithubAppInstallation with id= XXXX doesn't exist"
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web time=2025-08-01T17:00:49.894Z level=ERROR msg="Failed to create GitHub client" installationId= XXXX repoFullName=example/infrastructure-aws-connect error="Error getting installation: GithubAppInstallation with id= XXXX doesn't exist"
digger-orchestrator-digger-backend-web-56db54bffd-hzgmm web time=2025-08-01T17:00:49.894Z level=ERROR msg="Error getting GitHub service" installationId= XXXX repoFullName=example/infrastructure-aws-connect error="Error creating github app client: Error getting installation: GithubAppInstallation with id=XXXX doesn't exist"

I visited https://digger.ci-cd.example.com/github/setup to double check the original setup and setup_on_update is supposed to be true

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions