SAP Knowledge Base Article - Public

3677943 - Content security policy error when adding the custom widget in a story in SAP Analytics Cloud (SAC)

Symptom

  • Unable to add the custom widget into the story.
  • Error message: "Content Security Policy(CSP) Error occurred, Please review your 'required' CSP Settings."
    Blocked URI / Missing Value: "https://xxxxxxxxx"
    Problematic Directive: "script-src-elem"
    Current CSP Policy: "script-src 'self' 'unsafe-eval' ......

Environment

SAP Analytics Cloud

Reproducing the Issue

  1. Log onto the SAP Analytics Cloud system.
  2. Open a story.
  3. Insert any custom widget into the story.
  4. Observe that only a blank widget is added into the story.
  5. Check the console log and observe the error message indicating a violation of the Content Security Policy directive.

Cause

The issue is caused by the Content Security Policy (CSP) settings in the SAP Analytics Cloud system.
In detail, the Content Security Policy is enabled under the Security tab of the Administration module in this SAC system. However, the blocked URL is not added in the trusted list. 

Resolution

  1. Navigate to the Administration module in SAP Analytics Cloud.
  2. Access the Security tab.
  3. Add the blocked URI to the trusted list under Content Security Policy settings.
  4. Alternatively, disable the Content Security Policy.
  5. Verify that the custom widget can be added in the optimized story now.

Keywords

content security policy, csp error, script-src-elem, custom widget, optimized story, sap analytics cloud, blocked uri, trusted list, csp settings, script loading error, widget issue, data visualization, story component, Content Security Policy(CSP) Error occurred, Please review your 'required' CSP Settings , KBA , LOD-ANA-UNS-SDK , Unified Story Custom Widget and Hosting , Problem

Product

SAP Analytics Cloud all versions