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

Sometimes WSL cannot run this application correctly #5

Open
emidoots opened this issue May 26, 2019 · 2 comments
Open

Sometimes WSL cannot run this application correctly #5

emidoots opened this issue May 26, 2019 · 2 comments

Comments

@emidoots
Copy link
Contributor

emidoots commented May 26, 2019

Sometimes wasmserve does not work with WSL (Windows Subsystem for Linux), other times it does (depends on the specific program being served with wasmserve).

This is a bug in WSL and not wasmserve. I am filing this issue here for visibility so that if others run into the same problem, they know what the cause is. To fix, you can either not use WSL (which works) or try an insiders version of WSL (I haven't so I cannot confirm if that fixes it).

The issue appears as follows:

Chrome will report that it fails to fetch the wasm binary due to a content length mismatch:

(index):4 GET http://localhost:8080/main.wasm net::ERR_CONTENT_LENGTH_MISMATCH 200 (OK)

One such case where this is known to occur is in https://github.com/gopherjs/vecty (just install wasmserve under Ubuntu WSL, cd example/markdown && wasmserve).

OS details:

image

@dmitshur
Copy link

From evidence you’ve observed, can you know if this is definitely a bug in WSL, or is it still possible it’s some other root cause that happens to trigger on WSL?

@emidoots
Copy link
Contributor Author

emidoots commented May 4, 2020

Apologies for the delayed response, definitely a bug in WSL though. It is due to the way WSL reimplements Linux syscalls in a not-completely-compliant way in some cases (bugs in WSL). I think this may be solved in WSL 2 but I haven't tried it yet as it required special installation at the time I filed this issue.

Note there are many other bug reports on the WSL issue tracker like this of other applications written in Node.JS, and many other languages similarly being unable to run or having weird effects with socket code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants