Current behavior:
karma-webpack is failing to load worker files. It appears that karma-webpack attempts to load workers from the filesystem instead of http://localhost:port/ and fails because the file is not found.
Failed: Failed to construct 'Worker': Script at 'file:///C:/Users/JSLEUTH/AppData/Local/Temp/_karma_webpack_a74482acdfd8c8d3635c.worker.js' cannot be accessed from origin 'http://localhost:11337'.
SecurityError: Failed to construct 'Worker': Script at 'file:///C:/Users/JSLEUTH/AppData/Local/Temp/_karma_webpack_a74482acdfd8c8d3635c.worker.js' cannot be accessed from origin 'http://localhost:11337'.
at new 806.module.exports (http://localhost:11337/base/karma.setup.js?8f670c6ddbb5beddcdb5ff8de9075302b08f7e8c:121701:1007)
at WorkerDriver.initWorker (http://localhost:11337/base/karma.setup.js?8f670c6ddbb5beddcdb5ff8de9075302b08f7e8c:118319:50450)
at new WorkerDriver (http://localhost:11337/base/karma.setup.js?8f670c6ddbb5beddcdb5ff8de9075302b08f7e8c:118319:39805)
at Bucket.<anonymous> (http://localhost:11337/base/karma.setup.js?8f670c6ddbb5beddcdb5ff8de9075302b08f7e8c:42870:60566)
at step (http://localhost:11337/base/karma.setup.js?8f670c6ddbb5beddcdb5ff8de9075302b08f7e8c:263:23)
at Object.next (http://localhost:11337/base/karma.setup.js?8f670c6ddbb5beddcdb5ff8de9075302b08f7e8c:244:53)
at http://localhost:11337/base/karma.setup.js?8f670c6ddbb5beddcdb5ff8de9075302b08f7e8c:237:71
at Object.__awaiter [as b] (http://localhost:11337/base/karma.setup.js?8f670c6ddbb5beddcdb5ff8de9075302b08f7e8c:233:12)
at Bucket.initDriver (http://localhost:11337/base/karma.setup.js?8f670c6ddbb5beddcdb5ff8de9075302b08f7e8c:42870:59788)
at Bucket.<anonymous> (http://localhost:11337/base/karma.setup.js?8f670c6ddbb5beddcdb5ff8de9075302b08f7e8c:42870:50275)
Expected/desired behavior:
Load the worker and be able to use it (possibly by loading from http://localhost:port/ as is done for all other bundles).
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem along with a gist/jsbin of your webpack configuration.https://github.com/jsleuth/bug-karma-webpack-workers
Check the README for instructions on how to run the code and how to see the issue.
NOTE: when exhibiting the issue this repo does not throw the exact same error message as in my other repo.
What is the expected behavior?
See README for instructions.
What is the motivation / use case for changing the behavior?
It would be nice for worker tests to work on Windows.
I'm submitting a bug report
Webpack version: 3.11.0
Webpack Karma version: ^2.0.8 (issue does not happen on 2.0.6)
Karma version: 2.0.2
Please tell us about your environment: Windows 7
Browser: Chrome 69.0.3452.0 (Developer Build) (64-bit)
Current behavior: karma-webpack is failing to load worker files. It appears that karma-webpack attempts to load workers from the filesystem instead of http://localhost:port/ and fails because the file is not found.
Expected/desired behavior: Load the worker and be able to use it (possibly by loading from http://localhost:port/ as is done for all other bundles).
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem along with a gist/jsbin of your webpack configuration. https://github.com/jsleuth/bug-karma-webpack-workers Check the README for instructions on how to run the code and how to see the issue. NOTE: when exhibiting the issue this repo does not throw the exact same error message as in my other repo.
What is the expected behavior? See README for instructions.
What is the motivation / use case for changing the behavior? It would be nice for worker tests to work on Windows.