dfinity / motoko

Simple high-level language for writing Internet Computer canisters
Apache License 2.0
517 stars 97 forks source link

Motoko test suite runner (web site) doesn't work #2214

Open osa1 opened 3 years ago

osa1 commented 3 years ago

On chrome:

Screenshot_2020-12-29_15-53-29

On Firefox:

Screenshot_2020-12-29_15-55-16

Both get stuck in "Loading .wasm..." stage.

nomeata commented 3 years ago

Did you build the .wasm by running run.sh or make first?

nomeata commented 3 years ago

Ah, incorrect mime type. I guess our /etc/mimetypes or whatever differ (on the phone right now). I think I once saw a way to tell the python webserver about new mime types. Can look into it next week if nobody beats me to it

nomeata commented 3 years ago

Here I get this content type:

~/dfinity/motoko/test $ curl -s -I http://0.0.0.0:8000/run/_out/empty.wasm|grep Content-type
Content-type: application/wasm

Can you confirm that you get a different one?

I assume this is because of this setting on my system:

~/dfinity/motoko/test $ grep wasm /etc/mime.types 
application/wasm                                wasm

Does your /etc/mime.types have that entry? Does it work if you addit?

crusso commented 3 years ago

Strangely, I just encountered the same error though I was able to use this just fine before, without editing etc/mime.types. Could it be a nix issue?

nomeata commented 3 years ago

Maybe, or a system upgrade or something.

We could fix this once and forall by writing a 5-line python script that runs the webserver with that mimetype configured, and use that instead of python -m http-server.