Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetEnvironmentById - error #176

Open
lukaszfedorko opened this issue Oct 12, 2022 · 0 comments
Open

GetEnvironmentById - error #176

lukaszfedorko opened this issue Oct 12, 2022 · 0 comments

Comments

@lukaszfedorko
Copy link

Hi,
I'm passing existing applicationId and environmentId to:

env, err := client.ConfigAsCodeClient.GetEnvironmentById(applicationId, environmentId)

and getting below error:

panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x2c pc=0x6b9366]
goroutine 6 [running]:
testing.tRunner.func1.1(0x754ec0, 0xa6ab70)
/usr/local/go/src/testing/testing.go:988 +0x30d
testing.tRunner.func1(0xc00009c900)
/usr/local/go/src/testing/testing.go:991 +0x3f9
panic(0x754ec0, 0xa6ab70)
/usr/local/go/src/runtime/panic.go:969 +0x166
github.com/sirupsen/logrus.(*Logger).level(...)
/home/lf/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/logger.go:352
github.com/sirupsen/logrus.(*Logger).IsLevelEnabled(...)
/home/lf/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/logger.go:374
github.com/sirupsen/logrus.(*Logger).Logf(0x0, 0x5, 0x7c1ce4, 0x14, 0xc0001abcd8, 0x1, 0x1)
/home/lf/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/logger.go:149 +0x26
github.com/sirupsen/logrus.(*Logger).Debugf(...)
/home/lf/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/logger.go:161
github.com/harness/harness-go-sdk/harness/cd.(*ConfigAsCodeClient).FindObjectById(0xc0000c2400, 0x7c29a5, 0x16, 0x7c29fd, 0x16, 0x757060, 0xc00014eb40, 0x73a400, 0x530000c0001d80f0)
/home/lf/go/pkg/mod/github.com/harness/harness-go-sdk@v0.2.5/harness/cd/cac.go:371 +0xd2
github.com/harness/harness-go-sdk/harness/cd.(*ConfigAsCodeClient).GetEnvironmentById(0xc0000c2400, 0x7c29a5, 0x16, 0x7c29fd, 0x16, 0xc0001d8100, 0xc0001abe00, 0x1)
/home/lf/go/pkg/mod/github.com/harness/harness-go-sdk@v0.2.5/harness/cd/cac_environment.go:75 +0x115

Client is able to connect to Harness.io (checked with a different method and I can retrieve ApplicationId for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant