eclipse / lemminx-maven

lemminx-maven
Eclipse Public License 2.0
37 stars 31 forks source link

Error while hovering over Maven artifacts / broken #513

Open eliasbalasis opened 12 months ago

eliasbalasis commented 12 months ago

On Eclipse 2023-09 which carries lemminx-maven 0.10.1 hovering over any Maven artifact has now stopped producing the desired popup.

The following error is produced in "Error Log" view

org.eclipse.swt.SWTException: Object doesn't support property or method 'getComputedStyle'
    at org.eclipse.swt.browser.WebBrowser$EvaluateFunction.function(WebBrowser.java:195)
    at org.eclipse.swt.browser.WebSite.Invoke(WebSite.java:809)
    at org.eclipse.swt.browser.WebSite$7.method6(WebSite.java:182)
    at org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:120)
    at org.eclipse.swt.internal.ole.win32.COM.VtblCall(Native Method)
    at org.eclipse.swt.internal.ole.win32.IDispatch.Invoke(IDispatch.java:65)
    at org.eclipse.swt.ole.win32.OleAutomation.invoke(OleAutomation.java:575)
    at org.eclipse.swt.ole.win32.OleAutomation.invoke(OleAutomation.java:538)
    at org.eclipse.swt.browser.IE.execute(IE.java:1202)
    at org.eclipse.swt.browser.WebBrowser.nonBlockingExecute(WebBrowser.java:400)
    at org.eclipse.swt.browser.WebBrowser.evaluate(WebBrowser.java:450)
    at org.eclipse.swt.browser.WebBrowser.evaluate(WebBrowser.java:406)
    at org.eclipse.swt.browser.Browser.evaluate(Browser.java:665)
    at org.eclipse.swt.browser.Browser.evaluate(Browser.java:614)
    at org.eclipse.lsp4e.operations.hover.FocusableBrowserInformationControl.lambda$0(FocusableBrowserInformationControl.java:102)
    at org.eclipse.swt.browser.ProgressListener$2.completed(ProgressListener.java:98)
    at org.eclipse.swt.browser.IE.lambda$6(IE.java:656)
    at org.eclipse.swt.ole.win32.OleEventTable.sendEvent(OleEventTable.java:58)
    at org.eclipse.swt.ole.win32.OleEventSink.notifyListener(OleEventSink.java:160)
    at org.eclipse.swt.ole.win32.OleEventSink.Invoke(OleEventSink.java:128)
    at org.eclipse.swt.ole.win32.OleEventSink$1.method6(OleEventSink.java:79)
    at org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:120)
    at org.eclipse.swt.internal.win32.OS.DispatchMessage(Native Method)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3658)
    at org.eclipse.jface.internal.text.html.BrowserInformationControl.setVisible(BrowserInformationControl.java:357)
    at org.eclipse.jface.text.AbstractInformationControlManager.showInformationControl(AbstractInformationControlManager.java:1240)
    at org.eclipse.jface.text.TextViewerHoverManager.showInformationControl(TextViewerHoverManager.java:276)
    at org.eclipse.jface.text.AbstractInformationControlManager.internalShowInformationControl(AbstractInformationControlManager.java:1191)
    at org.eclipse.jface.text.AbstractInformationControlManager.presentInformation(AbstractInformationControlManager.java:1120)
    at org.eclipse.jface.text.AbstractHoverInformationControlManager.presentInformation(AbstractHoverInformationControlManager.java:884)
    at org.eclipse.jface.text.TextViewerHoverManager.doPresentInformation(TextViewerHoverManager.java:237)
    at org.eclipse.jface.text.TextViewerHoverManager.lambda$3(TextViewerHoverManager.java:227)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:132)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4047)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3663)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1155)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:342)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
    at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:645)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:342)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:552)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:171)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:402)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:651)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:588)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1459)

Session Data:

eclipse.buildId=4.29.0.20230907-1200
java.version=17.0.8.1
java.vendor=Eclipse Adoptium
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_GB
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product
vrubezhny commented 12 months ago

@eliasbalasis I'm not using Windows so I cannot make sure, but have you tried changing a default system browser from IE to any of Chrome or Firefox? (I suppose your default browser id IE/Edge, right?). Just in case you would try changing the default browser, I think that you'll probably need to restart at least Eclipse once changed or even restart your system.

I've copied this issue to LSP4E (where the failure is actually comes from): https://github.com/eclipse/lsp4e/issues/820

I didn't investigated if changing a default browser can actually help, but if it's critical then it worth try changing it until the issue is solved in LSP4E.

Thanks for reporting.

eliasbalasis commented 12 months ago

Thanks for jumping on this quickly.

Unfortunately, changing the default browser didn't work.

I am having microsoft Edge as default, but setting the default to either Chrome or the internal browser and after restarting Eclipse is still producing the same error.

I am afraid this is very important to us, our Maven hierarchy cannot be studied efficiently and our developers will struggle heavily, reducing our productivity.

It also makes Eclipse IDE useless to us, because we are stuck on a pre-built distribution of Eclipse 2021-03 which cannot be updated until all the bugs on all the relevant tools are fixed.

eliasbalasis commented 10 months ago

-Dorg.eclipse.swt.browser.DefaultType=edge seems to be a workaround on Windows OS until the relevant SWT issues are fixed.

However, the historical behavior seems to have changed.

Historically image but only a direct jump to the managed location in latest version of Eclipse IDE.

I know it is a minor concern, causing only one additional jump to get to the source, but it is different to historical behavior. Do you think this is worth fixing? If not I won't insist. I will leave the choice to you.

eliasbalasis commented 9 months ago

On Eclipse 2023-09 with m2e 2.4.0 which still carries lemminx-maven 0.10.1 but also carries org.eclipse.lsp4e_0.18.1.202311121506 -Dorg.eclipse.swt.browser.DefaultType=edge is not needed anymore on Windows OS,

This is probably fixed by org.eclipse.lsp4e_0.18.1.202311121506

Partially though, as the problem has repeated but rarely and under conditions that I am unable to decipher.

eliasbalasis commented 8 months ago

I can confirm this has remained fixed in Eclipse 2023-12

The error is still displayed in the "Error Log" though but at least it is not interrupting the user experience.