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 TypeError: Failed to execute 'importScripts' on 'WorkerGlobalScope': Module scripts don't support importScripts() #11505

Closed
aerialist7 opened this issue Sep 5, 2023 · 5 comments · Fixed by #11519

Comments

@aerialist7
Copy link
Contributor

Hi Team,

I faced with importScripts problem after upgrading from version 1.108 to version 1.109.
I use a CDN version of Cesium.

I prepared a simple example to reproduce the problem.
Just check the browser console.

Sandcastle example:

Browser:

  • Chrome 116.0.5845.140 (Official Build) (arm64)

Operating System:

  • macOS 13.5.1 (22G90)
@aerialist7
Copy link
Contributor Author

@ggetz, hi! Could you please have a look?
It looks like it's related to this change #11400

@ggetz
Copy link
Contributor

ggetz commented Sep 5, 2023

Thanks for reporting this @aerialist7. We're taking a look now. This appears to be an issue with cross-origin workers specifically - In this case between https://aerialist7.github.io/ and the CDN.

@ggetz
Copy link
Contributor

ggetz commented Sep 8, 2023

@aerialist7 I have a branch, worker-inline, which should resolve issues with the cross-origin workers.

Could you try http://cesium-dev.s3-website-us-east-1.amazonaws.com/cesium/worker-inline/Build in place of https://cesium.com/downloads/cesiumjs/releases/1.109/Build/?

@aerialist7
Copy link
Contributor Author

aerialist7 commented Sep 9, 2023

@ggetz, there is a problem with HTTP:

image

Do you have an ability to deploy fixed version somewhere under HTTPS?

UPD: It works under HTTP locally
image

@protectione055
Copy link

@aerialist7 I have a branch, worker-inline, which should resolve issues with the cross-origin workers.

Could you try http://cesium-dev.s3-website-us-east-1.amazonaws.com/cesium/worker-inline/Build in place of https://cesium.com/downloads/cesiumjs/releases/1.109/Build/?

I encountered the same issue when running Quickstart, and the browser console displayed these errors:

Uncaught TypeError: Failed to execute 'importScripts' on 'WorkerGlobalScope': Module scripts don't support importScripts().
    at 25651789-ba2d-4340-a07b-11db1f1686b9:1:1
3e946eb2-f000-42b4-a8d5-6504ed8e6f07:1  Uncaught TypeError: Failed to execute 'importScripts' on 'WorkerGlobalScope': Module scripts don't support importScripts().
    at 3e946eb2-f000-42b4-a8d5-6504ed8e6f07:1:1
5c8b4ffd-8ba9-4ce1-9ef2-466da5592ae5:1  Uncaught TypeError: Failed to execute 'importScripts' on 'WorkerGlobalScope': Module scripts don't support importScripts().
    at 5c8b4ffd-8ba9-4ce1-9ef2-466da5592ae5:1:1

After replacing the src of the script tag with this link, the issue was resolved.

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

Successfully merging a pull request may close this issue.

3 participants