testcontainers-dotnet: InvalidOperationException `cannot hijack chunked ... stream` (Rancher Desktop, Docker Desktop 4.10.0)
Describe the bug Please see this bug reported by someone else in Docker DotNet: https://github.com/dotnet/Docker.DotNet/issues/554
My own response to this: https://github.com/dotnet/Docker.DotNet/issues/554#issuecomment-1064806276
To Reproduce Steps to reproduce the behavior:
- Use Rancher Desktop with WSL2 enabled and dockerd (moby)
- Run unit tests in dotnet-testcontainers solution (I am only focused on RabbitMq myself)
- Exception thrown
Expected behavior Unit test passes
Desktop (please complete the following information):
- Rancher Desktop (Windows install) v1.1.1
- Windows 10 with WSL2 Ubuntu
Workaround
- Use snapshot release
2.1.0-beta.2698157448 - Downgrade to Docker Desktop
4.9.x
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 5
- Comments: 28 (2 by maintainers)
Commits related to this issue
- fix(#431): Update Docker.DotNet — committed to testcontainers/testcontainers-dotnet by HofmeisterAn 2 years ago
- fix(#431): Update Docker.DotNet — committed to testcontainers/testcontainers-dotnet by HofmeisterAn 2 years ago
- Replace Dotnet.Testcontainers with TestContainers nuget package Former was deprecated and replaced by latter. Ran into issue detailed https://github.com/testcontainers/testcontainers-dotnet/issues/43... — committed to dlcs/protagonist by donaldgray a year ago
Quick update because I know a couple of devs waiting for a fix. We’re trying to contact the maintainers. If that somehow won’t work we’ll fork and fix it.
Same on Docker Desktop for Mac (4.10.0) it seems, downgrading to 4.9.1 makes the error go away.
I’ve emailed the @dotnet-foundation and asked if they can help us, or if I can get access to the repository. I prefer a fix in the upstream. A fork should be the last option.
Awesome 🥳 I’ll publish a release version later that day. Thanks for your response.
Just to update the group here – the maintainer responded and
Docker.Dotnethas a new release that includes @HofmeisterAn’s fix.So I think as soon as we get a new release of testcontainers-dotnet with the updated
Docker.Dotnetdependency, we should be good.I can confirm. It’s broken for Docker Desktop for Windows (4.10.0) too. We need a fix in https://github.com/dotnet/Docker.DotNet/issues/554.
@HofmeisterAn just coming across this. I also reached out to the .NET Foundation Maintainers committee on the Discord & Slack to see if pinging there might help move it along.
In a way, I’m relieved – was testing Testcontainers for the first time (LOVE the idea!) and thought I’d done something wrong 😅
Getting this bug as well after updating to 4.10.