Comments (3)
dev tools -> application -> clear site data should fix this. not sure what exactly goes wrong in the service worker, haven't been able to reproduce
from eframe_template.
I've been able to get around this by commenting out the fetch
eventListener code in sw.js
, haven't had time to debug why (I'm on firefox/linux).
from eframe_template.
I had the same problem as OP and have a bit more information.
I had the same error message. To make sure it wasn't something I had done, I cloned eframe_template and built it as is. The first error message was complaining about eframe_template_.js. The second was complaining about the .wasm file.
What I learned is that when I did a hard reload, it would all work. When I made a change and trunk rebuilt and told the app to reload, it pulled up an index.html which had a different hash in the file name. I think that originally that file did exist, but when I cleaned everything up (trunk clean) and removed the dist directories, it was gone and was not regenerated. In fact, no files in the directory (including the target directory) referenced the hash. But again, if I reloaded (because of a change or just by pressing Ctrl-R) it would revert to that hash, which didn't exist and result in a blank gray screen.
Since the file with that name didn't exist, it looks like trunk just served my index.html as text/html. This is what caused the first error message. It was trying to interpret my index.html as javascript, seeing that it was text/html, and refusing.
Following @amPerl's advice, I brought up the dev tools, selected the "Application" tab at the top, clicked on "Storage" (for me it was not selected by default), and then selected "Clear site data". I don't remember if I just reloaded or hard reloaded at that point, but then things started working.
I wasn't able to figure out where it was getting the bogus hash from, but based on @amPerl's comment, I guess the service worker must have a reference in a cache somewhere which the "Empty cache and Hard Reload" option on Chrome's reload button did not clear.
So far, the problem hasn't recurred, but I haven't done much testing (or much development) since the fix. If I figure out what triggered in the first place, I'll report back (though there's a lot I don't know about all of this, so we'll see if I can figure anything out).
I'm not sure what my original trunk version was, but I upgrade while debugging and it now reports 0.19.2.
Outside of the eframe_template directory, rustc reports:
$ rustc --version
rustc 1.77.2 (25ef9e3d8 2024-04-09)
In the eframe_template directory, it reports:
$ rustc --version
rustc 1.76.0 (07dca489a 2024-02-04)
(because of the rust-toolchain file).
I've been testing with eframe_template version: ab640be
Hope that helps.
from eframe_template.
Related Issues (20)
- Template crashes on M1 mac
- Cargo Subcommand? HOT 1
- License HOT 8
- Contradiction regarding rust version? HOT 5
- Can not get cargo to run after rustup update HOT 2
- The web app fails when the project is at `<username>.github.io` HOT 8
- Documentation and examples for storage need to be updated to reflect recent changes. HOT 1
- WASM template and https://www.egui.rs/#demo hyperlink inconsistency in Chrome
- eframe_template does not render on Chrome for Android HOT 1
- 404 on sw.js github pages HOT 1
- No 'Access-Control-Allow-Origin' header is present on the requested resource. HOT 1
- CI Use of actions-rs HOT 1
- Consider adding some WSL-specific help to README HOT 7
- Incremental compilation fails because of Rust analyzer invalidating build cache
- Segmentation fault on WSL + VcXsrv
- Moving the mouse after expanding the sidebar causes it to go back to original size HOT 2
- How can we remove all the DEBUG and TRACE tags in the console? HOT 1
- How do I remove a component? HOT 1
- mind your cache HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eframe_template.