Rate This Document
Findability
Accuracy
Completeness
Readability

Report Display Issues

Symptom

When you view a task report, it may display incorrectly, as shown in Figure 1.

Figure 1 Report display issues

Possible Causes

The report may display incorrectly due to the Content Security Policy (CSP).

Troubleshooting Procedure

  • Temporary solution (effective until the next restart)
    1. Choose Manage Jenkins > Script Console.
      Figure 2 Manual temporary modification (1)
    2. On the Script Console page that is displayed, enter the following command in the text box and click Run.
      System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "default-src 'none'; script-src 'self' 'unsafe-inline' 'unsafe-eval' ; style-src 'self' 'unsafe-inline'; img-src 'self' 'unsafe-inline' blob: data:; ")
      Figure 3 Manual temporary modification (2)
  • Permanent solution (settings remain effective after a restart)
    1. Set Environment="JAVA_OPTS=-Djava.awt.headless=true" in the /usr/lib/systemd/system/jenkins.service file.
      sed -i 's/Environment="JAVA_OPTS=-Djava.awt.headless=true"/Environment="JAVA_OPTS=-Djava.awt.headless=true -Dhudson.model.DirectoryBrowserSupport.CSP=\\"default-src \x27none\x27; script-src \x27self\x27 \x27unsafe-inline\x27 \x27unsafe-eval\x27; style-src \x27self\x27 \x27unsafe-inline\x27; img-src \x27self\x27 \x27unsafe-inline\x27 blob: data:;\\""/g' /usr/lib/systemd/system/jenkins.service
    2. Reload the systemd manager configuration.
      systemctl daemon-reload
    3. Restart the Jenkins service.
      systemctl restart jenkins.service