Failed loading file 'HTML5 .wasm' PROBLEM

Kramchay DigKramchay Dig Posts: 13Member

I want to play the exported game as HTML5 and test it if the game works in the browser but I had a problem when I try to open the .html file of my exported game as HTML5

It's telling me that I don't have a .wasm file but I do have the file in the folder together with the rest of the file of the same directory

What did I do wrong with the export? Is it the engine itself, the browser, did I miss something, or made a mistake? I want to know the solution of the problem.


Tags :

Comments

  • MegalomaniakMegalomaniak Posts: 2,605Admin
    edited June 2019

    Have you tried exporting without spaces in filenames? I doubt it's that but you never know.

    What does your browsers console say? Also, just in case, try disabling adblock and/or any script blockers for a moment.

  • Kramchay DigKramchay Dig Posts: 13Member

    @Megalomaniak said:
    Have you tried exporting without spaces in filenames? I doubt it's that but you never know.

    What does your browsers console say? Also, just in case, try disabling adblock and/or any script blockers for a moment.

    I set them close together named "2DPlatfoermer.html" and I turned off adblock and I still get the same error as before. Here is my browser console with 10 errors:
    I hope you can tell me more about the error and many thanks.

  • MegalomaniakMegalomaniak Posts: 2,605Admin

    Might want to try running it on a server. Could try XAMPP for an example.

    Godot documentation even has a attention/notice informing of this issue.
    https://docs.godotengine.org/en/3.1/getting_started/workflow/export/exporting_for_web.html

  • LOLOLLOLOL Posts: 1Unconfirmed Member

    I faced the same problem but it works when run in the in game editor im not javascript expert but it runs with this link (http://localhost:8060/tmp_js_export.html) i have no idea?I

  • cyberealitycybereality Posts: 927Moderator

    You can't run HTML5 games by opening the html file locally (not just in Godot, it's a security issue in the browser). You have to have a local web server running. Godot makes one for you when you test in the editor. Otherwise you'll need to open a server at the same directory where you exported the project.

    See here:
    https://stackabuse.com/serving-files-with-pythons-simplehttpserver-module/

  • FredericFrederic Posts: 1Member

    Hello,
    I get this message on iPhone when trying the game tutorial exported in HTML5.

    undefined is not an object (evaluating 'GLctx.getParameter')

    I tried with safari and Firefox.

  • TwistedTwiglegTwistedTwigleg Posts: 2,627Admin

    @Frederic said:
    Hello,
    I get this message on iPhone when trying the game tutorial exported in HTML5.

    undefined is not an object (evaluating 'GLctx.getParameter')

    I tried with safari and Firefox.

    From what I can gather, it seems that there a few issues with Godot's WebGL export and iOS browsers, and one of them is likely causing the issue here. That said, I have very limited experience with Godot's HTML exports, so maybe it is just a setting or something. I remember coming across a post somewhere that mentioned that the texture import options can sometimes cause issues for some devices.

  • cyberealitycybereality Posts: 927Moderator

    Unfortunately, I was not able to get any projects to run on HTML5 iOS. I got the same error.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file