cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Error: Content Security Policy : Failed to execute module factory for ''sap/gantt/library.js'

Chandan
Product and Topic Expert
Product and Topic Expert
0 Likes
1,305

Hello Experts,

I have followed the below tutorial to create a Fiori Elements application.

Create an Incident Management App with SAP Fiori Elements for OData V4

I can execute the project locally, but after deploying it to BTP Cloud Foundry, I am getting the below error. This comes when I try to open the object page. And the object page does not load.

version : 1.124.0

Any idea here how to resolve? Below is the code repository:

CSPanda21/CAP_FioriElement: CAP project with Fiori elements (github.com)

  SAP Fiori Elements   SAP Fiori Launchpad    SAP Fiori Cloud  

ERROR:

Failed to resolve dependencies of 'sap/gantt/simple/GanttChartContainer.js'
-> 'sap/gantt/library.js'
-> 'sap/gantt/config/Mode.js': failed to execute module factory for ''sap/gantt/library.js'
-> 'sap/gantt/config/Mode.js'': Failed to execute 'sap/gantt/config/Mode.js': Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src * data: blob:".

@boghyon 

Accepted Solutions (1)

Accepted Solutions (1)

boghyon
Product and Topic Expert
Product and Topic Expert
0 Likes

The browser reports "Refused to evaluate a string as JavaScript". See the answer I've shared at How to Fix "String as JavaScript" Errors in FLP? (Async Module Loading) - Stack Overflow in order to resolve the CSP issue.

Answers (0)