I have a website that is mostly created with velo-code. At some point I started to get DOM exception errors quite frequently.
In the browser console it looks like that:
r {originalError: DOMException: Failed to execute ‘importScripts’ on ‘WorkerGlobalScope’: The script at ‘
https://bund
…, url: ‘
https://bundler.wix-code.com/1bac45d7-aaae-410e-8c…d-from-package-name=false&dependencies-token=3938
’, message: "Failed to import user code script: Failed to execu…me=false&dependencies-token=3938’ failed to load.", name: ‘LoadUserCodeError’, stack: ‘LoadUserCodeError: Failed to import user code scri…-app/1.628.146/viewerScript.bundle.min.js:1:2257)’}
I believe it has to do with wix compiling my code. Why do I assume this?
When the error occurs then I add some irrelevant code (like ‘console.log(“some nonsense”);’ and publish the site again hoping that it works.
Usually I have to try and change this “nonsense”-line several times and at some point it works.
I also figured out that it might have to do with the fact that on the particular page that creates the error the code is very long (around 6000 lines).
It is very annoying to work with this. Any ideas how to fix it?
Same here. Just started today, no issue yesterday.
Agree it seems like a compile issue. Site header works fine but body code not compiling properly.
Yet to find a consistent solution but sometimes refreshing the editor or editing my code then republishing temporarily works.
Any help gratefully received.
I created a random empty site and page with only empty onReady function, and the problem still persists.
“DOMException: Failed to execute ‘importScripts’ on ‘WorkerGlobalScope’: The script at ‘
https://bundle
r
. wix-code . com/1780ed4f-d41e-4a25-b8ae-3dd99eef0126/edb01bd9-5fc4-499e-9ab4-73663cdc1799/a108a202-1cd7-41c9-8023-823ce96c7641/pages/c1dmp.js?analyze-imported-namespaces=false&init-platform-api-provider=true&get-app-def-id-from-package-name=false&inject-elementory-support=true&dependencies-token=3938’ failed to load. at e.exports.importSync (
https://static
.parastorage. com/services/wix-code-viewer-app/1.1479.568/app.js:15:22872) at eval (
https://static
.parastorage. com/services/wix-code-viewer-app/1.1479.568/app.js:2:16825) at Object.eval [as traceSync] (
https://static
.parastorage. com/services/wix-code-viewer-app/1.1479.568/app.js:2:18863) at eval (
https://static
.parastorage. com/services/wix-code-viewer-app/1.1479.568/app.js:2:16760) at Array.reduce () at e.exports.fetchUserCode (
https://static
.parastorage. com/services/wix-code-viewer-app/1.1479.568/app.js:2:16725) at eval (
https://static
.parastorage. com/services/wix-code-viewer-app/1.1479.568/app.js:2:10582) at f (
https://static
.parastorage. com/services/chat-worker/1.1239.0/viewer-script.bundle.min.js:1:6687) at Generator.eval [as _invoke] (
https://static
.parastorage. com/services/chat-worker/1.1239.0/viewer-script.bundle.min.js:1:6475) at Generator.eval [as next] (
https://static
.parastorage. com/services/chat-worker/1.1239.0/viewer-script.bundle.min.js:1:7116)”
Thanks
We tried to add prints (console.log) in the global section and that solved the problem, but we still don’t know why it happened.
We would appreciate help on how to avoid this in the future.
By the way - this is a fairly short piece of code, a few tens of lines, it doesn’t seem to be related to the code length.