cooperspencer / gickup

https://cooperspencer.github.io/gickup-documentation/
Apache License 2.0
988 stars 38 forks source link

runtime error: invalid memory address or nil pointer dereference #47

Closed pew closed 2 years ago

pew commented 2 years ago

With the release of v.0.9.8 I'm getting this error after gickup grabbed the list of my GitHub repos:

gickup-runner-1  | panic: runtime error: invalid memory address or nil pointer dereference
gickup-runner-1  | [signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x8e5ab4]
gickup-runner-1  |
gickup-runner-1  | goroutine 1 [running]:
gickup-runner-1  | main.Backup({0xc0002e6000, 0xa4, 0x0}, 0xc000136640)
gickup-runner-1  |      /go/src/github.com/cooperspencer/gickup/main.go:62 +0x2b4
gickup-runner-1  | main.RunBackup(0xc000136640)
gickup-runner-1  |      /go/src/github.com/cooperspencer/gickup/main.go:92 +0x45
gickup-runner-1  | main.main()
gickup-runner-1  |      /go/src/github.com/cooperspencer/gickup/main.go:147 +0x71f
gickup-runner-1 exited with code 2

It works just fine when I'm using the 0.9.7 Docker tag. Anything else I can provide to debug this?

cooperspencer commented 2 years ago

I implemented a substitution for ~and that caused a problem in the docker image. Apparently there is a problem in docker when it tries to get the user. This behavior is fixed in v0.9.8-1

pew commented 2 years ago

Thanks! Pulled the latest image, GitHub works fine. However, it does crash with GitLab now:

gickup-runner-1  | panic: runtime error: invalid memory address or nil pointer dereference
gickup-runner-1  | [signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x760ffa]
gickup-runner-1  |
gickup-runner-1  | goroutine 1 [running]:
gickup-runner-1  | gickup/gitlab.Get(0xc000136640)
gickup-runner-1  |      /go/src/github.com/cooperspencer/gickup/gitlab/gitlab.go:152 +0x123a
gickup-runner-1  | main.RunBackup(0xc000136640)
gickup-runner-1  |      /go/src/github.com/cooperspencer/gickup/main.go:131 +0x86
gickup-runner-1  | main.main()
gickup-runner-1  |      /go/src/github.com/cooperspencer/gickup/main.go:175 +0x71f
gickup-runner-1 exited with code 2
cooperspencer commented 2 years ago

I will have a look. I think I already know what the issue is. Be back in a bit

cooperspencer commented 2 years ago

I got the problem. Group Projects do not return an owner in gitlab...

cooperspencer commented 2 years ago

pushed a new release for the hotfix in the gitlab groups. Thanks for bringing it to my attention.

cooperspencer commented 2 years ago

the new containers are now online with tag 0.9.8-2

pew commented 2 years ago

the new containers are now online with tag 0.9.8-2

Thank you! Works perfectly now 👍

cooperspencer commented 2 years ago

Thanks for testing it