dotnet / dotnet/Docker.DotNet

Docker.DotNet fails to pull images with Docker Desktop 4.13.0

Open
#595 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
2.4k
Forks
416
PR merge metrics
No merged PRs in 30d

Description

**Output of `dotnet --info`:**

```
.NET SDK (reflecting any global.json):
Version: 6.0.402
Commit: 6862418796

Runtime Environment:
OS Name: Windows
OS Version: 10.0.19044
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\6.0.402\

global.json file:
Not found

Host:
Version: 6.0.10
Architecture: x64
Commit: 5a400c212a

.NET SDKs installed:
6.0.402 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.10 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.10 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Download .NET:
https://aka.ms/dotnet-download

Learn about .NET Runtimes and SDKs:
https://aka.ms/dotnet/runtimes-sdk-info
```

**What version of Docker.DotNet?:**

```
3.125.12
```

**Steps to reproduce the issue:**

```csharp
// Given
var dockerClient = new DockerClientConfiguration().CreateClient();

// When
var pullImageTask = dockerClient.Images.CreateImageAsync(new ImagesCreateParameters { FromImage = "mysql:8.0.28" }, new AuthConfig(), null);

var exception = await Record.ExceptionAsync(() => pullImageTask)
.ConfigureAwait(false);

// Then
Assert.Null(exception);
```

**What actually happened?:**

```
Xunit.Sdk.NullException
Assert.Null() Failure
Expected: (null)
Actual: Newtonsoft.Json.JsonReaderException: Error parsing undefined value. Path '', line 1, position 2.
at Newtonsoft.Json.JsonTextReader.MatchAndSetAsync(String value, JsonToken newToken, Object tokenValue, CancellationToken cancellationToken)
at Newtonsoft.Json.JsonTextReader.ParseValueAsync(CancellationToken cancellationToken)
at Docker.DotNet.Models.StreamUtil.MonitorStreamForMessagesAsync[T](Task`1 streamTask, DockerClient client, CancellationToken cancellationToken, IProgress`1 progress) in C:\Sources\GitHub\Docker.DotNet\src\Docker.DotNet\Endpoints\StreamUtil.cs:line 39
at Docker.DotNet.Models.StreamUtil.MonitorResponseForMessagesAsync[T](Task`1 responseTask, DockerClient client, CancellationToken cancel, IProgress`1 progress) in C:\Sources\GitHub\Docker.DotNet\src\Docker.DotNet\Endpoints\StreamUtil.cs:line 51
at Xunit.Record.ExceptionAsync(Func`1 testCode) in C:\Dev\xunit\xunit\src\xunit.core\Record.cs:line 76
at Docker.DotNet.Tests.GitHub.Issue634() in C:\Sources\GitHub\Docker.DotNet\test\Docker.DotNet.Tests\GitHub.cs:line 22
at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass48_1.<b__1>d.MoveNext() in C:\Dev\xunit\xunit\src\xunit.execution\Sdk\Frameworks\Runners\TestInvoker.cs:line 264
--- End of stack trace from previous location ---
at Xunit.Sdk.ExecutionTimer.AggregateAsync(Func`1 asyncAction) in C:\Dev\xunit\xunit\src\xunit.execution\Sdk\Frameworks\ExecutionTimer.cs:line 48
at Xunit.Sdk.ExceptionAggregator.RunAsync(Func`1 code) in C:\Dev\xunit\xunit\src\xunit.core\Sdk\ExceptionAggregator.cs:line 90
```

**What did you expect to happen?:**

- Docker.DotNet pulls the image.

**Additional information:**

\-

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.