Closed brucem1976 closed 4 years ago
I notice the same issue on Firefox.
For now I'm setting useWebWorker
to false, which won't fix the issue of course but the warning will be suppressed.
A previous closed issue https://github.com/Donaldcwl/browser-image-compression/issues/15 confirmed that Web Workers don't work in Firefox, but this is specifically about Chrome
@brucem1976 The logging in the production script seems not enough to debug. Can you use this script and see the console again? debug script.zip
Thanks.
@Donaldcwl i m having an issue when my browser adblock on chrome is turned ON , i get this error in console.
Refused to create a worker from 'blob:https://site.com/3e9ce499-7750-4d8c-896b-7db16d4677c6' because it violates the following Content Security Policy directive: "script-src 'self' * 'unsafe-inline'". Note that 'worker-src' was not explicitly set, so 'script-src' is used as a fallback.
(anonymous) @ browser.img.compress.js:1 (anonymous) @ browser.img.compress.js:1 (anonymous) @ browser.img.compress.js:1 (anonymous) @ browser.img.compress.js:1 browser.img.compress.js:1 Uncaught DOMException: Failed to construct 'Worker': Access to the script at 'blob:https://site.com/3e9ce499-7750-4d8c-896b-7db16d4677c6' is denied by the document's Content Security Policy. at https://site.com/js/browser.img.compress.js:1:7705 at https://site.com/js/browser.img.compress.js:1:7770 at https://site.com/js/browser.img.compress.js:1:165 at https://site.com/js/browser.img.compress.js:1:169
Any way to fix this, i have even turned off use web worker option by false.
getting Warning
Run compression in web worker failed: Error: ut is not defined
ReferenceError: ut is not defined
at blob:
+1
There should be no problem in v1.0.7
Chrome 75.0.3770.100 Win 10 64-bit
I do the following:
and get the following in browser console:
Any ideas what could be wrong? The image is correctly compressed, but without a web worker.