Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to load workers on Windows for versions ^2.0.8 (and 3.0.0) #333

Closed
jsleuth opened this issue Jun 22, 2018 · 1 comment
Closed

Fails to load workers on Windows for versions ^2.0.8 (and 3.0.0) #333

jsleuth opened this issue Jun 22, 2018 · 1 comment

Comments

@jsleuth
Copy link

jsleuth commented Jun 22, 2018

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.

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.

@michael-ciniawsky
Copy link
Contributor

Released in 4.0.0-rc.2 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants