githubvisual-studio-codeservice-workerweb-workercodespaces

GitHub Codespaces Error loading webview: Error: Could not register service workers: NotSupportedError: Failed to register a ServiceWorker for scope


When I open a README.md Markdown Preview view in GitHub Codespaces on Google Chrome (as well as e.g. on Chromium-based Brave) I am getting:

Error loading webview: Error: Could not register service workers: NotSupportedError: Failed to register a ServiceWorker for scope ('https://....vscode-cdn.net/insider/.../out/vs/workbench/contrib/webview/browser/pre/') with script ('https://....vscode-cdn.net/insider/.../out/vs/workbench/contrib/webview/browser/pre/service-worker.js?v=4&vscode-resource-base-authority=vscode-resource.vscode-cdn.net&remoteAuthority=codespaces+vorburger-...'): The user denied permission to use Service Worker..

How can I grant permission to use Service Workers to *.github.dev / *.vscode-cdn.net in Chrom/Chromium/Brave?


Solution

  • I had the same issue in chrome with Eclipse Che using vs code IDE
    ("Error loading webview: ... The user denied permission to use Service Worker")

    fixed by allowing third-party cookies on the site in the browser settings (added an exclusion for the site)

    the solution is taken from here

    settings from support google com

    an example in pictures