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

Uncaught DOMException: Failed to construct 'Worker': #72

Open
dcts opened this issue Oct 27, 2019 · 1 comment
Open

Uncaught DOMException: Failed to construct 'Worker': #72

dcts opened this issue Oct 27, 2019 · 1 comment

Comments

@dcts
Copy link

dcts commented Oct 27, 2019

Hello! This code here works perfectly if you just copy & paste it in a .html file and open locally with a browser.

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Document</title>
</head>
<body>
  <h1>TEST</h1>
  <canvas id="viewport" width="800" height="500"></canvas>
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
  <!-- run from the minified library file: -->
  <script src="https://dl.dropbox.com/s/y2msq2ttbxeu2qo/arbor.js"></script>
  <script src="https://dl.dropbox.com/s/578qe4k75xi9209/main.js"></script>
</body>
</html>

But when I host it on github or put inside my rails app i get the following error:

arbor.js:33 Uncaught DOMException: Failed to construct 'Worker': Script at 'https://dl.dropbox.com/s/y2msq2ttbxeu2qo/arbor.js' cannot be accessed from origin 'https://dcts.github.io'.
    at Object.init (https://dl.dropboxusercontent.com/s/y2msq2ttbxeu2qo/arbor.js:33:713)
    at Kernel (https://dl.dropboxusercontent.com/s/y2msq2ttbxeu2qo/arbor.js:33:3165)
    at Object.ParticleSystem (https://dl.dropboxusercontent.com/s/y2msq2ttbxeu2qo/arbor.js:35:8072)
    at HTMLDocument.<anonymous> (https://dl.dropboxusercontent.com/s/578qe4k75xi9209/main.js:154:21)
    at Object.resolveWith (https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js:16:15102)
    at Function.ready (https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js:16:10164)
    at HTMLDocument.z (https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js:16:14558)

Any ideas on how to resolve that? Here is the direct link which throws the error:
https://dcts.github.io/arbor-js-test/index.html

Any help is very appreciated, I really love this library but just cant get it to work in production, which is super annoying. Thanks a lot in advance!

@Roiocam
Copy link

Roiocam commented Jan 12, 2022

same issue, but https://cdnjs.cloudflare.com/ajax/libs/arbor/0.91.0/arbor.min.js work for me arbor.js was not

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