Skip to content

Extensions using web views not working with self signed certificate #5671

Closed
@jneuhauser

Description

@jneuhauser

Examples of functionality that uses web views:

  • Markdown preview
  • SQL browser

Is there an existing issue for this?

  • I have searched the existing issues

OS/Web Information

  • Web Browser: Chrome Version 106.0.5249.119 (Offizieller Build) (64-Bit)
  • Local OS: Windows 10 21H1
  • Remote OS: Debian 11
  • Remote Architecture: amd64
  • code-server --version: 4.7.0

Steps to Reproduce

  1. start code-server with cert: true in config.json
    https://coder.com/docs/code-server/latest/guide#using-a-self-signed-certificate
  2. open code-server with https://IP:PORT
  3. accept self signed certificate
  4. open or create a *.md file
  5. Hit the preview button on the top right

Expected

The preview of the Markdown document should be shown.

Actual

The preview windows remains empty.

Logs

code-server --verbose
Nothing that is related to this error/bug.

Code-Server Webview

Error loading webview: Error: Could not register service workers: SecurityError: Failed to register a ServiceWorker for scope ('https://192.168.107.129:8080/stable-784b0177c56c607789f9638da7b6bf3230d47a8c/static/out/vs/workbench/contrib/webview/browser/pre/') with script ('https://192.168.107.129:8080/stable-784b0177c56c607789f9638da7b6bf3230d47a8c/static/out/vs/workbench/contrib/webview/browser/pre/service-worker.js?v=4&vscode-resource-base-authority=vscode-resource.vscode-cdn.net&remoteAuthority=192.168.107.129:8080'): An SSL certificate error occurred when fetching the script..

Screenshot/Video

code-server

Does this issue happen in VS Code or GitHub Codespaces?

  • I cannot reproduce this in VS Code.
  • I cannot reproduce this in GitHub Codespaces.

Are you accessing code-server over HTTPS?

  • I am using HTTPS.

Notes

This happens only on my local deployment with the self signed certificate.
My external deployment with a lets encrypt certificate does work as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    waiting-for-infoWaiting for more information from submitter

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions