Error Loading Chunk and Unexpected Token '<' on Google Chrome

1 answer

I am running an Angular 6 application with Node.js as a backend. I am experiencing an odd error that only occurs in Google Chrome:

Uncaught SyntaxError: Unexpected Token '<' Error: Uncaught (in promise): Error: Loading chunk # failed. 

At seemingly random points in my application for only some of my users, this error appears (and each user has a different chunk number that appears, a chunk between 1 to 18). Some users can log in to my application then run into a "chunk 12 failed" code, and others can't log in and run into a "chunk 16 failed" code. This would happen whenever a new route would be attempted to be opened (what I mean is going from www.website.com/dashboard to www.website.com/forms).

I have attempted to clear cookies from Chrome's cache, but that did not get rid of the error. My application does not get this error when running on Internet Explorer or Firefox, so it's apparently a Chrome-only bug. I also read on another Stack Overflow issue that the issue might be related to a dependency called Webpack, so I tried updating that and a bunch of other modules, but the error still occurs.

One user discovered that this bug can be bypassed by simply opening the route in a new tab. I can't figure out why that would solve the problem, but changing routes from the same tab would not work. Any help would be appreciated!

All answers to this question, which has the identifier 58633996

The best answer:

Update: It appears, whenever I update my code, some users get the loading chunk error, and some run into an unupdated version of the application. For whatever reason, opening the application in a new tab fixes these problems. There is no clear pattern to this issue. I will continue to research this.

Last questions

how do i remove the switch on my home screen?
how to edit the JS date and time to update atuomatically?
How to utilize data stored in a multidimensional array
Powermockito not mocking URL constructor in URI.toURL() method
Android Bluetooth LE Scanner only scans when phone's Location is turned on in some devices
docker wordpress container can't connect to mysql container
How can I declare a number in java that is more than 64-bits? [duplicate]
Optaplanner solutionClass entityCollectionProperty should never return null error when simple JSON object passed to controller
Anylogic, get the time a pedestrain is in a queue
How do I fix this syntax issue with my .flex file?
Optimizing query in PHP
How to find the highest number of a column and print two columns of that row in R?
Ideas on “Error: Type com.google.firebase.iid.zzav is referenced as an interface from com.google.firebase.messaging.zzd”?
JCIFS SmbFile.exists() and SmbFile.isDirectory() return false when it exists and I can listFiles()
PHP total order
Laravel booking system design
neural net - undefined column selected
How to indicate y axis does not start from 0 in ggplot?
Fragments in backStack
Spinner how to change the data