Fix webview loading errors in private browsing

Fix the "Error loading webview: Error: Could not register service workers" message that appears when using Microsoft Visual Studio Code - Open Source in a private browsing window.

If you use Microsoft Visual Studio Code - Open Source in a private browsing window, you might encounter the following error message: 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 this reported bug for details.