godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.64k stars 21.11k forks source link

HTML5 link error behind CloudFlare pages: WebAssembly.instantiate(): Import #0 module="a" function="a": function import requires a callable #86099

Open PeterMarques opened 10 months ago

PeterMarques commented 10 months ago

Tested versions

3.

System information

linux

Issue description

Sometimes, and when happed i aways fixed and it returned again, and if i re-fix i wil try to get what i did to fix, and describe, but: : (on brave): index.js:45 Uncaught (in promise) LinkError: WebAssembly.instantiate(): Import #0 module="a" function="a": function import requires a callable at index.js:45:17

(on firefox): Uncaught (in promise) LinkError: import object field 'a' is not a Function

and it will refuse to finish loading.

What the heck is module a function a?

(more on the details (brave))

(anonymous) | @ | index.js:45

  | Promise.then (async)   | instantiateWasm @ index.js:441   | createWasm | @ index.js:9   | (anonymous) | @ index.js:9   | (anonymous) | @ index.js:625   | Promise.then (async)       | (anonymous) | @ index.js:623   | doInit | @ index.js:622   | init | @ index.js:639   | startGame | @ index.js:738   | (anonymous) | @ (index):222   | (anonymous) | @ (index):248

Steps to reproduce

open web export

Minimal reproduction project (MRP)

none

Calinou commented 10 months ago

Which browser(s) did you test? Are you testing with a local web server? Opening a file:// URL directly won't work.

Please upload a minimal reproduction project[^1] to make this easier to troubleshoot.

[^1]: A small Godot project which reproduces the issue, with no unnecessary files included. Be sure to not include the .godot folder in the archive (but keep project.godot).

Drag and drop a ZIP archive to upload it. Do not select another field until the project is done uploading.

Note for C# users: If your issue is not Mono-specific, please upload a minimal reproduction project written in GDScript or VisualScript. This will make it easier for contributors to reproduce the issue locally as not everyone has a Mono setup available.

BQKdev commented 10 months ago

@PeterMarques can you upload a minimal project since most of the description it's just the debug console, This would help better to understand the problem.

PeterMarques commented 10 months ago

There is no need for minimal project.

The issue arives from cloudflare pages, again.

If i use any of the 2 links, version internal, or internal, there is no error, if i use the custom domain one, there is the error.

But, i fixed that somehow, but now it is back. If more details arise, or i can reproduce the error in other form, i will update.

PeterMarques commented 10 months ago

Only other place i found a reference to this error:

https://github.com/lana-k/sqliteviz/issues/45#issuecomment-860265066

Calinou commented 10 months ago

Can you check the Network tab in your web browser's DevTools to make sure Godot is able to find all files when loading the page? To do so, open DevTools by pressing F12 or Ctrl + Shift + I, go to its Network tab and reload the page. Check for any 404 errors or similar.

PeterMarques commented 10 months ago

It seens to be a cache error, when the page is updated it stays like that for a while, even if devmode is enabled.

Because after a while its working again. (or in a visit mode new tab)

But thats a thing, to have a new page load in cached browsers is a luck shot, how to force to every time load the new page if there is one? maybe that is the general fix.


Att:. Peter P. Marques

Em sáb., 23 de dez. de 2023 às 14:01, Hugo Locurcio < @.***> escreveu:

Can you check the Network tab in your web browser's DevTools to make sure Godot is able to find all files when loading the page? To do so, open DevTools by pressing F12 or Ctrl + Shift + I, go to its Network tab and reload the page. Check for any 404 errors or similar.

— Reply to this email directly, view it on GitHub https://github.com/godotengine/godot/issues/86099#issuecomment-1868331502, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH2UPVFWWAH23KHDXPCOQZ3YK4E4XAVCNFSM6AAAAABASIWCYCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRYGMZTCNJQGI . You are receiving this because you were mentioned.Message ID: @.***>