TorchCraft / TorchCraftAI

A platform that lets you build agents to learn to play StarCraft: Brood War.
https://torchcraft.github.io/TorchCraftAI
MIT License
650 stars 123 forks source link

Unable to load replay with CherryVis #10

Closed bmnielsen closed 5 years ago

bmnielsen commented 5 years ago

I have managed to build and run CherryVis, both on my local machine and in a Docker container, but in both cases I am not able to load a replay. When I click on the replay file, it writes "fetching : OK" in the status bar, but nothing else happens.

To aid in reproducibility, I've uploaded a repo with my Docker setup here: https://github.com/bmnielsen/cherryvis-docker

So the full reproduction steps are:

  1. git clone https://github.com/bmnielsen/cherryvis-docker
  2. cd cherryvis-docker
  3. docker build -t cvis .
  4. docker run -p 8770:8770 -it cvis
  5. Open localhost:8770 in a browser (I'm using Chrome on Windows 10)
  6. Select the MPQ files
  7. Click on one of the sample replays

The browser console logs this error when loading initially:

GET http://localhost:8770/static/replays/viewer/test.js net::ERR_ABORTED 404 (Not Found)

Nothing is logged to the browser console when clicking the replay file.

danthe3rd commented 5 years ago

Hi @bmnielsen, and thank you for reporting this issue.

test.js is the wasm file resulting of the build of OpenBW with emscripten - in your docker the build step fails (./build_js.sh). Your problem looks like a bug in asm2wasm to me (for instance https://github.com/WebAssembly/binaryen/issues/1838).

As a workaround I would suggest that you use an older version: I personnaly use the version 1.38.13 for instance, so you would have to replace the first line of your dockerfile with:

FROM trzeci/emscripten:sdk-tag-1.38.13-64bit as builder
bmnielsen commented 5 years ago

That did it, I didn't notice the build error from that step earlier. Thanks for the quick reply!