net, net/http, net/http/httptest: HTTP GET on local HTTP server fails with "fetch failed" on js/wasm with Node.js 18 #57613
Labels
arch-wasm
WebAssembly issues
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
OS-JS
Milestone
Some Go packages use a local HTTP server in examples. To make these work, the js/wasm port includes:
go/src/net/net_fake.go
Line 5 in bae7d77
It works okay with Node.js 14, but fails with Node.js 18. Without it working, tests/examples in packages like compress/gzip and various others fail. This is the tracking issue this problem.
Tested at tip (79cdecc) with local patches to work around #56860 and #57516. Those issues will need to resolved first; I'm just reporting this finding earlier since I came across it while looking briefly into what's needed to make all.bash pass with Node 18.
It can be reproduced with
GOOS=js GOARCH=wasm ./all.bash
, orGOOS=js GOARCH=wasm go test -run='Example_compressingReader' compress/gzip
, or with this more standalone program:CC @golang/js, @golang/wasm, @johanbrandhorst.
The text was updated successfully, but these errors were encountered: