glsp icon indicating copy to clipboard operation
glsp copied to clipboard

SWT Chromium Support has been removed from Eclipse

Open planger opened this issue 4 years ago • 3 comments

https://bugs.eclipse.org/bugs/show_bug.cgi?id=572010

As we currently depend on it in the Eclipse integration of GLSP, we should discuss how to best cope with the removal.

planger avatar Apr 07 '21 14:04 planger

Starting with 2021-06 (4.20), Chromium will be removed from Eclipse (Windows + Linux + Mac). Since 2021-03, on Windows, SWT provides an Edge browser, based on Webview2. This relies on Edge Chromium:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=538991

I've tested different implementations of the SWT Browser (Edge, Chromium, Default), on Windows and Linux, with two applications: the Json Forms examples (https://jsonforms.io/examples) and the Coffee Editor.

  • Standard Browser on Windows: this relies on IE and can't load apps such as GLSP or JSon Forms
  • Standard Browser on Linux: works fine
  • Chromium Browser on Windows, Linux: works fine, but will be retired because it's not updated
  • Edge Browser on Windows: works fine, but requires additional steps to be configured

As mentioned above, the SWT Edge Browser implementation is based on the Webview2 Runtime from Microsoft, which in turn is based on Edge Chromium, but is not shipped with it. SWT doesn't ship Webview2 Runtime either; which means it needs to be installed separately. There are several options for this:

  • Using an installer, as part of the product installation process. For Eclipse Applications, we don't have an "Installation process", so it's a bit difficult to automate.
  • Letting the use handle the install. Not very user-friendly. Webwiew2 Runtime needs to be installed only once and will then self-update, so it's a one time issue; but still not quite reliable
  • Waiting a few months until Windows ships Webview2 Runtime by default. It seems that this could happen in the next few months, but not all Windows users will get these updates (At the moment, it seems to be part of the Office/Office 365 update, but users without Office installed won't automatically get the Webview2 Runtime). Having Webview2 as part of Windows would be the ideal solution, as we wouldn't have to do anything, but it doesn't seem too reliable at the moment
  • Ship a fixed version of the Webview2 Runtime. We could include this in an installable feature, but it's approximately 180MB in size

So all in all, it works, but installation is an issue. I think we should consider an intermediate solution, such as:

  • Try to start the Edge browser from Eclipse.
  • If it works, then great! The user already installed (directly or indirectly) Webview2
  • If it doesn't work, display a placeholder instead of the Web application. The placeholder may contain a link to the Web installer for Webview2, or a link to an optional Eclipse Feature that includes a fixed version of the Webview2 Runtime
  • Clients that need an all-in-one reliable installation may choose to include the optional Webview2 Feature in their RCP

Since I suspect we'd need a global strategy for all Web apps in Eclipse, we could provide a Browser service in a general project (e.g. EMF.Cloud), that would implement the above strategy. We could also get in touch with the SWT team, to see if they have some suggestions/ideas on how to handle this on Eclipse directly.

As far as I can tell, the default Browser is a satisfying options on other (non-Windows) platforms

Some additional links:

Distribution options for Webview2: https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution

Downloading Webview2: https://developer.microsoft.com/en-us/microsoft-edge/webview2/

Some news about Webview2 being installed with Office: https://www.bleepingcomputer.com/news/microsoft/microsoft-is-auto-installing-the-windows-10-webview2-runtime/

CamilleLetavernier avatar Apr 29 '21 10:04 CamilleLetavernier

Additional input: https://www.modumind.com/2021/05/12/bringing-chromium-to-eclipse-rcp/?utm_source=rss&utm_medium=rss&utm_campaign=bringing-chromium-to-eclipse-rcp

planger avatar May 20 '21 08:05 planger

Additional input: https://www.modumind.com/2021/05/12/bringing-chromium-to-eclipse-rcp/?utm_source=rss&utm_medium=rss&utm_campaign=bringing-chromium-to-eclipse-rcp

Especially, since Edge Chromium is available on Linux and MacOS, the WebView2 component might be ported to MacOS then Linux at some point in 2021/2022, so we could eventually end up with a cross-platform SWT-Edge Chromium browser

CamilleLetavernier avatar May 20 '21 09:05 CamilleLetavernier

Due to https://github.com/eclipse-glsp/glsp-eclipse-integration/pull/70 we no longer depend on the chromium support. There is a follow-up issue to handle Webview2 on Windows #875

tortmayr avatar Feb 01 '23 08:02 tortmayr