HTML5 export for webassembly issue?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By stubbsy345
:warning: Old Version Published before Godot 3 was released.

I have never done a web export before but I am currently working on a project I want to export to webassembly. To do this I am using the 3.0 alpha. I am hosting it in a test website but it is not loading. I keep getting the message “You do not have permission to view this directory or page.” on the webpage. I am new to this form of export, does anybody know why this may be happening?

I’m only using 2.1.4 but the error message seems to indicate that you’re not exporting to a directory which is defined in the web server for publication. Usually (apache) this is some directory below htdocs.

I.e.:
Export to: (Windows example)
"C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\myproject"
(this is probably not the standard directy anymore because you’d need to assign special windows rights to such a dir to be writeable)

Open:
http://127.0.0.1/myproject

Which web server are you using or does Godot 3 include an own http server?

wombatstampede | 2017-09-12 08:38

So currently it is being hosted with azure. I’m looking into the 3.0 exporter because i need the webassembly exporter to get the level of performance I need. However, my web export knowledge is very sketchy. There is an option within the 3.0 editor to ‘run on browser’ next the the usual play scene buttons. However, when pressed it says I have no application able to play it. It doesn’t seem to recognise any of the browsers as capable of this.

stubbsy345 | 2017-09-12 10:26

So the output console will work when using the export in firefox but I am getting all these horrible errors and the screen just appears black:
ERROR: pre-main prep time: 8467 ms
let it go dude!
ERROR: Calling stub instead of sigaction()
Init OS
Init Audio
Init VS
ERROR: At: core/project_settings.cpp:841:set_custom_property_info() - Condition ’ !props.has(p_prop) ’ is true.
Init Physicsserver
WARNING: not found: physics/2d/thread_model
OpenGL ES 3.0 Renderer: Mozilla
WARNING: not found: rendering/quality/anisotropic_filter_level
WARNING: not found: rendering/quality/anisotropic_filter_level
GLES3: max ubo light: 409
GLES3: max ubo reflections: 455, ubo size: 144
WARNING: not found: locale/translation_remaps
ERROR: exit(0) implicitly called by end of main(), but noExitRuntime, so not exiting the runtime (you can use emscripten_force_exit, if you want to force a true shutdown)
EXCEPTION: RuntimeError: index out of bounds
Successfully populated IDB file system
close tmp_export.pck flags 1
close tmp_export.pck flags 1
close tmp_export.pck flags 1
close tmp_export.pck flags 1
close tmp_export.pck flags 1
close tmp_export.pck flags 1
\\repeated many times.

ERROR: enlarged memory arrays from 16777216 to 33554432, took 0 ms (has ArrayBuffer.transfer? false)
close tmp_export.pck flags 1
close tmp_export.pck flags 1
close tmp_export.pck flags 1
close tmp_export.pck flags 1
ERROR: At: core/bind/core_bind.cpp:1534:get_as_text() - Condition ’ !f ’ is true. returned: String()
ERROR: At: core/bind/core_bind.cpp:1534:get_as_text() - Condition ’ !f ’ is true. returned: String()
ERROR: At: core/bind/core_bind.cpp:1534:get_as_text() - Condition ’ !f ’ is true. returned: String()
ERROR: At: core/bind/core_bind.cpp:1534:get_as_text() - Condition ’ !f ’ is true. returned: String()
ERROR: At: core/bind/core_bind.cpp:1534:get_as_text() - Condition ’ !f ’ is true. returned: String()
ERROR: At: core/bind/core_bind.cpp:1534:get_as_text() - Condition ’ !f ’ is true. returned: String()
ERROR: At: core/bind/core_bind.cpp:1534:get_as_text() - Condition ’ !f ’ is true. returned: String()
ERROR: At: core/bind/core_bind.cpp:1534:get_as_text() - Condition ’ !f ’ is true. returned: String()
ERROR: At: core/bind/core_bind.cpp:1534:get_as_text() - Condition ’ !f ’ is true. returned: String()
ERROR: At: core/bind/core_bind.cpp:1534:get_as_text() - Condition ’ !f ’ is true. returned: String()
Null

stubbsy345 | 2017-09-12 12:09

:bust_in_silhouette: Reply From: wombatstampede

I just tried it and get a similar error with firefox and chrome (chrome only with a web server)
(Edit: Project runs anyway despite error messages, see comments)

Godot 3 is in alpha at the moment. I have no idea if WebAssembly is actually supposed to work.

(Probably it is best to file an issue at: Issues · godotengine/godot · GitHub)

Thanks for that! I was wondering if that was the case. Hopefully stable build isn’t too far away.

stubbsy345 | 2017-09-12 14:38

Correction!

I get the error messages on Firefox… but the app runs nevertheless.

For the test project, I forgot to set the run scene in the project settings. Dumb error but there was “wizard” which did that in Godot 2.1.

Did you test your project locally? I even succeeded on Firefox with a ported test project containing 3D and physics even though the loading/initialization time was very long (around 30 seconds).

wombatstampede | 2017-09-13 06:34