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

Scripting plugin from Sebastian Richter generate errors #21

Open
webagentur-hartmann opened this issue Dec 5, 2022 · 9 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@webagentur-hartmann
Copy link
Contributor

Since the last update of the flatpak, where we removed system access to d-bus, the scripting plugin from Sebastian Richter works no longer. The rest of the application, including HBCI transfers in Hibiscus work fine.

It seems that the underlying Eclipse framework has no access to requested functions of the headless browser, so it is not able to log in to the websites.

@Braintoe
Copy link

Braintoe commented Jan 10, 2023

It took me weeks to find out the reason for this error, so here is the error message that is generated that others may find it without having to know in advance that the Flatpak version of jameica is the culprit:

Exception bei Auth.Login! Fehlernachricht: Barclays-Visa-Login fehlgeschlagen! org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.RuntimeException: org.eclipse.swt.SWTError: No more handles because there is no underlying browser available. Please ensure that WebKit with its GTK 3.x bindings is installed (WebKit2 API level is preferred). Additionally, please note that GTK4 does not currently have Browser support.

You may find the complete message log of Hibiscus in Sebastian's forum: https://scripting-forum.derrichter.de/viewtopic.php?f=34&t=1138#p7677

Edit: While my skills are not good enough to help solving the issue, I will be happy to support when it comes to testing if that helps.

@tobias-hammerschmidt
Copy link
Collaborator

Full log for reference:

[12.12.2022 17:26:07] Synchronisierung via non-HBCI (Hibiscus Mashup) läuft
[12.12.2022 17:26:07]  
[12.12.2022 17:26:07] System-Info: OS[Linux (ver. 5.15.0-56-generic) amd64]  Platform[Jameica 2.10.2 | Build: 484 vom 20220503]  Plugin[hibiscus 2.10.9 | Build: 371 vom 20221114]
[12.12.2022 17:26:07] Installierte und aktive Plugin-Versionen: [Finance.Websync ver. 0.9.49-nightly | Build: 904 vom 20221210] [Hibiscus Mashup ver. 0.9.29-nightly | Build: 527 vom 20221202]
[12.12.2022 17:26:07] Überprüfe Jameica-Version ...
[12.12.2022 17:26:07] OK: Jameica-Version 2.10.2 installiert und aktiv
[12.12.2022 17:26:07] Überprüfe Java-Version und den verwendeten Zeichensatz ...
[12.12.2022 17:26:07] OK: Java-Version 17.0.4.1 von 'Flathub' installiert, aktiv und verwendet Zeichensatz 'UTF-8' (Home: /app/jre)
[12.12.2022 17:26:07] Überprüfe Selenium-Version ...
[12.12.2022 17:26:07] OK: Selenium-Version 4.6.0 installiert und aktiv
[12.12.2022 17:26:07] Überprüfe ChromeDriver-Version ...
[12.12.2022 17:26:07] OK: ChromeDriver-Version 108.0.5359.71 installiert und aktiv
[12.12.2022 17:26:07] Überprüfe POI-Version ...
[12.12.2022 17:26:07] OK: POI-Version 5.2.2 installiert und aktiv
[12.12.2022 17:26:07]  
[12.12.2022 17:26:07] Synchronisiere Konto 'Barclaycard, IBAN DEXXXX..XXXXXX [Barclays Ba...urg Branch]' ...
[12.12.2022 17:26:07] Selenium WebDriver über ChromeDriver wird gestartet ...
[12.12.2022 17:26:08] -> Erst-Initialisierung des WebDriver nicht erfolgreich, der Start dauert daher länger:
[12.12.2022 17:26:08] -> Sie verwenden bereits den alternativen Chromium-Browser. Info: Google Chrome beschleunigt den WebDriver-Start!
[12.12.2022 17:26:08] Sicherheits-Check der Integrität des alternativen Chromium-Browser gegen Manipulation ...
[12.12.2022 17:26:09] OK. Ergebnis der Berechnung: CFEB79CA0A3DF77AB5E8F8F671186E23 (Dauer: 1 Sek.)
[12.12.2022 17:26:10] Überprüfe Chromium-Version ...
[12.12.2022 17:26:10] OK. Browser ist: chrome ver. 108
[12.12.2022 17:26:12] Web-Login mit Selenium-WebDriver-Engine mit Anmeldekennung XXXX******* auf https://banking.barclaycard.de ...
[12.12.2022 17:26:12] Fehler: Exception bei Auth.Login! Fehlernachricht: Barclays-Visa-Login fehlgeschlagen! org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.RuntimeException: org.eclipse.swt.SWTError: No more handles because there is no underlying browser available.
Please ensure that WebKit with its GTK 3.x bindings is installed (WebKit2 API level is preferred). Additionally, please note that GTK4 does not currently have Browser support.
)
	at org.eclipse.swt.SWT.error(SWT.java:4893)
	at org.eclipse.swt.SWT.error(SWT.java:4808)
	at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:262)
	at org.eclipse.swt.widgets.Display.syncExec(Display.java:5996)
	at de.derrichter.hibiscus.mashup.gui.dialogs.AbstractDialog.open(AbstractDialog.java:550)
	at de.derrichter.hibiscus.mashup.crossover.callback.WebDialogs.askPIN(WebDialogs.java:373)
	at de.derrichter.hibiscus.mashup.crossover.interact.Auth.getPasswort(Auth.java:112)
	at de.derrichter.hibiscus.mashup.crossover.interact.Auth.seleniumLogin(Auth.java:342)
	at de.derrichter.hibiscus.mashup.crossover.websync.institute.barclaysvisa.Collector.run(Collector.java:167)
	at de.derrichter.hibiscus.mashup.crossover.websync.WebSynchronizeJobKontoauszug.execute(WebSynchronizeJobKontoauszug.java:84)
	at de.derrichter.hibiscus.mashup.crossover.websync.WebSynchronizeBackend$WebSyncJobGroup.sync(WebSynchronizeBackend.java:854)
	at de.willuhn.jameica.hbci.synchronize.AbstractSynchronizeBackend$Worker.run(AbstractSynchronizeBackend.java:399)
	at de.willuhn.jameica.gui.GUI$7.run(GUI.java:1081)
