-
Notifications
You must be signed in to change notification settings - Fork 19
Description
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/[email protected]/logger.go:352
github.com/sirupsen/logrus.(*Logger).IsLevelEnabled(...)
/home/lf/go/pkg/mod/github.com/sirupsen/[email protected]/logger.go:374
github.com/sirupsen/logrus.(*Logger).Logf(0x0, 0x5, 0x7c1ce4, 0x14, 0xc0001abcd8, 0x1, 0x1)
/home/lf/go/pkg/mod/github.com/sirupsen/[email protected]/logger.go:149 +0x26
github.com/sirupsen/logrus.(*Logger).Debugf(...)
/home/lf/go/pkg/mod/github.com/sirupsen/[email protected]/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/[email protected]/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/[email protected]/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.