Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugin: webviews on development host do not work on electron #10989

Open
saltylassi opened this issue Apr 5, 2022 · 1 comment
Open

plugin: webviews on development host do not work on electron #10989

saltylassi opened this issue Apr 5, 2022 · 1 comment
Labels
electron issues related to the electron target help wanted issues meant to be picked up, require help plug-in system issues related to the plug-in system

Comments

@saltylassi
Copy link

saltylassi commented Apr 5, 2022

Bug Description:

On electron, and when starting the development host (plugin-system) webviews fail to properly start due to a service worker error:

Uncaught (in promise) DOMException: Failed to register a ServiceWorker: The document is in an invalid state.

Steps to Reproduce:

  1. open https://github.com/microsoft/vscode-extension-samples/tree/main/webview-sample as a workspace
  2. build the extension (npm i)
  3. start the debug configuration run extension
  4. the development host should start
  5. trigger the command cat coding: start cat coding session
  6. the webview editor opens but there is no content with the above error

Additional Info

  • Operating System: Windows 10
  • Theia Version: latest
@vince-fugnitto vince-fugnitto added electron issues related to the electron target plug-in system issues related to the plug-in system labels Apr 5, 2022
@vince-fugnitto vince-fugnitto changed the title Webview error on electron plugin: webviews on development host do not work on electron Apr 5, 2022
@vince-fugnitto vince-fugnitto added the help wanted issues meant to be picked up, require help label Apr 5, 2022
@vince-fugnitto
Copy link
Member

I simplified the issue so the problem is more easier to reproduce and identify 👍

Looking at vscode, it seems they set special privileges for the vscode-webview scheme to allow service-workers, and it may be the reason that it does not work in the framework at the moment (previously I thought it was disabled for security reasons):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
electron issues related to the electron target help wanted issues meant to be picked up, require help plug-in system issues related to the plug-in system
Projects
None yet
Development

No branches or pull requests

2 participants