Caused by: java.lang.RuntimeException: org.eclipse.swt.SWTError: No more handles because there is no underlying browser available.
Please ensure that WebKit with its GTK 3.x bindings is installed (WebKit2 API level is preferred). Additionally, please note that GTK4 does not currently have Browser support.

	at de.derrichter.hibiscus.mashup.gui.dialogs.AbstractDialog$4.run(AbstractDialog.java:564)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:5096)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4602)
	at de.willuhn.jameica.gui.GUI.loop(GUI.java:928)
	at de.willuhn.jameica.gui.GUI.init(GUI.java:331)
	at de.willuhn.jameica.system.Application.init(Application.java:145)
	at de.willuhn.jameica.system.Application.newInstance(Application.java:87)
	at de.willuhn.jameica.Main.main(Main.java:78)
Caused by: org.eclipse.swt.SWTError: No more handles because there is no underlying browser available.
Please ensure that WebKit with its GTK 3.x bindings is installed (WebKit2 API level is preferred). Additionally, please note that GTK4 does not currently have Browser support.

	at org.eclipse.swt.SWT.error(SWT.java:4919)
	at org.eclipse.swt.browser.Browser.<init>(Browser.java:120)
	at de.derrichter.hibiscus.mashup.gui.dialogs.security.PasswordDialog.paint(PasswordDialog.java:326)
	at de.derrichter.hibiscus.mashup.gui.dialogs.security.PinDialog.paint(PinDialog.java:129)
	at de.derrichter.hibiscus.mashup.gui.dialogs.AbstractDialog$4.run(AbstractDialog.java:560)
	... 9 more

@tobias-hammerschmidt
Copy link
Collaborator

Related code change: 0a2ecf2

@tobias-hammerschmidt
Copy link
Collaborator

Webkitgtk seems to be removed in gnome-platform 43 (compare https://gitlab.gnome.org/GNOME/gnome-build-meta/-/tree/gnome-42/files to https://gitlab.gnome.org/GNOME/gnome-build-meta/-/tree/gnome-43/files). Rolling back to gnome-platform 42 should fix the issue for now.

@Braintoe
Copy link

Braintoe commented Jan 14, 2023

Thanks a lot for preparing a fix!

I tried to install the test build noted in the issue to test it but got:

Can't load uri https://dl.flathub.org/build-repo/129089/de.willuhn.Jameica.flatpakref: Server returned status 404: Not Found

Am I missing something?

@tobias-hammerschmidt
Copy link
Collaborator

Regarding webkitgtk I'm maybe on the wrong track since the missing folder mentioned in the comment above is only about some build patches. Nevertheless I'm going to merge the rollback to gnome platform 42 so we can narrow the source of the issue. If the issue persists after the rollback it has to be related to the dbus access changes and we have to dig deeper a bit.

@tobias-hammerschmidt
Copy link
Collaborator

@Braintoe Please check once the build has been published to flathub.

@Braintoe
Copy link

Braintoe commented Jan 17, 2023

Good news: Flathub just offered me the new build - and the scripting plugin works again with it. @tobias-hammerschmidt Thank you! :-)

The only error I still get (after sync is completed) is:

[ERROR][bg-task:Worker][de.derrichter.hibiscus.mashup.crossover.callback.WebLogger.error] [SeleniumUtils] WebDriver Task-Kill fehlgeschlagen! Stacktrace: java.io.IOException: Cannot run program "killall": error=2, Datei oder Verzeichnis nicht gefunden

This tells me the Mashup script fails to kill the headless chromium browser which might be a security risk. But I do not know (yet) if this is caused by Flathub or if I should contact Sebastian Richter about this.

@tobias-hammerschmidt
Copy link
Collaborator

I think the mentioned remaining issue is caused by the flathub sandbox which most likely doesn't include the killall command. I don't know how the scripting plugin is implemented - maybe there is an alternative method for cleaning up the started processes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants