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

[wasm][HTTP] TypeError: Failed to execute 'fetch' on 'Window': Request with GET/HEAD method cannot have body #53591

Closed
pavelsavara opened this issue Jun 2, 2021 · 2 comments
Assignees
Milestone

Comments

@pavelsavara
Copy link
Member

pavelsavara commented Jun 2, 2021

This is behavior of underlying browser network component which makes sense. The open question is if we want to wrap the exception message.

Details

Failing tests System.Net.Http.Functional.Tests.HttpClientHandler_RemoteServerTest when executed on Wasm/Browser in Outerloop tests.

Methods

  • SendAsync_SendRequestUsingMethodToEchoServerWithContent_Success
  • SendAsync_SendRequestUsingNoBodyMethodToEchoServerWithContent_NoBodySent

Fails with

System.Net.Http.HttpRequestException : TypeError: Failed to execute 'fetch' on 'Window': Request with GET/HEAD method cannot have body.
   at System.Net.Http.BrowserHttpHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at System.Net.Http.Functional.Tests.HttpClientHandler_RemoteServerTest.SendAsync_SendRequestUsingMethodToEchoServerWithContent_Success(String method, Uri serverUri)
@pavelsavara pavelsavara added arch-wasm WebAssembly architecture area-System.Net.Http labels Jun 2, 2021
@ghost
Copy link

ghost commented Jun 2, 2021

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

Issue Details

Failing tests System.Net.Http.Functional.Tests.HttpClientHandler_RemoteServerTest when executed on Wasm/Browser in Outerloop tests.

Methods

  • SendAsync_SendRequestUsingMethodToEchoServerWithContent_Success
  • SendAsync_SendRequestUsingNoBodyMethodToEchoServerWithContent_NoBodySent

Fails with

System.Net.Http.HttpRequestException : TypeError: Failed to execute 'fetch' on 'Window': Request with GET/HEAD method cannot have body.
   at System.Net.Http.BrowserHttpHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at System.Net.Http.Functional.Tests.HttpClientHandler_RemoteServerTest.SendAsync_SendRequestUsingMethodToEchoServerWithContent_Success(String method, Uri serverUri)
Author: pavelsavara
Assignees: -
Labels:

arch-wasm, area-System.Net.Http

Milestone: -

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Jun 2, 2021
pavelsavara added a commit to pavelsavara/runtime that referenced this issue Jun 2, 2021
- disabled tests with dotnet#53591
- disabled tests with dotnet#53592
pavelsavara added a commit that referenced this issue Jun 2, 2021
- enable System.Net.Http.Functional.Tests on browser
- System.Net.Http.Functional.Tests to run in chrome instead of V8 via WasmTestOnBrowser
- ActiveIssue #34690 for WebSocket on Windows Mono
- fix Quic detection in test
- disable webSocket tests on Mono/Windows
- disable tests with MaxConnectionsPerServer not supported on Browser
- disable tests with Socket not supported on Browser
- disable tests with AutomaticDecompression not supported on Browser
- disable tests with UseProxy not supported on Browser
- disable tests with PreAuthenticate not supported on Browser
- disable tests with Credentials is not supported on Browser
- disable tests with Loopback server
- run outerloop on browser, rather than V8 only
- [ActiveIssue] #37669 for missing crypto MD5
- conditional tests with PlatformDetection.IsBrowserDomSupportedOrNotBrowser to allow System.Net.Http.Functional.Tests pass on V8
- disabled tests with #53018
- disabled tests with #53591
- disabled tests with #53592
@karelz karelz added this to the 6.0.0 milestone Jun 8, 2021
@karelz karelz removed the untriaged New issue has not been triaged by the area owner label Jun 8, 2021
@karelz
Copy link
Member

karelz commented Jun 8, 2021

@pavelsavara FYI: I marked it triaged on your behalf

pavelsavara added a commit to pavelsavara/runtime that referenced this issue Jun 8, 2021
- move tests to inner loop
- more granular ActiveIssue dotnet#53592 for lack of TRACE
- more granular ActiveIssue dotnet#53591 for content on GET/HEAD
- more granular ActiveIssue dotnet#53874 for HttpRequestMessage.Headers.Host
- more granular ActiveIssue dotnet#53872 for NPE on System.Net.Http.BrowserHttpHandler
- fix HTTP vs HTTPS test configuration `Http2SecureRemoteEchoServer`
- include echo middleware in xharness server
- include middleware in Helix correlation payload
pavelsavara added a commit that referenced this issue Jun 9, 2021
- move tests to inner loop
- include echo middleware in xharness server
- improve doc
- more granular ActiveIssue #53592 for lack of TRACE
- more granular ActiveIssue #53591 for content on GET/HEAD
- more granular ActiveIssue #53874 for HttpRequestMessage.Headers.Host
- more granular ActiveIssue #53872 for NPE on System.Net.Http.BrowserHttpHandler
- more granular ActiveIssue #53876
- include middleware in Helix correlation payload
@lewing lewing modified the milestones: 6.0.0, 7.0.0 Jun 18, 2021
@radical radical modified the milestones: 7.0.0, 8.0.0 Aug 11, 2022
@lewing lewing closed this as completed Jul 21, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Aug 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants