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

Multiple instances of Theia breaks VScode extensions with webview. #10693

Open
emilhammarstedtst opened this issue Jan 31, 2022 · 4 comments
Open
Labels
help wanted issues meant to be picked up, require help webviews issues related to webviews

Comments

@emilhammarstedtst
Copy link
Contributor

emilhammarstedtst commented Jan 31, 2022

Bug Description:

If two theia instances are open at the same time only the first opened theia will be able to show a webview. the second and third will get an error.

Steps to Reproduce:

  1. start two instances of Theia (Electron)
  2. start a vscode-extension that uses a webview in both Theia instances
  3. The webview will only render in the first instance.
    theiabug

Additional Information

  • Operating System: Only confirmed on Windows yet
  • Theia Version: 1.22.0
  • Only Electron is affected
@vince-fugnitto vince-fugnitto added help wanted issues meant to be picked up, require help webviews issues related to webviews labels Jan 31, 2022
@emilhammarstedtst
Copy link
Contributor Author

The error originates from: ./packages/plugin-ext/src/main/browser/webview/pre/host.js:70
Uncaught (in promise) DOMException: Failed to register a ServiceWorker: The document is in an invalid state.

@tsmaeder
Copy link
Contributor

tsmaeder commented Feb 1, 2022

And by "two instances" you mean two windows using the same back-end process?

@emilhammarstedtst
Copy link
Contributor Author

emilhammarstedtst commented Feb 1, 2022

And by "two instances" you mean two windows using the same back-end process?

Two electron instances with one separate back-end processes each

@mbilal100
Copy link

In my case, same issue can also be reproduce by launch the 'extensionHost' for webview debugging.
So basically debugging of webveiw extension is not possible within Theia.
Steps to Reproduce:

  • Create webview extension
  • Add extensionHost launch type in launch.json
  • Launch "Run Extension" or press F5
  • execute webveiw command result Uncaught (in promise) DOMException: Failed to register a ServiceWorker: The document is in an invalid state.

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

No branches or pull requests

4 participants