question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug]: Webview error

See original GitHub issue

Is there an existing issue for this?

  • I have searched the existing issues

OS/Web Information

  • Web Browser: Brave
  • Local OS: MacOS Monterey 12.4
  • Remote OS: MacOS Monterey 12.4
  • Remote Architecture: platform=linux/amd64
  • code-server --version: /root/.local/lib/code-server-4.5.0/lib/vscode/bin/remote-cli/code-server: 12: /root/.local/lib/code-server-4.5.0/lib/vscode/node: not found

Steps to Reproduce

  1. Open code server in Brave Browser
  2. Log in
  3. Read the error message

Expected

Code server should run with all features enabled

Actual

All sorts of random problems, including broken Image display

Logs

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

Screenshot/Video

No response

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 certificate is not trusted, expires …” and it says the time of installation

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:20 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
gogobdcommented, Dec 13, 2022

I found a way to get Brave to work on MacOS. I used openssl s_client -connect localhost:8080 to retrieve the auto-generated (self-signed) certificate from the running code-server instance. I created a file with the extension .crt so I could import that key into Keychain Access.app. Then I used the search function in Keychain Access and double-clicked the new certificate to select “Always trust”. This enables all features other browsers don’t seem to have an issue with - images are shown, Webviews seem to work ok, Jupyter Notebooks run.

I am cross-posting this (see https://github.com/coder/code-server/issues/4800).

1reaction
benz0licommented, Aug 10, 2022

So whenever someone uses the --cert option to let code server generate certificates on startup it actually breaks a lot of features? This doesn’t make much sense to me at the moment…

No. This seems to be a limitation of Brave with self-signed certificates.

Read more comments on GitHub >

github_iconTop Results From Across the Web

591959 - Network change causes WebView to be unable ...
Issue 591959: Network change causes WebView to be unable to communicate · 1. Open the WebView Developer Browser app and navigate to www.google.com....
Read more >
v11.18.0 is broken · Issue #2421 · react-native-webview ...
I have an Android app working fine with v11.17.2 of react-native-webview; if upgraded to v11.18.0 it crashes when it tries to render Webview...
Read more >
Fixing the Latest Apps Crashing Bug from Android System ...
While this is a widespread issue, it is fixable with a quick app updat... ... Warning: Uninstalling Android System Webview updates has been ......
Read more >
SOLVED: Android System WebView Not Updating - YouTube
The Android System WebView won't update error is one of the irritating ... This video is for you if you're encountering this issue...
Read more >
Android System WebView Causes Apps to Crash
The Webview bug caused approximately 75% of the crashes in the leading Android projects monitored by Bugsnag and these projects saw around 40 ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found