Search code examples
sapui5

What does the security error failed to construct Worker script at ...klay.js cannot be accessed from origin <my hana trail webide> mean?


I am trying out the sapui5 control NetworkGraph. I have my data of nodes and edges in the graph.json and I bind it to this control's nodes and edges. But whenever I run the index.html I get the error as:

Error in layouting algorithm. - SecurityError: Failed to construct 'Worker': Script at 'https://sapui5.hana.ondemand.com/resources/sap/ui/thirdparty/klay.js' cannot be accessed from origin 'https://webidetesting6****-d*****trial.dispatcher.hanatrial.ondemand.com'.

Is this same like the cross origin issue? I am unable to figure this out. And I am not providing any layout algorithm.


Solution

  • I am facing the same issue. The problem is, that WebWorkers could not operate cross domains. This is one of there restrictions Cross domain and cross browser web workers

    There are three solutions.

    1. You migrate the "sap.ui.thirdparty" ressource to your space and load it from there
    2. You migrate the KlayWrapper.js and its surrounding ressource to your location and fix it
    3. You inform SAP about this issue and hope the fix the KlayWrapper.js

    This is, what I read till now.