-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Uncaught SyntaxError: Unexpected token '<'" and/or "ChunkLoadError: Loading chunk 3 failed" #1570
Comments
@yarikoptic This is a sort of 'known issue' that I believe happens when we deploy new code. It essentially relates to how the webpack'd code bundles are loaded (that's the 'chunk'). I'm not sure of the exact mechanics of this, but I believe it's when the browser still has the These webpack bundled files include a hash in their filename for caching/cachebusting reasons, so typically they can be left on a CDN for quite a while, older clients can still access them, newer clients will fetch the latest code, and all will 'just work'. I suspect that in our current firebase hosting deployment setup, the old files are being removed straight away each time we deploy, which I suspect means that any clients that are connected when that happens, that have loaded the The simplest 'workaround' is to just refresh the page, and that should load all of the latest code/assets and 'just work' (if a normal reload doesn't work, then a 'hard reload' should). As far as fixing the issue 'properly', i'm not 100% sure off the top of my head. I expect there are 2 main ways we could look at doing this (possibly a combination of them):
|
I believe the specific So when the app tries to fetch this chunk that is missing from the hosting, it falls back to trying to load the Another potential workaround/solution'ish thing here may be to add a new/better rewrite rule that catches these missing JS files and somehow presents a better UI/UX for the user based on that. Not sure if this is any better/even needed once the alternatives in #1570 (comment) are figured out/applied, but capturing it here in case anyway. |
Note that a lot of the resources/issues you'll find across the web when searching for this relate to webpack's |
You can read more about Create React App's deployment docs in: And specifically the section on firebase in: Note that I don't believe we're currently using the
|
Note: You'll also see this error coincide quite regularly with errors like:
|
From https://ohbm.sparkle.space/in/home went to https://ohbm.sparkle.space/in/exhibithall (via that modal "Enter" mouse gymnastics excercise) and got blank white screen. looking into console showed
going back and re-Enter'ing didn't show the issue.
Then clicked Ctrl-Left to go back to Home via browser back, tried to enter https://ohbm.sparkle.space/in/screeningroom -- got the same effect. Going back to Home (Ctrl-Left) took awhile to load (unlike clicking "Back to Home") but finished,... re-Entering still gives the same error. Reloading the page https://ohbm.sparkle.space/in/screeningroom from that white status with Ctrl-Shift-r brings it in.
went around and failed to reproduce again... so not really reliably reproducible but may be smth knowledgeable ppl have a clue about and see how could be addressed.
The text was updated successfully, but these errors were encountered: