Failed to execute 'importScripts' on 'WorkerGlobalScope'
I try load dcm through wado-image-loader and got the error DOMException: Failed to execute 'importScripts' on 'WorkerGlobalScope' An example I pressed libjpeg-turbo 12-bit and there is the same error in the browser's console on example
Duplicate of #401
@swederik Could you help me?
It is very weird that it's not able to find the bundle. We did actually stop using the WASM version of libjpeg-turbo compiled for 12 bits though because it doesn't quite work yet.
We are still using jpeg.js for 12 bit here: https://github.com/cornerstonejs/cornerstoneWADOImageLoader/blob/master/src/shared/decoders/decodeJPEGBaseline12Bit-js.js#L9
As far as I know all the tests are passing but you are right, it also seems to be failing here: https://cornerstone-wado-image-loader.netlify.app/wadouri/index.html
Thanks for the report!
@swederik I noticed, the same problem with both JPEG Lossless here: https://cornerstone-wado-image-loader.netlify.app/wadouri/index.html
Anything new on this issue?
I found one Dicom file out of 7 that the loader actually succeeded in loading. @swederik
I fixed this issue using this workaround in the webWorkerManager config:
webWorkerTaskPaths: [
"https://unpkg.com/[email protected]/dist/610.bundle.min.worker.js",
"https://unpkg.com/[email protected]/dist/888.bundle.min.worker.js"
]
Error: webWorkerTaskPaths: [ "/js/610.bundle.min.worker.js", "/js/888.bundle.min.worker.js" ] Success: webWorkerTaskPaths: [ "http://ip:port/js/610.bundle.min.worker.js", "http://ip:port/js/888.bundle.min.worker.js" ]
From China Coder~
I met this issue with using version 4.1.x, and fixed with rollback version to 3.3.2.
I am facing the same issue. I am using embedded viewer in react. Below is how i tried using the webWorkerTaskPaths. Unable to get this to work any help will be greatly appreciated.
const ohifViewerConfig = { // default: '/' routerBasename: routerBaseUri, showStudyList: false, filterQueryParam: false, webWorkerTaskPaths: [ "/static/js/610.bundle.min.worker.js", "/static/js/888.bundle.min.worker.js" ]
Solution:
folder = MySiteURL+'/dcmviewer/js'; config = { maxWebWorkers: navigator.hardwareConcurrency || 1, startWebWorkersOnDemand : true, webWorkerTaskPaths: [ folder + "/610.bundle.min.worker.js", folder + "/888.bundle.min.worker.js" ], // webWorkerTaskPaths: [ // "https://unpkg.com/[email protected]/dist/610.bundle.min.worker.js", // "https://unpkg.com/[email protected]/dist/888.bundle.min.worker.js" // ], taskConfiguration: { 'decodeTask' : { initializeCodecsOnStartup: false, usePDFJS: false } } }; cornerstoneWADOImageLoader.webWorkerManager.initialize(config);