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

XML parsing Error when sending GetBucketLifecycleConfiguration operation in s3-sdk #1001

Closed
yossyX opened this issue Dec 11, 2023 · 4 comments
Labels
blocked Work is blocked on this issue for this codebase. Other labels or comments may indicate why. bug This issue is a bug. p2 This is a standard priority issue service-api This issue is due to a problem in a service API, not the SDK implementation.

Comments

@yossyX
Copy link

yossyX commented Dec 11, 2023

Describe the bug

An error occurred while executing get_bucket_lifecycle_configuration.

Expected Behavior

The following rusoto_s3 code works fine.

let result = client
    .get_bucket_lifecycle_configuration(GetBucketLifecycleConfigurationRequest {
        bucket: "bucket_name".to_string(),
        expected_bucket_owner: None,
    })
    .await?;

Current Behavior

The following error is output.

service error

Caused by:
    0: unhandled error
    1: error parsing XML: expected union, got nothing

Reproduction Steps

let builder = aws_sdk_s3::config::Builder::from(&sdk_config);
let client = Client::from_conf(builder.force_path_style(true).build());
let result = client
    .get_bucket_lifecycle_configuration()
    .bucket("bucket_name")
    .send()
    .await?;

The force_path_style is set with reference to #730, but the result is the same whether it is used or not.
The client confirms that uploads and downloads are successful and AmazonS3FullAccess is set.

Possible Solution

No response

Additional Information/Context

No response

Version

├── aws-config v1.0.3
│   ├── aws-credential-types v1.0.3
│   │   ├── aws-smithy-async v1.0.3
│   │   ├── aws-smithy-runtime-api v1.0.3
│   │   │   ├── aws-smithy-async v1.0.3 (*)
│   │   │   ├── aws-smithy-types v1.0.3
│   │   ├── aws-smithy-types v1.0.3 (*)
│   ├── aws-http v0.60.0
│   │   ├── aws-smithy-runtime-api v1.0.3 (*)
│   │   ├── aws-smithy-types v1.0.3 (*)
│   │   ├── aws-types v1.0.3
│   │   │   ├── aws-credential-types v1.0.3 (*)
│   │   │   ├── aws-smithy-async v1.0.3 (*)
│   │   │   ├── aws-smithy-runtime-api v1.0.3 (*)
│   │   │   ├── aws-smithy-types v1.0.3 (*)
│   ├── aws-runtime v1.0.3
│   │   ├── aws-credential-types v1.0.3 (*)
│   │   ├── aws-http v0.60.0 (*)
│   │   ├── aws-sigv4 v1.0.3
│   │   │   ├── aws-credential-types v1.0.3 (*)
│   │   │   ├── aws-smithy-eventstream v0.60.0
│   │   │   │   ├── aws-smithy-types v1.0.3 (*)
│   │   │   ├── aws-smithy-http v0.60.0
│   │   │   │   ├── aws-smithy-eventstream v0.60.0 (*)
│   │   │   │   ├── aws-smithy-runtime-api v1.0.3 (*)
│   │   │   │   ├── aws-smithy-types v1.0.3 (*)
│   │   │   ├── aws-smithy-runtime-api v1.0.3 (*)
│   │   │   ├── aws-smithy-types v1.0.3 (*)
│   │   ├── aws-smithy-async v1.0.3 (*)
│   │   ├── aws-smithy-eventstream v0.60.0 (*)
│   │   ├── aws-smithy-http v0.60.0 (*)
│   │   ├── aws-smithy-runtime-api v1.0.3 (*)
│   │   ├── aws-smithy-types v1.0.3 (*)
│   │   ├── aws-types v1.0.3 (*)
│   ├── aws-sdk-sso v1.4.0
│   │   ├── aws-credential-types v1.0.3 (*)
│   │   ├── aws-http v0.60.0 (*)
│   │   ├── aws-runtime v1.0.3 (*)
│   │   ├── aws-smithy-async v1.0.3 (*)
│   │   ├── aws-smithy-http v0.60.0 (*)
│   │   ├── aws-smithy-json v0.60.0
│   │   │   └── aws-smithy-types v1.0.3 (*)
│   │   ├── aws-smithy-runtime v1.0.3
│   │   │   ├── aws-smithy-async v1.0.3 (*)
│   │   │   ├── aws-smithy-http v0.60.0 (*)
│   │   │   ├── aws-smithy-runtime-api v1.0.3 (*)
│   │   │   ├── aws-smithy-types v1.0.3 (*)
│   │   ├── aws-smithy-runtime-api v1.0.3 (*)
│   │   ├── aws-smithy-types v1.0.3 (*)
│   │   ├── aws-types v1.0.3 (*)
│   ├── aws-sdk-ssooidc v1.4.0
│   │   ├── aws-credential-types v1.0.3 (*)
│   │   ├── aws-http v0.60.0 (*)
│   │   ├── aws-runtime v1.0.3 (*)
│   │   ├── aws-smithy-async v1.0.3 (*)
│   │   ├── aws-smithy-http v0.60.0 (*)
│   │   ├── aws-smithy-json v0.60.0 (*)
│   │   ├── aws-smithy-runtime v1.0.3 (*)
│   │   ├── aws-smithy-runtime-api v1.0.3 (*)
│   │   ├── aws-smithy-types v1.0.3 (*)
│   │   ├── aws-types v1.0.3 (*)
│   ├── aws-sdk-sts v1.4.0
│   │   ├── aws-credential-types v1.0.3 (*)
│   │   ├── aws-http v0.60.0 (*)
│   │   ├── aws-runtime v1.0.3 (*)
│   │   ├── aws-smithy-async v1.0.3 (*)
│   │   ├── aws-smithy-http v0.60.0 (*)
│   │   ├── aws-smithy-json v0.60.0 (*)
│   │   ├── aws-smithy-query v0.60.0
│   │   │   ├── aws-smithy-types v1.0.3 (*)
│   │   ├── aws-smithy-runtime v1.0.3 (*)
│   │   ├── aws-smithy-runtime-api v1.0.3 (*)
│   │   ├── aws-smithy-types v1.0.3 (*)
│   │   ├── aws-smithy-xml v0.60.0
│   │   ├── aws-types v1.0.3 (*)
│   ├── aws-smithy-async v1.0.3 (*)
│   ├── aws-smithy-http v0.60.0 (*)
│   ├── aws-smithy-json v0.60.0 (*)
│   ├── aws-smithy-runtime v1.0.3 (*)
│   ├── aws-smithy-runtime-api v1.0.3 (*)
│   ├── aws-smithy-types v1.0.3 (*)
│   ├── aws-types v1.0.3 (*)
├── aws-sdk-s3 v1.5.0
│   ├── aws-credential-types v1.0.3 (*)
│   ├── aws-http v0.60.0 (*)
│   ├── aws-runtime v1.0.3 (*)
│   ├── aws-sigv4 v1.0.3 (*)
│   ├── aws-smithy-async v1.0.3 (*)
│   ├── aws-smithy-checksums v0.60.0
│   │   ├── aws-smithy-http v0.60.0 (*)
│   │   ├── aws-smithy-types v1.0.3 (*)
│   ├── aws-smithy-eventstream v0.60.0 (*)
│   ├── aws-smithy-http v0.60.0 (*)
│   ├── aws-smithy-json v0.60.0 (*)
│   ├── aws-smithy-runtime v1.0.3 (*)
│   ├── aws-smithy-runtime-api v1.0.3 (*)
│   ├── aws-smithy-types v1.0.3 (*)
│   ├── aws-smithy-xml v0.60.0 (*)
│   ├── aws-types v1.0.3 (*)

