question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

InvalidOperationException `cannot hijack chunked ... stream` (Rancher Desktop, Docker Desktop 4.10.0)

See original GitHub issue

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:

  1. Use Rancher Desktop with WSL2 enabled and dockerd (moby)
  2. Run unit tests in dotnet-testcontainers solution (I am only focused on RabbitMq myself)
  3. 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

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:5
  • Comments:28 (2 by maintainers)

github_iconTop GitHub Comments

10reactions
HofmeisterAncommented, Jul 12, 2022

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.

7reactions
databrechtcommented, Jul 6, 2022

Same on Docker Desktop for Mac (4.10.0) it seems, downgrading to 4.9.1 makes the error go away.

System.AggregateException : One or more errors occurred. (cannot hijack chunked or content length stream) (cannot hijack chunked or content length stream)
---- System.InvalidOperationException : cannot hijack chunked or content length stream
---- System.InvalidOperationException : cannot hijack chunked or content length stream
 Stack Trace:
----- Inner Stack Trace #1 (System.InvalidOperationException) -----
  at [Microsoft.Net](http://microsoft.net/).Http.Client.HttpConnectionResponseContent.HijackStream()
  at Docker.DotNet.DockerClient.MakeRequestForHijackedStreamAsync(IEnumerable`1 errorHandlers, HttpMethod method, String path, IQueryString queryString, IRequestContent body, IDictionary`2 headers, TimeSpan timeout, CancellationToken cancellationToken)
  at Docker.DotNet.ContainerOperations.AttachContainerAsync(String id, Boolean tty, ContainerAttachParameters parameters, CancellationToken cancellationToken)
  at DotNet.Testcontainers.Clients.DockerContainerOperations.AttachAsync(String id, IOutputConsumer outputConsumer, CancellationToken ct)
  at DotNet.Testcontainers.Containers.Modules.TestcontainersContainer.Start(String id, CancellationToken ct)
  at DotNet.Testcontainers.Containers.Modules.TestcontainersContainer.StartAsync(CancellationToken ct)```
Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting Tips
This page provides tips to troubleshoot issues you may have with Rancher Desktop.
Read more >
Docker and Rancher Desktop in windows
I like the user interface from Docker Desktop when I want to see what containers are running, cpu/ram usage and logging and so...
Read more >
> For personal use I found it great and lighter than Docker ...
I user Rancher Desktop on an i9 with 32gb of RAM. Starts in less than a minute. I also have Teams and slack....
Read more >
Rancher Desktop | Lightweight Kubernetes Development ...
Experience a streamlined Kubernetes development workflow with Rancher Desktop, a tool that provides a lightweight, single-node Kubernetes cluster on your ...
Read more >
Replacing Docker Desktop with Rancher Desktop
It looks like I have a problem! I have already set up kubectl and kubernetes on this system. Rancher Desktop will attempt to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found