Godot: Godot HTML5 Export Executable is not loaded from file in Firefox 68 and higher

Created on 1 Sep 2019  路  2Comments  路  Source: godotengine/godot

Godot version: 3.1.1

OS/device including version: Windows 7, Linux Mint 19.2

Issue description:

When user clicks "Run in browser" button or exports html5 and runs exported html file, an error shows on screen: "Failed loading file 'index.wasm'". In console there are 4 warnings Blocked requests for a resource of a different origin: "Same Origin Policy" will never load remote resources from "file:///G:/html5/index.wasm" (CORS request than HTTP). and another 4 warnings like this Blocked requests for a resource of a different origin: "Same Origin Policy" will never load remote resources from "file:///G:/html5/index.pck" (CORS request than HTTP). The last message in console is Error: Failed loading file 'index.wasm' I have quickly checked and noticed it has to do with discovered vulnerability and it's patch in Firefox 68 https://www.mozilla.org/en-US/security/advisories/mfsa2019-21/#CVE-2019-11730. This problem with godot exported html doesn't occur on Firefox 67 and earlier.
Tested on both Windows 7 and Linux Mint 19.2 systems.

Steps to reproduce:

  1. Have both Firefox 67 and 68 in your system (I had installed 68.0.2 and portable version 67.0.4).
  2. Open Godot project and run it in browser or export it to HTML5 and then open html file.
  3. If page is loaded in Firefox 67, game is working correctly.
  4. If page is loaded in Firefox 68, an error shows 'Failed loading file 'index.wasm'' and game is not loaded.

Minimal reproduction project:

html5.zip

archived

Most helpful comment

Firefox 68 now requires you to follow the same advice as in Chromium-based browsers: you need to start a local Web server to run the exported project. See the first section in exporting for the Web for more information.

There are plans to add a simple Web server to the Godot editor for development purposes, see #16245.

All 2 comments

Firefox 68 now requires you to follow the same advice as in Chromium-based browsers: you need to start a local Web server to run the exported project. See the first section in exporting for the Web for more information.

There are plans to add a simple Web server to the Godot editor for development purposes, see #16245.

I'll close this issue as a duplicate of #16245, since it covers a feature that needs to be implemented for this to work.

Was this page helpful?
0 / 5 - 0 ratings