Environment details (OS name and version, etc.)

Linux

Logs

No response

@yossyX yossyX added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Dec 11, 2023
@rcoh rcoh self-assigned this Dec 11, 2023
@rcoh
Copy link
Contributor

rcoh commented Dec 11, 2023

Can you send the full error? (It will include the raw XML response). This appears to be a bug deserializing an internal component of the response related to your specific configuration. I wasn't able to reproduce this by playing around with a few different lifecycle configurations

@rcoh rcoh added response-requested Waiting on additional info and feedback. Will move to 'closing-soon' in 7 days. and removed needs-triage This issue or PR still needs to be triaged. labels Dec 11, 2023
@yossyX
Copy link
Author

yossyX commented Dec 12, 2023

@rcoh
Thank you for the prompt response. I have provided detailed output below. The contents of "_private" have been masked.

ServiceError(ServiceError { source: Unhandled(Unhandled { source: XmlDecodeError { kind: Custom("expected union, got nothing") }, meta: ErrorMetadata { code: None, message: None, extras: None } }), raw: Response { status: StatusCode(200), headers: Headers { headers: {"x-amz-id-2": HeaderValue { _private: "-------------" }, "x-amz-request-id": HeaderValue { _private: "-------------" }, "date": HeaderValue { _private: "Tue, 12 Dec 2023 01:30:37 GMT" }, "server": HeaderValue { _private: "AmazonS3" }, "content-length": HeaderValue { _private: "233" }} }, body: SdkBody { inner: Once(Some(b"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<LifecycleConfiguration xmlns=\"http://s3.amazonaws.com/doc/2006-03-01/\"><Rule><ID>aa</ID><Filter/><Status>Enabled</Status><Expiration><Days>30</Days></Expiration></Rule></LifecycleConfiguration>")), retryable: true }, extensions: Extensions } })

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to 'closing-soon' in 7 days. label Dec 12, 2023
@rcoh
Copy link
Contributor

rcoh commented Dec 13, 2023

Turns out this is an upstream S3 issue: aws/aws-sdk-go-v2#2874

Fixing it will either require making a breaking change to the S3 client or adding some custom behavior. We'll get back to you on where we end up.

@rcoh rcoh added service-api This issue is due to a problem in a service API, not the SDK implementation. p2 This is a standard priority issue labels Dec 13, 2023
@rcoh rcoh added the blocked Work is blocked on this issue for this codebase. Other labels or comments may indicate why. label Jan 11, 2024
@jmklix jmklix unassigned rcoh Aug 30, 2024
@jmklix jmklix closed this as completed Aug 30, 2024
Copy link

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
blocked Work is blocked on this issue for this codebase. Other labels or comments may indicate why. bug This issue is a bug. p2 This is a standard priority issue service-api This issue is due to a problem in a service API, not the SDK implementation.
Projects
None yet
Development

No branches or pull requests

3 participants