eclipse-theia / theia

Eclipse Theia is a cloud & desktop IDE framework implemented in TypeScript.
http://theia-ide.org
Eclipse Public License 2.0
20.05k stars 2.5k forks source link

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

Open emilhammarstedtst opened 2 years ago

emilhammarstedtst commented 2 years ago

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

emilhammarstedtst commented 2 years ago

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 commented 2 years ago

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

emilhammarstedtst commented 2 years ago

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 commented 2 years ago

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: