Fix webview loading errors in private browsing

If you use Microsoft Visual Studio Code - Open Source in a private browsing window, you might encounter an error message. The error is: Error loading webview: Error: Could not register service workers.

This is a known issue affecting the following browsers:

  • Google Chrome in Incognito mode
  • Mozilla Firefox in Private Browsing mode
Table 1. Dealing with the webview error in a private browsing window
Browser Workarounds

Google Chrome

Go to Settings → Privacy and security → Cookies and other site data → Allow all cookies.

Mozilla Firefox

Webviews are not supported in Private Browsing mode. See the Mozilla bug report for details.