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

[browser] FetchError: request failed, reason: Parse Error: Invalid header value char #82880

Open
pavelsavara opened this issue Mar 2, 2023 · 7 comments
Labels
arch-wasm WebAssembly architecture area-System.Runtime.InteropServices.JavaScript disabled-test The test is disabled in source code against the issue in-pr There is an active PR which will close this issue when it is merged
Milestone

Comments

@pavelsavara
Copy link
Member

Log Build

This is NodeJS on linux

[FAIL] System.Net.Http.Functional.Tests.SocketsHttpHandler_HttpClientHandlerTest.GetAsync_ManyDifferentResponseHeaders_ParsedCorrectly(newline: "\n", fold: "", dribble: False)
[00:19:13] info: System.Net.Http.HttpRequestException : FetchError: request to http://127.0.0.1:39305/ failed, reason: Parse Error: Invalid header value char
[00:19:13] info: ---- System.Runtime.InteropServices.JavaScript.JSException : FetchError: request to http://127.0.0.1:39305/ failed, reason: Parse Error: Invalid header value char
[00:19:13] info:    at System.Net.Http.BrowserHttpInterop.<CancelationHelper>d__13`1[[System.Runtime.InteropServices.JavaScript.JSObject, System.Runtime.InteropServices.JavaScript, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext()
[00:19:13] info:    at System.Net.Http.BrowserHttpHandler.CallFetch(HttpRequestMessage request, CancellationToken cancellationToken, Nullable`1 allowAutoRedirect)
[00:19:13] info:    at System.Net.Http.BrowserHttpHandler.<SendAsync>g__Impl|55_0(HttpRequestMessage request, CancellationToken cancellationToken, Nullable`1 allowAutoRedirect)
[00:19:13] info:    at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
[00:19:13] info:    at System.Net.Http.Functional.Tests.HttpClientHandlerTest.<>c__DisplayClass21_0.<<GetAsync_ManyDifferentResponseHeaders_ParsedCorrectly>b__0>d.MoveNext()
[00:19:13] info: --- End of stack trace from previous location ---
[00:19:13] info:    at System.Threading.Tasks.TaskTimeoutExtensions.GetRealException(Task task)
[00:19:13] info: --- End of stack trace from previous location ---
[00:19:13] info:    at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks)
[00:19:13] info:    at System.Net.Test.Common.LoopbackServer.<>c__DisplayClass15_0.<<CreateClientAndServerAsync>b__0>d.MoveNext()
[00:19:13] info: --- End of stack trace from previous location ---
[00:19:13] info:    at System.Net.Test.Common.LoopbackServer.CreateServerAsync(Func`2 funcAsync, Options options)
[00:19:13] info:    at System.Net.Http.Functional.Tests.HttpClientHandlerTest.GetAsync_ManyDifferentResponseHeaders_ParsedCorrectly(String newline, String fold, Boolean dribble)
[00:19:13] info: --- End of stack trace from previous location ---
[00:19:13] info: ----- Inner Stack Trace -----
[00:19:13] info:    at System.Net.Http.BrowserHttpInterop.<CancelationHelper>d__13`1[[System.Runtime.InteropServices.JavaScript.JSObject, System.Runtime.InteropServices.JavaScript, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext()
[00:19:13] info:     at ClientRequest.<anonymous> (/root/helix/work/workitem/e/node_modules/node-fetch/lib/index.js:1491:11)
[00:19:13] info:     at ClientRequest.emit (node:events:513:28)
[00:19:13] info:     at Socket.socketOnData (node:_http_client:543:9)
[00:19:13] info:     at Socket.emit (node:events:513:28)
[00:19:13] info:     at addChunk (node:internal/streams/readable:315:12)
[00:19:13] info:     at readableAddChunk (node:internal/streams/readable:289:9)
[00:19:13] info:     at Socket.Readable.push (node:internal/streams/readable:228:10)
[00:19:13] info:     at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
@ghost
Copy link

ghost commented Mar 2, 2023

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

Issue Details

Log Build

This is NodeJS on linux

[FAIL] System.Net.Http.Functional.Tests.SocketsHttpHandler_HttpClientHandlerTest.GetAsync_ManyDifferentResponseHeaders_ParsedCorrectly(newline: "\n", fold: "", dribble: False)
[00:19:13] info: System.Net.Http.HttpRequestException : FetchError: request to http://127.0.0.1:39305/ failed, reason: Parse Error: Invalid header value char
[00:19:13] info: ---- System.Runtime.InteropServices.JavaScript.JSException : FetchError: request to http://127.0.0.1:39305/ failed, reason: Parse Error: Invalid header value char
[00:19:13] info:    at System.Net.Http.BrowserHttpInterop.<CancelationHelper>d__13`1[[System.Runtime.InteropServices.JavaScript.JSObject, System.Runtime.InteropServices.JavaScript, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext()
[00:19:13] info:    at System.Net.Http.BrowserHttpHandler.CallFetch(HttpRequestMessage request, CancellationToken cancellationToken, Nullable`1 allowAutoRedirect)
[00:19:13] info:    at System.Net.Http.BrowserHttpHandler.<SendAsync>g__Impl|55_0(HttpRequestMessage request, CancellationToken cancellationToken, Nullable`1 allowAutoRedirect)
[00:19:13] info:    at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
[00:19:13] info:    at System.Net.Http.Functional.Tests.HttpClientHandlerTest.<>c__DisplayClass21_0.<<GetAsync_ManyDifferentResponseHeaders_ParsedCorrectly>b__0>d.MoveNext()
[00:19:13] info: --- End of stack trace from previous location ---
[00:19:13] info:    at System.Threading.Tasks.TaskTimeoutExtensions.GetRealException(Task task)
[00:19:13] info: --- End of stack trace from previous location ---
[00:19:13] info:    at System.Threading.Tasks.TaskTimeoutExtensions.WhenAllOrAnyFailed(Task[] tasks)
[00:19:13] info:    at System.Net.Test.Common.LoopbackServer.<>c__DisplayClass15_0.<<CreateClientAndServerAsync>b__0>d.MoveNext()
[00:19:13] info: --- End of stack trace from previous location ---
[00:19:13] info:    at System.Net.Test.Common.LoopbackServer.CreateServerAsync(Func`2 funcAsync, Options options)
[00:19:13] info:    at System.Net.Http.Functional.Tests.HttpClientHandlerTest.GetAsync_ManyDifferentResponseHeaders_ParsedCorrectly(String newline, String fold, Boolean dribble)
[00:19:13] info: --- End of stack trace from previous location ---
[00:19:13] info: ----- Inner Stack Trace -----
[00:19:13] info:    at System.Net.Http.BrowserHttpInterop.<CancelationHelper>d__13`1[[System.Runtime.InteropServices.JavaScript.JSObject, System.Runtime.InteropServices.JavaScript, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext()
[00:19:13] info:     at ClientRequest.<anonymous> (/root/helix/work/workitem/e/node_modules/node-fetch/lib/index.js:1491:11)
[00:19:13] info:     at ClientRequest.emit (node:events:513:28)
[00:19:13] info:     at Socket.socketOnData (node:_http_client:543:9)
[00:19:13] info:     at Socket.emit (node:events:513:28)
[00:19:13] info:     at addChunk (node:internal/streams/readable:315:12)
[00:19:13] info:     at readableAddChunk (node:internal/streams/readable:289:9)
[00:19:13] info:     at Socket.Readable.push (node:internal/streams/readable:228:10)
[00:19:13] info:     at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
Author: pavelsavara
Assignees: -
Labels:

arch-wasm, area-System.Runtime.InteropServices.JavaScript

Milestone: 8.0.0

@pavelsavara
Copy link
Member Author

cc @maraf

@maraf
Copy link
Member

maraf commented Mar 3, 2023

It's Linux specific, reproducible only on v16.19, on v17 it works.

@maraf
Copy link
Member

maraf commented Jul 26, 2023

Node v16 is almost EOL https://endoflife.date/nodejs. The error doesn't reproduce in v17

@maraf maraf closed this as completed Jul 26, 2023
@maraf maraf reopened this Jul 26, 2023
@maraf
Copy link
Member

maraf commented Jul 26, 2023

We still have node 16.19, I would like to enable the test when we upgrade

@maraf maraf modified the milestones: 8.0.0, 9.0.0 Jul 26, 2023
@ilonatommy
Copy link
Member

Currently we have v18.17.1 log, I can't repro locally, unblocking

@dotnet-policy-service dotnet-policy-service bot added the in-pr There is an active PR which will close this issue when it is merged label Jun 25, 2024
@ilonatommy
Copy link
Member

Reproduced on CI: log

[15:43:38] info: Using js engine NodeJS from path /usr/bin/node
[15:43:38] info: v18.17.1

@pavelsavara pavelsavara modified the milestones: 9.0.0, 10.0.0 Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-wasm WebAssembly architecture area-System.Runtime.InteropServices.JavaScript disabled-test The test is disabled in source code against the issue in-pr There is an active PR which will close this issue when it is merged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants