Open Gerark opened 2 weeks ago
I would advice switching to --embed-file
since then that data will be embedded directly in the wasm file itself with no external asset dependencies.
If you really need --preload-file
instead of --embed-file
then we can look into next steps for debugging.
I changed the --preload-file
to --embed-file
but I get the same result. Running locally seems to work but not when deployed. What are the things I should look at as a first step for debugging?
I guess the first thing to do would be verify that files are really there in emscriptens virtual filesystem.. e.g. call stat()
on both those file on startup and show the results.
The other thing you could try is taking your working build and pushing it to github pages.. if that works then you would know the problem has to do with when the github action build is working, which seems like the most likely thing here.
Do you have a link to the github action build? So I can see the compile and link commands used to produce the build?
Do you have a link to the github action build? So I can see the compile and link commands used to produce the build?
Yes, here are all the links:
Hello, I'm trying to catch what I'm maybe doing wrong but after a bunch of hours I'm sort of giving up.
I'm packing some data under a folder ( specifically a![image](https://github.com/emscripten-core/emscripten/assets/7666672/cc912ea8-8302-4ced-9643-b514926f9233)
.ttf
file and a.png
) and when I build and run locally ( throughemrun
) the resources are loaded correctly. I can see the font being visualized correctly ( I'm using ImGui ) and the image looks good as well ( I'm using OpenGL and stb_image to load it ). Here's a little screenshot:I created a workflow action in github to deploy the files as a github page but this is what I get instead:![image](https://github.com/emscripten-core/emscripten/assets/7666672/a3a3510d-eed0-4c9f-93a5-ebfb5d692dd4)
It looks like the files are actually loaded ( I don't get asserts or errors from ImGui or stb_image ) but the font seems to be ignored and the image is entirely black. I'm guessing there's something I should setup in order to have the github page working properly.
Are there any aspect I should keep in mind which are automatically addressed when running the webserver locally through
emrun
?