emilk / eframe_template

The easy way to make a Rust app with a GUI
Apache License 2.0
774 stars 176 forks source link

Integrety faliure caurses stuck on loading screen #157

Open zachdedoo13 opened 3 weeks ago

zachdedoo13 commented 3 weeks ago

127.0.0.1/:132 The integrity attribute is currently ignored for preload destinations that do not support subresource integrity. See https://crbug.com/981419 for more information

127.0.0.1/:1 Failed to find a valid digest in the 'integrity' attribute for resource 'http://127.0.0.1:8080/eframe_template-bec6097ef300d351.js' with computed SHA-384 integrity '+18uXC4WNVnLBxkmGwd6jx649BRgbGmN8U+tnG7h6AmyI+EwP7g73zbXxxFtSjA5'. The resource has been blocked.

The resource http://127.0.0.1:8080/eframe_template-bec6097ef300d351_bg.wasm was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate as value and it is preloaded intentionally.

Got the error useing a compleatly unmodified and modifyed (changed crate name and some code) version of the template with persistence disabled, can be fixed by disableing site data for the wabsite on chrome,

Opining "http://127.0.0.1:8080/tt-a9a87a6af848ab46.js" through the console also solves the issue

Windows, chrome, useing trunk surve

zachdedoo13 commented 3 weeks ago

It is to do with trunk, I'm note shore of it's effected by this project or not. I've switched to wasm-pack but I'll leave the issue open in case anyone else finds a solution.

an-Iceberg commented 1 week ago

I have the same issue

zachdedoo13 commented 6 days ago

did you manage to find a fix?

an-Iceberg commented 5 days ago

Nope, the issue still persists.

Tho it seems this is an issue with trunk or wasm-bindgen, not specifically eframe.

chancehudson commented 4 days ago

I ran into the same issue and fixed it by setting the filehash to false in the trunk build. e.g.

trunk build --release --filehash false

an-Iceberg commented 3 days ago

Interesting, i also kinda sorta found a “““workaround”””. Before i compile the release build i clear the dist directory with trunk clean and then i recompile trunk with cargo install trunk and finally i run trunk build --release. It only works once tho, any changes after that change the file hashes and you'd have to recompile trunk.

an-Iceberg commented 3 days ago

@chancehudson

I ran into the same issue and fixed it by setting the filehash to false in the trunk build. e.g.

trunk build --release --filehash false

Sadly, that doesn't seem to work for me :(