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

thread.test.js fail ??? #319

Closed
jiapei100 opened this issue Mar 10, 2017 · 2 comments
Closed

thread.test.js fail ??? #319

jiapei100 opened this issue Mar 10, 2017 · 2 comments
Labels
question Further information is requested
Milestone

Comments

@jiapei100
Copy link

Hi, all:

I'm testing dwv, but met the following ERROR message:

thread: Test ThreadPool. (1, 0, 1)Rerun14 ms
Died on test #1 at ....../dwv/tests/utils/thread.test.js:13:7: Failed to construct 'Worker': Script at '....../dwv/tests/utils/worker.js' cannot be accessed from origin 'null'.@ 1 ms
Source:
Error: Failed to construct 'Worker': Script at '....../dwv/tests/utils/worker.js' cannot be accessed from origin 'null'.
at dwv.utils.WorkerThread.run (....../dwv/src/utils/thread.js:108:22)
at dwv.utils.ThreadPool.addWorkerTask (....../dwv/src/utils/thread.js:40:26)
at Object. (....../dwv/tests/utils/thread.test.js:53:14)
Source: at ....../dwv/tests/utils/thread.test.js:13:7

Can anybody help please?

Cheers
Pei

@ivmartel ivmartel added the question Further information is requested label Mar 10, 2017
@ivmartel ivmartel added this to the 0.18.0 milestone Mar 10, 2017
@ivmartel
Copy link
Owner

This test fails if you run it locally on Chrome or related (Opera for example) because it forbids access to local files for the web workers. See this paragraph of the Mozilla web workers page.
So two solutions:

  • run it in Firefox or
  • run it from a local web server

@ivmartel
Copy link
Owner

I hope I answered your question. Closing for now, feel free to reopen.

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

No branches or pull requests

2 participants