You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 27, 2023. It is now read-only.
Processing data of a large repository cost a lot, so I want to use a WebWorker to calculate in Background.
But when I call new Worker("static/js/WorkerLoadTree.js"):
//CREATE WORKER
console.log("BEFORE NEW WORKER CALL")
BackgroundWorker = new Worker("static/js/WorkerLoadTree.js");
console.log("AFTER NEW WORKER CALL")
I see in Edge:
and I see in Chrome a bit more details:
VSS.SDK.min.js:2 Rejected XDM promise with no reject callbacks n._reject @ VSS.SDK.min.js:2
VSS.SDK.min.js:2 DOMException: Failed to construct 'Worker': Script at 'http://136.310.18.216:8070/_apis/public/gallery/publisher/user/extension/SearchRepos/1.0.13/assetbyname/static/js/WorkerLoadTree.js' cannot be accessed from origin 'null'.
at WorkerStart (http://136.310.18.216:8070/_apis/public/gallery/publisher/user/extension/SearchRepos/1.0.13/assetbyname/static/js/WorkerMain.js:13:32)
at FillCode (http://136.310.18.216:8070/_apis/public/gallery/publisher/user/extension/SearchRepos/1.0.13/assetbyname/index.html:284:3)
at http://136.310.18.216:8070/_apis/public/gallery/publisher/user/extension/SearchRepos/1.0.13/assetbyname/index.html:144:6
at n._wrapCallback (http://136.310.18.216:8070/_apis/public/gallery/publisher/user/extension/SearchRepos/1.0.13/assetbyname/lib/VSS.SDK.min.js:2:951)
at Array.<anonymous> (http://136.310.18.216:8070/_apis/public/gallery/publisher/user/extension/SearchRepos/1.0.13/assetbyname/lib/VSS.SDK.min.js:2:647)
at http://136.310.18.216:8070/_apis/public/gallery/publisher/user/extension/SearchRepos/1.0.13/assetbyname/lib/VSS.SDK.min.js:2:1383 n._reject @ VSS.SDK.min.js:2
Failed to load resource: net::ERR_UNEXPECTED :8070/DefaultCollection/_apis/Contribution/HierarchyQuery/project/09737d31-b39f-49a1-8973-4a702cc4be92:1
It seems to be something wrong to load the WorkerLoadTree.js. Is the way to call correct? How can the worker access a js-file inside an extension?
I want to use a WebWorker inside a WebExtension on a Azure DevOps Server.
Processing data of a large repository cost a lot, so I want to use a WebWorker to calculate in Background.
But when I call
new Worker("static/js/WorkerLoadTree.js")
:I see in Edge:
and I see in Chrome a bit more details:
It seems to be something wrong to load the
WorkerLoadTree.js
. Is the way to call correct? How can the worker access a js-file inside an extension?My Web Extension File-Structure looks like:
Meta:
Azure DevOps Server 17.143.28912.1 (AzureDevOps2019.0.1)
Edit:
I could read out this log from a
DOMException object
Find this Workaround to load the WebWorker as Blob:
new Worker(URL.createObjectURL(new Blob(["("+worker_function.toString()+")()"], {type: 'text/javascript'})));
Locally everything works fine, but as Webextension I get:
Rejected XDM promise with no reject callbacks
in
VSS.SDK.min.js (2,1423)
The text was updated successfully, but these errors were encountered: