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

Null QueueUrl when using LocalStack #3319

Closed
yvedeng opened this issue May 15, 2024 · 3 comments
Closed

Null QueueUrl when using LocalStack #3319

yvedeng opened this issue May 15, 2024 · 3 comments
Labels
bug This issue is a bug. needs-review response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Comments

@yvedeng
Copy link

yvedeng commented May 15, 2024

Describe the bug

It seems like a bug in the latest version. I am using TestContainers.Localstack for my functional tests. They started to complain once I upgraded the SQS package to the latest version.

The QueueUrl property from the CreateQueueResponse returns null even when the queue has been successfully created.

The same goes for the GetQueueUrlAsync method.

AWSSDK.SQS 3.7.200.17 works fine.

Expected Behavior

A proper queue URL should be returned.

Current Behavior

The QueueURL is always null

Reproduction Steps

var queue = await _sqsClient.CreateQueueAsync(_queueName);
Assert.NotNull(queue.QueueUrl);
Assert.NotEmpty(queue.QueueUrl);

var queueUrl = await _sqsClient.GetQueueUrlAsync(_queueName);
Assert.NotNull(queueUrl);
Assert.NotEmpty(queueUrl);

Possible Solution

No response

Additional Information/Context

No response

AWS .NET SDK and/or Package version used

AWSSDK.SQS 3.7.300.87

Targeted .NET Platform

.NET 8

Operating System and version

Windows 10

@yvedeng yvedeng added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels May 15, 2024
@dscpinheiro dscpinheiro changed the title Returns null QueueUrl Null QueueUrl when using LocalStack May 15, 2024
@dscpinheiro
Copy link
Contributor

What version of LocalStack are you using? This has come up a couple times before, SQS recently changed their protocol to JSON (announcement blog post). On a previous discussion (#3114), our recommendation was to update to a newer LocalStack version but on their repo I see a feature request created just a few hours ago: localstack/localstack#10821

This entry in the SQS FAQ may also be helpful here:

What if I am already on the latest AWS SDK version, but my open sourced solution does not support JSON?

You must change your SDK version to the version previous to what you are using. See How do I get started with AWS JSON protocols for Amazon SQS? for more infomation. AWS SDK versions listed in How do I get started with AWS JSON protocols for Amazon SQS? uses JSON wire protocol for Amazon SQS APIs. If you change your AWS SDK to the previous version, your Amazon SQS APIs will use the AWS query.

@dscpinheiro dscpinheiro added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. needs-review and removed needs-triage This issue or PR still needs to be triaged. labels May 15, 2024
@yvedeng
Copy link
Author

yvedeng commented May 15, 2024

Thanks for the explanation!

Just realized how outdated the localstack NuGet package is. I am using the latest Testcontainers.LocalStack NuGet 3.8.0 which was from 2019.

This explains a lot.

@yvedeng yvedeng closed this as completed May 15, 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
bug This issue is a bug. needs-review response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Projects
None yet
Development

No branches or pull requests

2 participants