Skip to content

System.Net.Http.Json.Functional.Tests failing with "Expected: typeof(System.Threading.Tasks.TaskCanceledException)" #138194

Todo

Description

@jkotas
[06:05:37] info: Discovering: managed/System.Net.Http.Json.Functional.Tests.dll (method display = ClassAndMethod, method display options = None)
[06:05:38] info: Discovered:  managed/System.Net.Http.Json.Functional.Tests.dll (found 54 of 54 test cases)
[06:05:38] info: Starting:    managed/System.Net.Http.Json.Functional.Tests.dll
[06:05:43] info: [FAIL] System.Net.Http.Json.Functional.Tests.HttpClientJsonExtensionsTests.GetFromJsonAsAsyncEnumerable_EnforcesTimeout(slowHeaders: False)
[06:05:43] info: Assert.Throws() Failure: Exception type was not an exact match
[06:05:43] info: Expected: typeof(System.Threading.Tasks.TaskCanceledException)
[06:05:43] info: Actual:   typeof(System.Net.Http.HttpRequestException)

Build Information

Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1696511
Build error leg or test failing: System.Net.Http.Json.Functional.Tests.HttpClientJsonExtensionsTests.GetFromJsonAsAsyncEnumerable_EnforcesTimeout
Pull request: https://github.com/dotnet/runtime.git/pull/137922

Error Message

DO NOT USE JSON BELOW IF THIS IS A BUILD BREAK otherwise build analysis will allow pull requests to merge that break the build worse. For a build break, do not use this issue form. Make a regular new issue.

Fill the error message using step by step known issues guidance.

