Uploaded image for project: 'Red Hat OpenShift Dev Spaces (formerly CodeReady Workspaces) '
  1. Red Hat OpenShift Dev Spaces (formerly CodeReady Workspaces)
  2. CRW-7252

OpenShift Welcome Page and Ansible content creator tab failed to load on OCP with self-signed TLS certificate because of error loading webview: "Could not register service worker: SecurityError An SSL certificate error occurred when fetching the script"

XMLWordPrintable

    • False
    • None
    • False
    • Release Notes
    • Hide
      = OpenShift Welcome page and Ansible content creator page fail to load

      There is a known issue affecting workspaces using the Ansible sample and a self-signed TLS certificate. The OpenShift Welcome and the Ansible content creator tabs are empty and the following message appears: "Error loading webview: Error: Could not register service worker: SecurityError: Failed to register a ServiceWorker for scope." There is a workaround available.

      .Workaround

      Add the self-signed TLS certificate to the browser's trusted root authority by following link:https://docs.redhat.com/en/documentation/red_hat_codeready_workspaces/2.1/html/installation_guide/installing-codeready-workspaces-in-tls-mode-with-self-signed-certificates_crw#adding_certificates_to_google_chrome_on_linux_or_windows[this procedure].
      Show
      = OpenShift Welcome page and Ansible content creator page fail to load There is a known issue affecting workspaces using the Ansible sample and a self-signed TLS certificate. The OpenShift Welcome and the Ansible content creator tabs are empty and the following message appears: "Error loading webview: Error: Could not register service worker: SecurityError: Failed to register a ServiceWorker for scope." There is a workaround available. .Workaround Add the self-signed TLS certificate to the browser's trusted root authority by following link: https://docs.redhat.com/en/documentation/red_hat_codeready_workspaces/2.1/html/installation_guide/installing-codeready-workspaces-in-tls-mode-with-self-signed-certificates_crw#adding_certificates_to_google_chrome_on_linux_or_windows [this procedure].
    • Known Issue
    • Done
    • Workaround Exists
    • Show
      Add the self-signed TLS certificate to the browser's trusted root authority by following the procedure below: https://docs.redhat.com/en/documentation/red_hat_codeready_workspaces/2.1/html/installation_guide/installing-codeready-workspaces-in-tls-mode-with-self-signed-certificates_crw#adding_certificates_to_google_chrome_on_linux_or_windows

      Description of problem:

      OpenShift Welcome Page and Ansible content creator tab failed to load because of error loading webview: "Could not register service worker: SecurityError An SSL certificate error occurred when fetching the script"

      Prerequisites (if any, like setup, operators/versions):

      Steps to Reproduce

      1. Create and open Ansible sample
        # Make sure Ansible and OpenShift VSX extensions have been installed
      2. Click on OpenShift button in the left panel to open OpenShift Welcome Page
      3. Go to Ansible view, click Get started button to open Ansible content creator tab

      Actual results:

      OpenShift Welcome Page and Ansible content creator tab were empty.
      VS Code Editor showed error popup:

      Error loading webview: Error: Could not register service worker: SecurityError: Failed to register a ServiceWorker for scope ('https://devspaces.apps.ocp416.crw-qe.com/admin/ansible-demo-qlkb/3100/oss-dev/static/out/vs/workbench/contrib/webview/browser/pre/') with script ('https://devspaces.apps.ocp416.crw-qe.com/admin/ansible-demo-qlkb/3100/oss-dev/static/out/vs/workbench/contrib/webview/browser/pre/service-worker.js?v=4&vscode-resource-base-authority=vscode-resource.vscode-cdn.net&remoteAuthority=devspaces.apps.ocp416.crw-qe.com'): An SSL certificate error occurred when fetching the script..
      


      Expected results:

      OpenShift Welcome Page and Ansible content creator tab opened successfully.

      Reproducibility (Always/Intermittent/Only Once):

      Always

      Acceptance criteria: 

      Definition of Done:

      Build Details:

      Tested with Dev Spaces 3.16.1.RC-devspaces-operator-bundle3.16-71 on OCP 4.16 deployed to PSI OSP, which is using self-signed TLS certificate.

      VS Code Editor build details:

      Red Hat OpenShift Dev Spaces with Microsoft Visual Studio Code - Open Source IDE
      Version: 1.93.0
      Commit: Unknown
      Date: 2024-09-19T15:24:05.853Z (1 day ago)
      Browser: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
      

      Additional info (Such as Logs, Screenshots, etc):

      The error hasn't been reproduced on DevSandbox Staging. It is using public TLS certificate.

      It seems to be related to the changes in DS 3.16.1: https://issues.redhat.com/browse/CRW-7247
       

       *

        1. 3.16.0_ansible_content_creator_tab.png
          217 kB
          Dmytro Nochevnov
        2. 3.16.0_openshift_welcome_page.png
          425 kB
          Dmytro Nochevnov
        3. 3.16.1_ansible_content_creator_tab_error.png
          218 kB
          Dmytro Nochevnov
        4. 3.16.1_openshift_welcome_page_error.png
          227 kB
          Dmytro Nochevnov

              vgulyy Vitaliy Gulyy
              dnochevn Dmytro Nochevnov
              Jana Vrbkova Jana Vrbkova
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: