pcb icon indicating copy to clipboard operation
pcb copied to clipboard

script error when loading from cache on Chrome

Open johanneswilm opened this issue 5 years ago • 0 comments

Hey, I am keeping the static assets on a different domain than the main page (using cloudfront). This works fine with CORS set up and using output.crossOriginLoading: 'anonymous' in webpack. I let browsers register client side errors back to me using window.onerror This works fine if I turn the offline plugin off. It also works fine if a user enters the website for the first time and the service workers is installing itself for the first time.

It does not work if the user returns for a second or subsequent visit. At this time, all errors are just reported as "Script error". This is a known problem and I had to go through all the recommended steps [1] to get it working. But if I enable the offline plugin, it stops working.

I am unsure if this is something that can be fixed in offline plugin or whether it is an issue with the browsers, or it's me who hasn't fully understood how to configure the offline plugin, but I thought this is likely the right place to find someone with knowledge about this.

[1] https://raygun.com/blog/script-error/

johanneswilm avatar Mar 16 '20 09:03 johanneswilm