smogcloud icon indicating copy to clipboard operation
smogcloud copied to clipboard

Nill pointer exception

Open sh1n0b1 opened this issue 4 years ago • 2 comments

Description of Bug

Nil pointer exception occurs when the API is not available.

Steps to Reproduce

Run the tool and a nil pointer exception occurs when the API is not available.

Additional context

MacOS

Relevant screenshots

...omitted for brevity...
}UnauthorizedException: API is not available in eu-west-3
AccessDeniedException:
{
  RespMetadata: {
    StatusCode: 400,
    RequestID: "9fc00462-5b47-4418-b975-911898757a0a"
  }
}
AccessDeniedException:
{
  RespMetadata: {
    StatusCode: 400,
    RequestID: "94d14317-895d-4666-b9b1-950a365eb358"
  }
}
UnauthorizedException: API is not available in eu-north-1
{

}panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1450128]

goroutine 20 [running]:
github.com/BishopFox/smogcloud/service.GetRoute53(0xc00011e000, 0x1573312, 0x6, 0xc0000a9020)
        /Users/sh1n0b1/go/src/github.com/BishopFox/smogcloud/service/route53.go:48 +0x628
created by main.main
        /Users/sh1n0b1/go/src/github.com/BishopFox/smogcloud/main.go:19 +0x1de

sh1n0b1 avatar Apr 20 '20 22:04 sh1n0b1

It might had something to do with the DNS I was using that cause some of the host couldn't resolve. After changing the DNS I was able to run it without any problem.

sh1n0b1 avatar Apr 21 '20 18:04 sh1n0b1

The same happened to me, but couldn't fix it yet.

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x14847ec]

goroutine 390 [running]:
github.com/BishopFox/smogcloud/service.GetElasticBeanstalk(0xc00000c1e0, 0x15a16f5, 0x9, 0xc00000f180)
	/Users/felipe/go/src/github.com/BishopFox/smogcloud/service/elasticbeanstalk.go:27 +0x30c
created by main.main
	/Users/felipe/Workspace/projects/smogcloud/main.go:33 +0x495
exit status 2

felipeolifre avatar Aug 18 '20 14:08 felipeolifre