dioxus icon indicating copy to clipboard operation
dioxus copied to clipboard

wasm files are not hashed, leading to caching issues on deployments

Open HeadEdit opened this issue 1 year ago • 4 comments

Problem

After redeploying my site the page will not open, reporting the error Uncaught (in promise) LinkError: WebAssembly.instantiate(): Import #272 “wbg” “__wbindgen_closure_wrapper17305”. function import requires a callable

So far I've been able to fix this by clearing my browser cache, but I'm not sure why this is happening

Steps To Reproduce

I haven't been able to reproduce this bug consistently yet, it triggers by chance when redeploying the site

HeadEdit avatar Dec 13 '24 10:12 HeadEdit

I encountered this a lot when deploying bevy built projects on web target, but not yet with dioxus. I had never successfully investigated why this happens and how to avoid it, because it might be a mixture of nuances of browser side cacheing, hosting service's caching, wasm-bindgen, and project's build toolchain.

ryo33 avatar Dec 13 '24 11:12 ryo33

This is the browser's resource cache problem. Same problem happens when a newer version deployed.

happyrust avatar Dec 13 '24 11:12 happyrust

This is the browser's resource cache problem. Same problem happens when a newer version deployed.

Ok thanks, also would like to ask if there is any other way to fix this besides manually clearing the browser cache?

HeadEdit avatar Dec 16 '24 01:12 HeadEdit

I encountered this a lot when deploying bevy built projects on web target, but not yet with dioxus. I had never successfully investigated why this happens and how to avoid it, because it might be a mixture of nuances of browser side cacheing, hosting service's caching, wasm-bindgen, and project's build toolchain.

Ok thanks, also would like to ask if there is any other way to fix this besides manually clearing the browser cache?

HeadEdit avatar Dec 16 '24 01:12 HeadEdit

I've encountered the same issue.

xsoheilalizadeh avatar Jan 20 '25 17:01 xsoheilalizadeh