timsueberkrueb / webber

Making webapps superfluous since 2019
https://open-store.io/app/webber.timsueberkrueb
Other
14 stars 9 forks source link

Webber can't create webapps on dev #35

Closed gbdomubpkm closed 4 years ago

gbdomubpkm commented 4 years ago

Since qt 5.14 update on dev, there are bugs on web or for some apps or webapps (crash on scrolling or crash on start) : see https://github.com/ubports/morph-browser/issues/341 I don't know if there is anything specific for you, but i saw that webber can't create webapps on dev (crash when sharing the web link so as to create the webapp)

timsueberkrueb commented 4 years ago

Thanks for the heads up!

gbdomubpkm commented 4 years ago

Strange thing but it can help you : webber 0.4.0 works with qt 5.14 update ! No crashes and it creates webapps ! No arm64 fo try on Pinephone.

timsueberkrueb commented 4 years ago

Should be fixed now, correct?

gbdomubpkm commented 4 years ago

No. NOT fixed in Webber 0.5.5.

timsueberkrueb commented 4 years ago

Ok, I was hoping it would be, as the issue you linked is closed. Thanks.

gbdomubpkm commented 4 years ago

.... but 0.4.0 works always 😉☺

gbdomubpkm commented 4 years ago

Still not fixed by the last dev. observation : after testing webber versions, the crash appears with the implementation of the 'support desktop mode' option in webber <= V 0.4.0 no crashes, > V 0.4.0 systematic crashes

gbdomubpkm commented 4 years ago

hi @balcy To help guide, do you think the problem could be fixed by one of the current 14 morph pull requests? Thank you

balcy commented 4 years ago

no I don't think so, the crash does happen in webber, too, if you open webber, click "Add", enter something in the URL field (e.g. https://ddg.gg, and then click on the "Name" text input field. The existing PR's most likely not.

So it is not directly related to morph, but seems like the required environment variables for QtWebEngine are somehow not found.

https://github.com/ubports/lxc-android-config/blob/bf7c2dc380543dc9369f1ce8bb4b478729727636/etc/profile.d/disable-qtwebengine-gpu.sh does provide them normally: export QTWEBENGINE_CHROMIUM_FLAGS="--disable-gpu --disable-viz-display-compositor"

The --disable-viz-display-compositor part is for using the old compositor, which improves performance The --disable-gpu part is for not using the GPU via opengl, but software rendering. GPU is not accessible on most devices currently.

In /home/phablet/.cache/upstart/application-click-webber.timsueberkrueb_webber_0.5.6.log I see No suitable graphics backend found which is typical for a missing environment variable QTWEBENGINE_CHROMIUM_FLAGS="--disable-gpu".

So this has to somehow get the environment variable passed to work correctly. I'm not sure why the system wide definition (https://github.com/ubports/lxc-android-config/commit/96bd3f8a8e77212a6333dddc2ab8f3bd9a114088#diff-3c498c9593b0c016c415e59759964d46 and then https://github.com/ubports/lxc-android-config/commit/bf7c2dc380543dc9369f1ce8bb4b478729727636#diff-3c498c9593b0c016c415e59759964d46) is not enough here.

balcy commented 4 years ago

ok while I struggled adding the environment variable in the main.rs file, the following did work:

In https://github.com/timsueberkrueb/webber/blob/master/webber.desktop it is possible to change the line: Exec=webber %U to Exec=webber --disable-gpu --disable-viz-display-compositor %U

makes it work. (https://doc.qt.io/qt-5/qtwebengine-debugging.html#using-command-line-arguments)

Normally not each single application should need to set that though.

timsueberkrueb commented 4 years ago

Thanks a lot @balcy. Do you know if this problem is unique to Webber or do other apps also experience the issue that those system environment variables don't seem to be respected?

balcy commented 4 years ago

At least the rain page of the weather app and unav works with the global env variables (and don't load without)

timsueberkrueb commented 4 years ago

I've released an update (v0.5.7) with your fix @balcy. Thanks again!