Skip to content

Uncaught NetworkError: Failed to execute 'importScripts' on 'WorkerGlobalScope':

0

i am using the updated web sdk, but i get this error in loading up a stream

import dcv from "./dcvjs-esm/dcv";

                    <DCVViewer
                        dcv={{
                            sessionId,
                            authToken,
                            serverUrl,
                            onDisconnect: handleDisconnect,
                            logLevel: LOG_LEVEL,
                            baseUrl: "src/features/DCV/dcvjs-esm/",
                        }}
                        uiConfig={{
                            toolbar: {
                                visible: true,
                                fullscreenButton: true,
                                multimonitorButton: true,
                            },
                        }}
                        style={{
                            width: "100%",
                            height: "100%",
                        }}
                    />

Enter image description here

when when i use baseUrl: "src/features/DCV/dcvjs-esm/" i still see:

8a003056-763e-4c56-bc28-7e92bfeaead2:1 Refused to execute script from 'https://localhost:3000/tz-render/src/features/DCV/dcvjs-esm/lz4decoder-worker.js' because its MIME type ('text/html') is not executable.
(anonymous) @ 8a003056-763e-4c56-bc28-7e92bfeaead2:1Understand this errorAI
8a003056-763e-4c56-bc28-7e92bfeaead2:1 Uncaught NetworkError: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'https://localhost:3000/tz-render/src/features/DCV/dcvjs-esm/lz4decoder-worker.js' failed to load.
    at 8a003056-763e-4c56-bc28-7e92bfeaead2:1:77

i don't know if this is the reason why my movements are super slow when navigating on the dcv views, any ideas on how to solve this ?

Thanks alot

  • Refused to execute script from 'https://localhost:3000/tz-render/dcvjs/lib/lz4/lz4_decoder.js' because its MIME type ('text/html') is not executable.
    (anonymous) @ tz-render/dcvjs/lz4decoder-worker.js:1
    (anonymous) @ blob:https://localhost:3000/55952731-c7f5-446b-8255-ab042856c6ce:1Understand this errorAI
    tz-render/dcvjs/lz4decoder-worker.js:1 Refused to execute script from 'https://localhost:3000/tz-render/dcvjs/lib/lz4/lz4_decoder.js' because its MIME type ('text/html') is not executable.
    (anonymous) @ tz-render/dcvjs/lz4decoder-worker.js:1
    (anonymous) @ blob:https://localhost:3000/55952731-c7f5-446b-8255-ab042856c6ce:1Understand this errorAI
    dcv.js:2 2024-10-25T19:07:04.788Z - [lz4decoder:101] ERROR [LZ4-Worker] Could not import lz4_decoder so lz4decoder-worker will be shut down
    

asked 2 years ago1K views

1 Answer
0

The error you're encountering suggests there might be an issue with loading the required scripts for the DCV Web SDK. This could potentially be related to the slow movements you're experiencing when navigating DCV views, although it's not necessarily the direct cause.

To address this issue, you can try the following steps:

  1. Ensure that the path to your DCV Web SDK files is correct. In your code snippet, you're using "src/features/DCV/dcvjs-esm/" as the baseUrl. Verify that this path is accurate and that all necessary files are present in that directory.

  2. Check if the importScripts function is being called from within a Web Worker context. The error suggests it's trying to execute in a WorkerGlobalScope, which is typically associated with Web Workers. Make sure you're not inadvertently using Web Workers if they're not required for your implementation.

  3. If you're using a build tool or bundler (like webpack), ensure that it's configured correctly to handle the DCV Web SDK files. You might need to adjust your build configuration to properly include these files.

  4. Verify that you're using the latest version of the DCV Web SDK and that it's compatible with your current implementation.

  5. Check your browser's console for any additional error messages or warnings that might provide more context about the issue.

Regarding the slow movements when navigating DCV views, this could be caused by various factors such as network latency, server performance, or client-side resource constraints. To improve performance:

  1. Ensure you have a stable and fast network connection.
  2. Check the performance of the server hosting your DCV session.
  3. Monitor your client machine's resource usage to ensure it's not overloaded.
  4. Consider adjusting the DCV session settings for better performance, such as lowering the video quality if necessary.

If the issue persists after trying these steps, you may want to contact AWS support for further assistance, as they can provide more specific guidance based on your setup and configuration.
Sources
SDK reference - Amazon DCV

answered 2 years ago

EXPERT

reviewed 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.