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

unexpected panics instead of errors in >=v0.25.0 #832

Closed
3 tasks done
jcarter3 opened this issue Oct 19, 2020 · 1 comment · Fixed by #837
Closed
3 tasks done

unexpected panics instead of errors in >=v0.25.0 #832

jcarter3 opened this issue Oct 19, 2020 · 1 comment · Fixed by #837
Labels
bug This issue is a bug.

Comments

@jcarter3
Copy link

Confirm by changing [ ] to [x] below to ensure that it's a bug:

Describe the bug
Getting a panic when listing backup vault access policies.

panic: interface conversion: json.Token is nil, not string

goroutine 15 [running]:
github.com/aws/aws-sdk-go-v2/aws/protocol/restjson.GetErrorInfo(0xc002a54160, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/home/jcarter/go/pkg/mod/github.com/aws/[email protected]/aws/protocol/restjson/decoder_util.go:53 +0x557
github.com/aws/aws-sdk-go-v2/service/backup.awsRestjson1_deserializeOpErrorGetBackupVaultAccessPolicy(0xc000697b70, 0xc0006cf0d0, 0xc005206330, 0x6291200)
	/home/jcarter/go/pkg/mod/github.com/aws/aws-sdk-go-v2/service/[email protected]/deserializers.go:3855 +0x3e8
github.com/aws/aws-sdk-go-v2/service/backup.(*awsRestjson1_deserializeOpGetBackupVaultAccessPolicy).HandleDeserialize(0x8693380, 0x6d917a0, 0xc005206330, 0x6291200, 0xc0051c3e40, 0x6bc12e0, 0xc002d80040, 0x0, 0xc00321dc00, 0x40, ...)
	/home/jcarter/go/pkg/mod/github.com/aws/aws-sdk-go-v2/service/[email protected]/deserializers.go:3798 +0x935
github.com/awslabs/smithy-go/middleware.decoratedDeserializeHandler.HandleDeserialize(...)
	/home/jcarter/go/pkg/mod/github.com/awslabs/[email protected]/middleware/step_deserialize.go:201
github.com/aws/aws-sdk-go-v2/aws/middleware.(*requestIDRetrieverMiddleware).HandleDeserialize(0x8693380, 0x6d917a0, 0xc005206330, 0x6291200, 0xc0051c3e40, 0x6bc12e0, 0xc002d80060, 0x7157b72d4f04763b, 0xc00003c290, 0x71000000000000fd, ...)
	/home/jcarter/go/pkg/mod/github.com/aws/[email protected]/aws/middleware/request_id_retriever.go:28 +0x89
github.com/awslabs/smithy-go/middleware.decoratedDeserializeHandler.HandleDeserialize(...)
	/home/jcarter/go/pkg/mod/github.com/awslabs/[email protected]/middleware/step_deserialize.go:201
github.com/aws/aws-sdk-go-v2/aws/transport/http.(*errorWrapperMiddleware).HandleDeserialize(0x8693380, 0x6d917a0, 0xc005206330, 0x6291200, 0xc0051c3e40, 0x6bc12e0, 0xc002d80080, 0xc00321dc80, 0xc003320bd8, 0xc001110400, ...)
	/home/jcarter/go/pkg/mod/github.com/aws/[email protected]/aws/transport/http/response_error_middleware.go:30 +0x7d
github.com/awslabs/smithy-go/middleware.decoratedDeserializeHandler.HandleDeserialize(...)
	/home/jcarter/go/pkg/mod/github.com/awslabs/[email protected]/middleware/step_deserialize.go:201
github.com/awslabs/smithy-go/transport/http.(*closeResponseBodyMiddleware).HandleDeserialize(0x8693380, 0x6d917a0, 0xc005206330, 0x6291200, 0xc0051c3e40, 0x6bc12e0, 0xc002d800a0, 0x203000, 0x0, 0x8, ...)
	/home/jcarter/go/pkg/mod/github.com/awslabs/[email protected]/transport/http/middleware_close_response_body.go:57 +0x7d
github.com/awslabs/smithy-go/middleware.decoratedDeserializeHandler.HandleDeserialize(...)
	/home/jcarter/go/pkg/mod/github.com/awslabs/[email protected]/middleware/step_deserialize.go:201
github.com/awslabs/smithy-go/transport/http.(*errorCloseResponseBodyMiddleware).HandleDeserialize(0x8693380, 0x6d917a0, 0xc005206330, 0x6291200, 0xc0051c3e40, 0x6bc12e0, 0xc002d800c0, 0x40ccec, 0x60c7d40, 0xc002d80100, ...)
	/home/jcarter/go/pkg/mod/github.com/awslabs/[email protected]/transport/http/middleware_close_response_body.go:28 +0x7d
github.com/awslabs/smithy-go/middleware.decoratedDeserializeHandler.HandleDeserialize(...)
	/home/jcarter/go/pkg/mod/github.com/awslabs/[email protected]/middleware/step_deserialize.go:201
github.com/awslabs/smithy-go/middleware.(*DeserializeStep).HandleMiddleware(0xc003320c58, 0x6d917a0, 0xc005206330, 0x6291200, 0xc0051c3e40, 0x6bc1400, 0xc0009b1e90, 0x37, 0x0, 0x0, ...)
	/home/jcarter/go/pkg/mod/github.com/awslabs/[email protected]/middleware/step_deserialize.go:120 +0x1ca
github.com/awslabs/smithy-go/middleware.decoratedHandler.Handle(...)
	/home/jcarter/go/pkg/mod/github.com/awslabs/[email protected]/middleware/middleware.go:57
github.com/awslabs/smithy-go/middleware.finalizeWrapHandler.HandleFinalize(...)
	/home/jcarter/go/pkg/mod/github.com/awslabs/[email protected]/middleware/step_finalize.go:179
github.com/aws/aws-sdk-go-v2/aws/signer/v4.(*SignHTTPRequestMiddleware).HandleFinalize(0xc0023afae0, 0x6d917a0, 0xc005206330, 0x6291200, 0xc0051c3e40, 0x6bc13a0, 0xc00003c190, 0xf26165c031930e3d, 0xc0006cf978, 0xc004095650, ...)
	/home/jcarter/go/pkg/mod/github.com/aws/[email protected]/aws/signer/v4/middleware.go:227 +0x655
github.com/awslabs/smithy-go/middleware.decoratedFinalizeHandler.HandleFinalize(...)
	/home/jcarter/go/pkg/mod/github.com/awslabs/[email protected]/middleware/step_finalize.go:195
github.com/aws/aws-sdk-go-v2/aws/retry.MetricsHeaderMiddleware.HandleFinalize(0x6d917a0, 0xc005206330, 0x6291200, 0xc0051c3e40, 0x6bc1300, 0xc0023afea0, 0xc000181400, 0x7f0d20edbe98, 0x0, 0x7f0ce8080958, ...)
	/home/jcarter/go/pkg/mod/github.com/aws/[email protected]/aws/retry/middleware.go:165 +0x493
github.com/awslabs/smithy-go/middleware.decoratedFinalizeHandler.HandleFinalize(...)
	/home/jcarter/go/pkg/mod/github.com/awslabs/[email protected]/middleware/step_finalize.go:195
github.com/aws/aws-sdk-go-v2/aws/retry.AttemptMiddleware.HandleFinalize(0x6d928a0, 0xc0041d3290, 0x6389c78, 0x6d917a0, 0xc005206120, 0x6291200, 0xc0051c3dc0, 0x6bc1300, 0xc0023afec0, 0x20, ...)
	/home/jcarter/go/pkg/mod/github.com/aws/[email protected]/aws/retry/middleware.go:79 +0x349
github.com/awslabs/smithy-go/middleware.decoratedFinalizeHandler.HandleFinalize(...)
	/home/jcarter/go/pkg/mod/github.com/awslabs/[email protected]/middleware/step_finalize.go:195
github.com/awslabs/smithy-go/middleware.(*FinalizeStep).HandleMiddleware(0xc003320c50, 0x6d917a0, 0xc005206120, 0x6291200, 0xc0051c3dc0, 0x6bc1320, 0xc0023afc00, 0x5e9cbb, 0xc000181400, 0x7f0d20edbe98, ...)
	/home/jcarter/go/pkg/mod/github.com/awslabs/[email protected]/middleware/step_finalize.go:114 +0x1b7
github.com/awslabs/smithy-go/middleware.decoratedHandler.Handle(...)
	/home/jcarter/go/pkg/mod/github.com/awslabs/[email protected]/middleware/middleware.go:57
github.com/awslabs/smithy-go/middleware.buildWrapHandler.HandleBuild(...)
	/home/jcarter/go/pkg/mod/github.com/awslabs/[email protected]/middleware/step_build.go:177
github.com/aws/aws-sdk-go-v2/aws/middleware.(*requestUserAgent).HandleBuild(0xc003320c70, 0x6d917a0, 0xc005206120, 0x6291200, 0xc0051c3dc0, 0x6bc12a0, 0xc00003c140, 0x56a486, 0x61a4640, 0xc005206120, ...)
	/home/jcarter/go/pkg/mod/github.com/aws/[email protected]/aws/middleware/user_agent.go:117 +0x202
github.com/awslabs/smithy-go/middleware.decoratedBuildHandler.HandleBuild(...)
	/home/jcarter/go/pkg/mod/github.com/awslabs/[email protected]/middleware/step_build.go:193
github.com/aws/aws-sdk-go-v2/aws/signer/v4.(*computePayloadSHA256Middleware).HandleBuild(0x8693380, 0x6d917a0, 0xc0045e1fb0, 0x6291200, 0xc0051c3dc0, 0x6bc12c0, 0xc0023afe20, 0xc0006d0290, 0xc0006d0308, 0x40f110, ...)
	/home/jcarter/go/pkg/mod/github.com/aws/[email protected]/aws/signer/v4/middleware.go:147 +0x279
github.com/awslabs/smithy-go/middleware.decoratedBuildHandler.HandleBuild(...)
	/home/jcarter/go/pkg/mod/github.com/awslabs/[email protected]/middleware/step_build.go:193
github.com/awslabs/smithy-go/transport/http.(*ContentLengthMiddleware).HandleBuild(0x8693380, 0x6d917a0, 0xc0045e1fb0, 0x6291200, 0xc0051c3dc0, 0x6bc12c0, 0xc0023afe40, 0xe7184b8aeb9e51b8, 0x0, 0xd178e22a830230bb, ...)
	/home/jcarter/go/pkg/mod/github.com/awslabs/[email protected]/transport/http/middleware_content_length.go:49 +0x172
github.com/awslabs/smithy-go/middleware.decoratedBuildHandler.HandleBuild(...)
	/home/jcarter/go/pkg/mod/github.com/awslabs/[email protected]/middleware/step_build.go:193
github.com/aws/aws-sdk-go-v2/aws/middleware.RequestInvocationIDMiddleware.HandleBuild(0x6d917a0, 0xc0045e1fb0, 0x6291200, 0xc0051c3dc0, 0x6bc12c0, 0xc0023afe60, 0x20, 0xc0023afe80, 0x7f0ce8628f00, 0xc005379320, ...)
	/home/jcarter/go/pkg/mod/github.com/aws/[email protected]/aws/middleware/middleware.go:42 +0x1ed
github.com/awslabs/smithy-go/middleware.decoratedBuildHandler.HandleBuild(...)
	/home/jcarter/go/pkg/mod/github.com/awslabs/[email protected]/middleware/step_build.go:193
github.com/awslabs/smithy-go/middleware.(*BuildStep).HandleMiddleware(0xc003320c48, 0x6d917a0, 0xc0045e1fb0, 0x6291200, 0xc0051c3dc0, 0x6bc1320, 0xc0023afc20, 0x6160d20, 0xc0052060c0, 0x62cd812, ...)
	/home/jcarter/go/pkg/mod/github.com/awslabs/[email protected]/middleware/step_build.go:112 +0x1b7
github.com/awslabs/smithy-go/middleware.decoratedHandler.Handle(...)
	/home/jcarter/go/pkg/mod/github.com/awslabs/[email protected]/middleware/middleware.go:57
github.com/awslabs/smithy-go/middleware.serializeWrapHandler.HandleSerialize(...)
	/home/jcarter/go/pkg/mod/github.com/awslabs/[email protected]/middleware/step_serialize.go:187
github.com/aws/aws-sdk-go-v2/service/backup.(*awsRestjson1_serializeOpGetBackupVaultAccessPolicy).HandleSerialize(0x8693380, 0x6d917a0, 0xc0045e1fb0, 0x5a536c0, 0xc003320c38, 0x6291200, 0xc0051c3dc0, 0x6bc13e0, 0xc00003c110, 0x56a486, ...)
	/home/jcarter/go/pkg/mod/github.com/aws/aws-sdk-go-v2/service/[email protected]/serializers.go:1577 +0x418
github.com/awslabs/smithy-go/middleware.decoratedSerializeHandler.HandleSerialize(...)
	/home/jcarter/go/pkg/mod/github.com/awslabs/[email protected]/middleware/step_serialize.go:203
github.com/aws/aws-sdk-go-v2/service/backup.(*ResolveEndpoint).HandleSerialize(0xc0023afa60, 0x6d917a0, 0xc0045e1f50, 0x5a536c0, 0xc003320c38, 0x6291200, 0xc0051c3dc0, 0x6bc1360, 0xc0023afda0, 0x73b6a5, ...)
	/home/jcarter/go/pkg/mod/github.com/aws/aws-sdk-go-v2/service/[email protected]/endpoints.go:89 +0x3fa
github.com/awslabs/smithy-go/middleware.decoratedSerializeHandler.HandleSerialize(...)
	/home/jcarter/go/pkg/mod/github.com/awslabs/[email protected]/middleware/step_serialize.go:203
github.com/awslabs/smithy-go/middleware.(*SerializeStep).HandleMiddleware(0xc0009b1cc0, 0x6d917a0, 0xc0045e1f50, 0x5a536c0, 0xc003320c38, 0x6bc1320, 0xc0023afc40, 0x581d795, 0x3, 0x203001, ...)
	/home/jcarter/go/pkg/mod/github.com/awslabs/[email protected]/middleware/step_serialize.go:122 +0x1fb
github.com/awslabs/smithy-go/middleware.decoratedHandler.Handle(...)
	/home/jcarter/go/pkg/mod/github.com/awslabs/[email protected]/middleware/middleware.go:57
github.com/awslabs/smithy-go/middleware.initializeWrapHandler.HandleInitialize(...)
	/home/jcarter/go/pkg/mod/github.com/awslabs/[email protected]/middleware/step_initialize.go:179
github.com/aws/aws-sdk-go-v2/service/backup.(*validateOpGetBackupVaultAccessPolicy).HandleInitialize(0x8693380, 0x6d917a0, 0xc0045e1f50, 0x5a536c0, 0xc003320c38, 0x6bc13c0, 0xc0009b1ec0, 0x56a486, 0x61a4640, 0xc0045e1f50, ...)
	/home/jcarter/go/pkg/mod/github.com/aws/aws-sdk-go-v2/service/[email protected]/validators.go:430 +0xdb
github.com/awslabs/smithy-go/middleware.decoratedInitializeHandler.HandleInitialize(...)
	/home/jcarter/go/pkg/mod/github.com/awslabs/[email protected]/middleware/step_initialize.go:195
github.com/aws/aws-sdk-go-v2/aws/middleware.RegisterServiceMetadata.HandleInitialize(0x62bd913, 0x6, 0x62bdfcd, 0x6, 0xc0002f79f0, 0x9, 0x630404f, 0x1a, 0x6d91720, 0xc0002280e0, ...)
	/home/jcarter/go/pkg/mod/github.com/aws/[email protected]/aws/middleware/metadata.go:39 +0xe7
github.com/awslabs/smithy-go/middleware.decoratedInitializeHandler.HandleInitialize(...)
	/home/jcarter/go/pkg/mod/github.com/awslabs/[email protected]/middleware/step_initialize.go:195
github.com/awslabs/smithy-go/middleware.(*InitializeStep).HandleMiddleware(0xc003320c40, 0x6d91720, 0xc0002280e0, 0x5a536c0, 0xc003320c38, 0x6bc1320, 0xc0023afc60, 0x0, 0x6bc1320, 0xc0023afc60, ...)
	/home/jcarter/go/pkg/mod/github.com/awslabs/[email protected]/middleware/step_initialize.go:114 +0x1b7
github.com/awslabs/smithy-go/middleware.decoratedHandler.Handle(...)
	/home/jcarter/go/pkg/mod/github.com/awslabs/[email protected]/middleware/middleware.go:57
github.com/awslabs/smithy-go/middleware.(*Stack).HandleMiddleware(0xc0051c3c80, 0x6d91720, 0xc0002280e0, 0x5a536c0, 0xc003320c38, 0x6bc1400, 0xc0009b1e90, 0x0, 0x6bc1400, 0xc0009b1e90, ...)
	/home/jcarter/go/pkg/mod/github.com/awslabs/[email protected]/middleware/stack.go:109 +0x151
github.com/awslabs/smithy-go/middleware.decoratedHandler.Handle(...)
	/home/jcarter/go/pkg/mod/github.com/awslabs/[email protected]/middleware/middleware.go:57
github.com/aws/aws-sdk-go-v2/service/backup.(*Client).invokeOperation(0xc002720080, 0x6d91720, 0xc0002280e0, 0x630404f, 0x1a, 0x5a536c0, 0xc003320c38, 0x0, 0x0, 0x0, ...)
	/home/jcarter/go/pkg/mod/github.com/aws/aws-sdk-go-v2/service/[email protected]/api_client.go:113 +0x76d
github.com/aws/aws-sdk-go-v2/service/backup.(*Client).GetBackupVaultAccessPolicy(0xc002720080, 0x6d91720, 0xc0002280e0, 0xc003320c38, 0x0, 0x0, 0x0, 0xc0006d1560, 0x5b17c00, 0xc0009b1880)
	/home/jcarter/go/pkg/mod/github.com/aws/aws-sdk-go-v2/service/[email protected]/api_op_GetBackupVaultAccessPolicy.go:20 +0xfb
github.com/trek10inc/awsets/lister.AWSBackupVault.List.func1(0x0, 0x60a41a0, 0x6232701, 0xc0035bb9e0)

Version of AWS SDK for Go?
v0.27.0

Version of Go (go version)?
go version go1.15.2 linux/amd64

To Reproduce (observed behavior)
call GetBackupVaultAccessPolicy on vault with no policy
Code: https://github.com/trek10inc/awsets/blob/master/lister/backup_vault.go#L45
Expected behavior
A returned error, not a panic. In v0.24.0 and earlier, this was the case. Now it is a panic.

@jcarter3 jcarter3 added the bug This issue is a bug. label Oct 19, 2020
@skmcgrail
Copy link
Member

skmcgrail commented Oct 19, 2020

@jcarter3 thank you for reporting this bug, we will work on getting this fixed and included in our next release.

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

Successfully merging a pull request may close this issue.

2 participants