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

s3: Failed to deserialize ListObjectVersions LastModfied timestamp value deserialization failed #1387

Closed
kisscelia opened this issue Aug 20, 2021 · 6 comments · Fixed by aws/smithy-go#324
Labels
bug This issue is a bug. service-api This issue is due to a problem in a service API, not the SDK implementation.

Comments

@kisscelia
Copy link

kisscelia commented Aug 20, 2021

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

Describe the bug
Failed to deserialize ListObjectVersions response LastModified timestamp value.

Version of AWS SDK for Go?
github.com/aws/aws-sdk-go-v2 v1.8.0 // indirect
github.com/aws/aws-sdk-go-v2/config v1.6.0 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.3.2 // indirect
github.com/aws/aws-sdk-go-v2/service/s3 v1.12.0 // indirect

Version of Go (go version)?
1.16
To Reproduce (observed behavior)
I got an error, when i sent the ListObjectVersions request with aws-sdk-go-v2.
Error as follows:
image

but, no error via postman or awscli:
image
image

@kisscelia kisscelia added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Aug 20, 2021
@jasdel jasdel changed the title deserialization failed, failed to decode response body, unable to parse time string, parse errors s3: Failed to deserialize ListObjectVersions LastModfied timestamp value deserialization failed Aug 21, 2021
@kisscelia
Copy link
Author

Hi @jasdel , any solution to this issue?
Thanks.

@angad-z
Copy link

angad-z commented Aug 23, 2021

time.Parse(time.RFC3339Nano, val)

@jasdel jasdel added the service-api This issue is due to a problem in a service API, not the SDK implementation. label Aug 23, 2021
@jasdel
Copy link
Contributor

jasdel commented Aug 23, 2021

Thanks for reporting this issue @kisscelia. Looks like the service is responding with a timestamp format that the SDK is not expecting. We'll need to investigate this and correct the deserialization. It looks like the format coming back from the service doesn't match the pattern the SDK is using.

We should be able to add another pattern to match this value.

@jasdel jasdel removed the needs-triage This issue or PR still needs to be triaged. label Aug 23, 2021
jasdel added a commit to jasdel/smithy-go that referenced this issue Aug 24, 2021
Adds support for parsing DateTime timestamp formatted time similar to
RFC 3339, but without the `Z` character, nor UTC offset.

Fixes aws/aws-sdk-go-v2#1387
@jasdel
Copy link
Contributor

jasdel commented Aug 24, 2021

I've added a fix to aws/smithy-go#324 that will address this issue. once this change is reviewed, and merged in it will be included in the SDK's next release.

jasdel added a commit to jasdel/aws-sdk-go that referenced this issue Aug 24, 2021
…trailing Z

Adds support for parsing RFC 3339 timestamp but without the `Z` character, nor UTC offset.

Related to aws/aws-sdk-go-v2#1387
@kisscelia
Copy link
Author

OK, Thank you. I will try it in the next version.

jasdel added a commit to aws/aws-sdk-go that referenced this issue Aug 24, 2021
…trailing Z (#4072)

Adds support for parsing RFC 3339 timestamp but without the `Z` character, nor UTC offset.

Related to aws/aws-sdk-go-v2#1387
aws-sdk-go-automation pushed a commit to aws/aws-sdk-go that referenced this issue Aug 25, 2021
===

### Service Client Updates
* `service/datasync`: Updates service API and documentation
* `service/ec2`: Updates service API and documentation
  * Support added for IMDS IPv6 endpoint
* `service/eventbridge`: Updates service API and documentation
* `service/events`: Updates service API and documentation
  * AWS CWEvents adds an enum of EXTERNAL for EcsParameters LaunchType for PutTargets API
* `service/fms`: Updates service API and documentation

### SDK Bugs
* `private/protocol`: Add support for parsing RFC 3339 timestamp without trailing Z
  * Adds support for parsing RFC 3339 timestamp but without the `Z` character, nor UTC offset.
  * Related to [aws/aws-sdk-go-v2#1387](aws/aws-sdk-go-v2#1387)
aws-sdk-go-automation added a commit to aws/aws-sdk-go that referenced this issue Aug 25, 2021
Release v1.40.30 (2021-08-25)
===

### Service Client Updates
* `service/datasync`: Updates service API and documentation
* `service/ec2`: Updates service API and documentation
  * Support added for IMDS IPv6 endpoint
* `service/eventbridge`: Updates service API and documentation
* `service/events`: Updates service API and documentation
  * AWS CWEvents adds an enum of EXTERNAL for EcsParameters LaunchType for PutTargets API
* `service/fms`: Updates service API and documentation

### SDK Bugs
* `private/protocol`: Add support for parsing RFC 3339 timestamp without trailing Z
  * Adds support for parsing RFC 3339 timestamp but without the `Z` character, nor UTC offset.
  * Related to [aws/aws-sdk-go-v2#1387](aws/aws-sdk-go-v2#1387)
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

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. service-api This issue is due to a problem in a service API, not the SDK implementation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants