emscripten-core / emscripten-core/emscripten
hello_world.c - runtime cannot show the page properly
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
I created a simple hello_world.c and used the following to compile:
emcc hello_world.c -o hello_world.html
produced the following files
1. hello_world.html
2. hello_world.js
3. hello_world.wasm
When i launch hello_world.html in a https server (implemented using libwebsockets), i get the following errors in the page developer tools:
1. failed to load resource : the server responded with a status of 415 () : hello_world.wasm:1
2. wasm streaming compile failed: type error: failed to execute 'compile' on 'WebAssembly': HTTP status code is not ok; instantiateAsync @ hello_world.js:720
3. falling back to ArrayBuffer instantiation : hellow_work.js:721
4. Failed to load resource: the server responded with a status of 415() hello_world.js:721
failed to asynchronously prepare wasm: both async and sync fetcing of the wasm failed : hellow_world.js 691
I already installed the web plugin that disable CSP checking. If not, i get another error:
Refused to apply inline style because it violates the following Content Security Policy directive: "style-src 'self'. Either the 'unsafe-inline' keywoard, a hash or a nonce is required to enable inline execution.
I tried on both Chrome and edge browsers.
Thinking that it might be due to the websockets HTTPS server issue, i tried
Contributor guide
Assessment
This issue has not been assessed yet.