Offline issue


I have a vscode extension (vsix) with some webviews and custom editors contributions.
When I have a network disconnection, Theia will go offline (websocket is closed), and then once it is online again, it will reload all the vscode builtin plugins and my vscode plugin too, causing some of them will not continue working properly.

Two questions/issues:

  1. First, why do all the plugins need to be reloaded/activated again (some will not work correctly after reconnecting)?
  2. My major issue is that webviews/customEditors are fully reloaded and this takes some time, with bad UX. How can I prevent this?

I check the related code in Theia (hosted-plugin.ts) and created a new class that replaces the hosted-plugin.ts (using rebind), and commented out the preserveWebview code (to do nothing), this fixes the reload issue of my customEditors/webviews but this change affected the postMessage mechanism…

You can test these issues using the cat-customs-0.0.1.vsix plugin.


I see there is a PR that may fix this issue:

But I don’t know if it is at work or just ignored…