{
  "ErrorMessage": "",
  "ErrorPattern": ["System.Net.Http.Json.Functional.Tests","Expected.*TaskCanceledException"],
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1696511
Error message validated: [System.Net.Http.Json.Functional.Tests Expected.*TaskCanceledException]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 11/24/2026 8:18:41 AM UTC

Report

Build Repository Test Pull Request
1696511 dotnet/runtime System.Net.Http.Json.Functional.Tests.HttpClientJsonExtensionsTests.GetFromJsonAsAsyncEnumerable_EnforcesTimeout #137922

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 1 1

Activity

  1. added
    blocking-clean-ci
    Known Build Error
    on Nov 24, 2026
  2. added
    untriaged
    on Nov 24, 2026
  3. dotnet-policy-service commented on Nov 24, 2026

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @karelz, @dotnet/ncl
    See info in area-owners.md if you want to be subscribed.

  4. added
    arch-wasm
    on Nov 25, 2026
  5. dotnet-policy-service commented on Nov 25, 2026

    @dotnet-policy-service
    Contributor

    Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara
    See info in area-owners.md if you want to be subscribed.

  6. ManickaP commented on Nov 25, 2026

    @ManickaP
    Member

    Console log: https://helixr1107v0xdeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-pull-137922-merge-d1065a3cddd142319d/WasmTestOnWasmtime-CLR-ST-System.Net.Http.Json.Functional.Tests/1/console.a8456181.log?helixlogtype=result

    Extract:

    [06:05:30] info: Using wasm engine WasmTime from path /root/helix/work/correlation/wasmtime/wasmtime
    [06:05:30] info: wasmtime 49.0.1 (46c23a87d 2026-09-24)
    [06:05:30] info: 
    [06:05:30] info: Running /root/helix/work/correlation/wasmtime/wasmtime
    [06:05:37] info: Using threadless Xunit runner
    [06:05:37] info: Discovering: managed/System.Net.Http.Json.Functional.Tests.dll (method display = ClassAndMethod, method display options = None)
    [06:05:38] info: Discovered:  managed/System.Net.Http.Json.Functional.Tests.dll (found 54 of 54 test cases)
    [06:05:38] info: Starting:    managed/System.Net.Http.Json.Functional.Tests.dll
    [06:05:43] info: [FAIL] System.Net.Http.Json.Functional.Tests.HttpClientJsonExtensionsTests.GetFromJsonAsAsyncEnumerable_EnforcesTimeout(slowHeaders: False)
    [06:05:43] info: Assert.Throws() Failure: Exception type was not an exact match
    [06:05:43] info: Expected: typeof(System.Threading.Tasks.TaskCanceledException)
    [06:05:43] info: Actual:   typeof(System.Net.Http.HttpRequestException)
    [06:05:43] info: ---- System.Net.Http.HttpRequestException : HTTP_PROTOCOL_ERROR
    [06:05:43] info:    at System.Net.Http.Json.Functional.Tests.HttpClientJsonExtensionsTests.<>c__DisplayClass15_0.<<GetFromJsonAsAsyncEnumerable_EnforcesTimeout>b__0>d.MoveNext()
    [06:05:43] info: --- End of stack trace from previous location ---
    [06:05:43] info:    at System.Threading.Tasks.TaskTimeoutExtensions.GetRealException(Task task)
    [06:05:43] info: --- End of stack trace from previous location ---
    [06:05:43] info:    at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks)
    [06:05:43] info:    at System.Net.Test.Common.LoopbackServer.<>c__DisplayClass15_0.<<CreateClientAndServerAsync>b__0>d.MoveNext()
    [06:05:43] info: --- End of stack trace from previous location ---
    [06:05:43] info:    at System.Net.Test.Common.LoopbackServer.CreateServerAsync(Func`2 funcAsync, Options options)
    [06:05:43] info:    at System.Net.Http.Json.Functional.Tests.HttpClientJsonExtensionsTests.GetFromJsonAsAsyncEnumerable_EnforcesTimeout(Boolean slowHeaders)
    [06:05:43] info: --- End of stack trace from previous location ---
    [06:05:43] info: ----- Inner Stack Trace -----
    [06:05:43] info:    at System.Net.Http.WasiRequestWrapper.SendRequest(Task sendContentTask, CancellationToken cancellationToken)
    [06:05:43] info:    at System.Net.Http.WasiRequestWrapper.SendRequestAsync(HttpRequestMessage request, CancellationToken cancellationToken)
    [06:05:43] info:    at System.Net.Http.WasiHttpHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
    [06:05:43] info:    at System.Net.Http.HttpClient.<SendAsync>g__Core|87_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
    [06:05:43] info:    at System.Net.Http.Json.HttpClientJsonExtensions.<FromJsonStreamAsyncCore>g__Core|7_0[TValue](HttpClient client, Uri requestUri, JsonTypeInfo`1 jsonTypeInfo, CancellationToken cancellationToken)+MoveNext()
    [06:05:43] info:    at System.Net.Http.Json.HttpClientJsonExtensions.<FromJsonStreamAsyncCore>g__Core|7_0[TValue](HttpClient client, Uri requestUri, JsonTypeInfo`1 jsonTypeInfo, CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()
    [06:05:43] info:    at System.Net.Http.Json.Functional.Tests.HttpClientJsonExtensionsTests.<>c__DisplayClass15_1.<<GetFromJsonAsAsyncEnumerable_EnforcesTimeout>b__2>d.MoveNext()
    [06:05:43] info: --- End of stack trace from previous location ---
    [06:05:43] info:    at System.Net.Http.Json.Functional.Tests.HttpClientJsonExtensionsTests.<>c__DisplayClass15_1.<<GetFromJsonAsAsyncEnumerable_EnforcesTimeout>b__2>d.MoveNext()
    [06:05:43] info: --- End of stack trace from previous location ---
    [06:05:43] info: Finished:    managed/System.Net.Http.Json.Functional.Tests.dll
    [06:05:43] info: Received expected 34243 of /root/helix/work/workitem/uploads/xharness-output/testResults.xml
    [06:05:43] info: Finished writing 34243 bytes of RESULTXML
    [06:05:43] info: Xml file was written to the provided writer.
    [06:05:43] info: 
    [06:05:43] info: === TEST EXECUTION SUMMARY ===
    [06:05:43] info: Tests run: 90 Passed: 89 Inconclusive: 0 Failed: 1 Ignored: 0 Skipped: 0
    [06:05:43] info: 
    [06:05:43] info: Process wasmtime exited with 1
    [06:05:43] info: Waiting to flush log messages with a timeout of 120 secs ..
    [06:05:43] fail: Application has finished with exit code 1 but 0 was expected
    
  7. self-assigned this
    on Nov 25, 2026
  8. added this to the Future milestone on Nov 25, 2026
  9. removed
    untriaged
    on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Known Build Errorarch-wasmarea-System.Net.Httpblocking-clean-ci

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions