Skip to content

Sometimes WSL cannot run this application correctly #5

@emidoots

Description

@emidoots

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions