Html5 and QT applications on koi #help #agl-compositor #koi


fabrizio.didomenico@...
 

Hello everybody,
 
i am trying to make Web applications coexist with Qt  in a single digital ecosystem. Previously using icefish this was possible by including the packagegroup-agl-profile-graphical-html5 in order to integrate WAM and Chromium into the image.
I tried on koi the same thing starting from the agl-demo-platform image, but after the boot splash screen a blank screen appears.

From the documentation it seemed to me that both digital ecosystems (Qt ecosystem and Web Apps ecosystem) are able to use the new agl-compositor in a similar way,
so there a way to integrate them together in the image in a similar way like icefish?

Thanks in advance for your help

Fabrizio Di Domenico


Lorenzo Tilve
 

Hi Fabrizio,
 
i am trying to make Web applications coexist with Qt in a single
digital ecosystem. Previously using icefish this was possible by
including the packagegroup-agl-profile-graphical-html5 in order to
integrate WAM and Chromium into the image.
I tried on koi the same thing starting from the agl-demo-platform
image, but after the boot splash screen a blank screen appears.
Just to have all the info, which platform are you testing it on? Do you
have some logs you could share?

From the documentation it seemed to me that both digital ecosystems
(Qt ecosystem and Web Apps ecosystem) are able to use the new agl-
compositor in a similar way,
so there a way to integrate them together in the image in a similar
way like icefish?
Yes, it should be possible to keep doing it. However, as there were
changes on the recipes for the demo-platform, we are checking if
there's something additional that needs to be explicitly included to be
able to run the webapps on top of WAM on that Qt image.

Regards, Lorenzo Tilve


fabrizio.didomenico@...
 

Hi Lorenzo, 
thank you very much for your reply.

Just to have all the info, which platform are you testing it on? Do you have some logs you could share?
I'm testing on h3ulcb-kf machine using koi 11.0.1 and agl-demo-platform as the target recipe with packagegroup-agl-profile-graphical-html5 appended to it.
I think the following log fragment shows the issue that i'm facing:

Jun 29 03:07:13 h3ulcb afbd-homescreen[1221]: Connecting to: QUrl("ws://localhost:30031/api?token=@t")

Jun 29 03:07:13 h3ulcb afbd-homescreen[1221]: ()

Jun 29 03:07:14 h3ulcb afbd-homescreen[1221]: ()

Jun 29 03:07:14 h3ulcb afbd-homescreen[1221]: ()

Jun 29 03:07:14 h3ulcb afbd-homescreen[1221]: agl_shell@16: error 0: agl_shell has already been bound

Jun 29 03:07:14 h3ulcb afbd-homescreen[1221]: qt.qpa.wayland: Failed to initialize EGL display 3001

Jun 29 03:07:15 h3ulcb afbd-homescreen[1221]: The Wayland connection experienced a fatal error: Protocol error

Jun 29 03:07:15 h3ulcb audit[1221]: ANOM_ABEND auid=4294967295 uid=1001 gid=1001 ses=4294967295 subj=User::App::homescreen pid=1221 comm="HomeScreen" exe="/var/local/lib/afm/applications/homescreen/bin/HomeScreen" sig=6 res=1

The following one is the WAM log:

Jun 29 03:07:11 h3ulcb systemd[1]: Started "WebAppMgr is responsible for running web apps and manage their lifecycle".
Jun 29 03:07:12 h3ulcb WebAppMgr[1145]: ## (DEBUG)[int main(int, const char**)] ### Starting /usr/bin/WebAppMgr
Jun 29 03:07:12 h3ulcb WebAppMgr[1145]: ## (DEBUG)[virtual int WebRuntimeAGL::run(int, const char**)] WebRuntimeAGL::run
Jun 29 03:07:12 h3ulcb WebAppMgr[1145]: ## (DEBUG)[virtual int WebRuntimeAGL::run(int, const char**)] WebRuntimeAGL - creating SharedBrowserProcessRuntime
Jun 29 03:07:12 h3ulcb WebAppMgr[1145]: ## (DEBUG)[bool WamSocket::createSocket(bool)] service binding
Jun 29 03:07:12 h3ulcb WebAppMgr[1145]: ## (DEBUG)[void WebAppManagerServiceAGL::triggerStartupApp()] Triggering app start:
Jun 29 03:07:12 h3ulcb WebAppMgr[1145]: ## (DEBUG)[int WamSocket::waitForMsg()] Waiting for data...
Jun 29 03:07:12 h3ulcb WebAppMgr[1145]: Failed to convert: '' (err=bad lexical cast: source type value could not be interpreted as target)
Jun 29 03:07:12 h3ulcb WebAppMgr[1145]: bool readJsonFromFile(const string&, Json::Value&):  Failed to open file /etc/wam/com.webos.wam.json
Jun 29 03:07:13 h3ulcb WebAppMgr[1324]: ## (DEBUG)[int main(int, const char**)] ### Starting /usr/bin/WebAppMgr
Jun 29 03:07:13 h3ulcb WebAppMgr[1324]: ## (DEBUG)[virtual int WebRuntimeAGL::run(int, const char**)] WebRuntimeAGL::run
Jun 29 03:07:13 h3ulcb WebAppMgr[1324]: ## (DEBUG)[virtual int WebRuntimeAGL::run(int, const char**)] WebRuntimeAGL - creating RenderProcessRuntime
Jun 29 03:07:13 h3ulcb WebAppMgr[1323]: ## (DEBUG)[int main(int, const char**)] ### Starting /usr/bin/WebAppMgr
Jun 29 03:07:13 h3ulcb WebAppMgr[1323]: ## (DEBUG)[virtual int WebRuntimeAGL::run(int, const char**)] WebRuntimeAGL::run
Jun 29 03:07:13 h3ulcb WebAppMgr[1323]: ## (DEBUG)[virtual int WebRuntimeAGL::run(int, const char**)] WebRuntimeAGL - creating RenderProcessRuntime
Jun 29 03:07:14 h3ulcb WebAppMgr[1145]: [1145:1145:INFO:wayland_connection.cc(83)] Got the wayland display
Jun 29 03:07:14 h3ulcb WebAppMgr[1145]: [1145:1145:INFO:wayland_connection.cc(422)] Found agl_shell extension
Jun 29 03:07:14 h3ulcb WebAppMgr[1145]: [1145:1145:INFO:app_runtime_browser_context.cc(65)] kUserDataDir is set.
Jun 29 03:07:14 h3ulcb WebAppMgr[1145]: [1145:1145:INFO:app_runtime_browser_context.cc(76)] Will use path=/home/1001/wamdata/Default
 
Do you have some hints on where i should start to investigate in order to solve this issue ?

Thank you,

Fabrizio
 


Marius Vlad
 

On Fri, May 07, 2021 at 01:51:56AM -0700, fabrizio.didomenico@... wrote:
Hi Lorenzo,
thank you very much for your reply.


Just to have all the info, which platform are you testing it on? Do you have
some logs you could share?
I'm testing on h3ulcb-kf machine using koi 11.0.1 and agl-demo-platform as the target recipe with p ackagegroup-agl-profile-graphical-html5 appended to it.
I think the following log fragment shows the issue that i'm facing:
Hi,

Judging by your logs it seems you're attempting to use both homescreen
and WAM in the same time, which won't work because only one of them (at a
time) is in charge/responsible for being a client shell.

Please see [1] for a more longer explanation about our current
eco-systems/platforms and how do they work.

On the same topic, there's nothing stopping running any other regular
clients. homescreen is special because it is one that handles the client
shell, and same happens for WAM (for web apps). They're both responsible
for setting-up panels and backgrounds can not run at the same time.

Choose one of them at a time (notice that AppFW would attempt to start
them by default -- you could tweak config.xml to avoid that) and you should
be fine, though I'm that sure you have a way to switch between apps,
when combing platforms (you'll be missing buttons/launcher that performs
the switch).




Jun 29 03:07:13 h3ulcb afbd-homescreen[1221]: Connecting to:
QUrl("ws://localhost:30031/api?token=@t")



Jun 29 03:07:13 h3ulcb afbd-homescreen[1221]: ()



Jun 29 03:07:14 h3ulcb afbd-homescreen[1221]: ()



Jun 29 03:07:14 h3ulcb afbd-homescreen[1221]: ()



Jun 29 03:07:14 h3ulcb afbd-homescreen[1221]: agl_shell@16: error 0:
agl_shell has already been bound



Jun 29 03:07:14 h3ulcb afbd-homescreen[1221]: qt.qpa.wayland: Failed to
initialize EGL display 3001



Jun 29 03:07:15 h3ulcb afbd-homescreen[1221]: The Wayland connection
experienced a fatal error: Protocol error



Jun 29 03:07:15 h3ulcb audit[1221]: ANOM_ABEND auid=4294967295 uid=1001
gid=1001 ses=4294967295 subj=User::App::homescreen pid=1221
comm="HomeScreen"
exe="/var/local/lib/afm/applications/homescreen/bin/HomeScreen" sig=6
res=1

The following one is the WAM log:


Jun 29 03:07:11 h3ulcb systemd[1]: Started "WebAppMgr is responsible for
running web apps and manage their lifecycle".
Jun 29 03:07:12 h3ulcb WebAppMgr[1145]: ## (DEBUG)[int main(int, const
char**)] ### Starting /usr/bin/WebAppMgr
Jun 29 03:07:12 h3ulcb WebAppMgr[1145]: ## (DEBUG)[virtual int
WebRuntimeAGL::run(int, const char**)] WebRuntimeAGL::run
Jun 29 03:07:12 h3ulcb WebAppMgr[1145]: ## (DEBUG)[virtual int
WebRuntimeAGL::run(int, const char**)] WebRuntimeAGL - creating
SharedBrowserProcessRuntime
Jun 29 03:07:12 h3ulcb WebAppMgr[1145]: ## (DEBUG)[bool
WamSocket::createSocket(bool)] service binding
Jun 29 03:07:12 h3ulcb WebAppMgr[1145]: ## (DEBUG)[void
WebAppManagerServiceAGL::triggerStartupApp()] Triggering app start:
Jun 29 03:07:12 h3ulcb WebAppMgr[1145]: ## (DEBUG)[int
WamSocket::waitForMsg()] Waiting for data...
Jun 29 03:07:12 h3ulcb WebAppMgr[1145]: Failed to convert: '' (err=bad
lexical cast: source type value could not be interpreted as target)
Jun 29 03:07:12 h3ulcb WebAppMgr[1145]: bool readJsonFromFile(const
string&, Json::Value&):  Failed to open file /etc/wam/com.webos.wam.json
Jun 29 03:07:13 h3ulcb WebAppMgr[1324]: ## (DEBUG)[int main(int, const
char**)] ### Starting /usr/bin/WebAppMgr
Jun 29 03:07:13 h3ulcb WebAppMgr[1324]: ## (DEBUG)[virtual int
WebRuntimeAGL::run(int, const char**)] WebRuntimeAGL::run
Jun 29 03:07:13 h3ulcb WebAppMgr[1324]: ## (DEBUG)[virtual int
WebRuntimeAGL::run(int, const char**)] WebRuntimeAGL - creating
RenderProcessRuntime
Jun 29 03:07:13 h3ulcb WebAppMgr[1323]: ## (DEBUG)[int main(int, const
char**)] ### Starting /usr/bin/WebAppMgr
Jun 29 03:07:13 h3ulcb WebAppMgr[1323]: ## (DEBUG)[virtual int
WebRuntimeAGL::run(int, const char**)] WebRuntimeAGL::run
Jun 29 03:07:13 h3ulcb WebAppMgr[1323]: ## (DEBUG)[virtual int
WebRuntimeAGL::run(int, const char**)] WebRuntimeAGL - creating
RenderProcessRuntime
Jun 29 03:07:14 h3ulcb WebAppMgr[1145]:
[1145:1145:INFO:wayland_connection.cc(83)] Got the wayland display
Jun 29 03:07:14 h3ulcb WebAppMgr[1145]:
[1145:1145:INFO:wayland_connection.cc(422)] Found agl_shell extension
Jun 29 03:07:14 h3ulcb WebAppMgr[1145]:
[1145:1145:INFO:app_runtime_browser_context.cc(65)] kUserDataDir is set.
Jun 29 03:07:14 h3ulcb WebAppMgr[1145]:
[1145:1145:INFO:app_runtime_browser_context.cc(76)] Will use
path=/home/1001/wamdata/Default

Do you have some hints on where i should start to investigate in order to solve this issue ?

Thank you,

Fabrizio
[1] https://docs.automotivelinux.org/en/master/#5_Component_Documentation/1_agl-compositor/#available-toolkits-application-conversions-and-available-eco-systems





fabrizio.didomenico@...
 

Hi Marius,
thanks for your feedbacks.

So if i understand well, there is no way to run Web apps on top of a Qt Image (indeed homescreen implementation using Qt) like it was on icefish, or i am missing somethings else?
 
On the same topic, there's nothing stopping running any other regular
clients.
What do you mean for regular clients?
If i will not use WAM (but just homescreen in Qt) and if i will have a web-runtime installed on the image, is it possible for both a generic Qt or Web app to be displayed and executed ?


Choose one of them at a time (notice that AppFW would attempt to startthem by default -- you could tweak config.xml to avoid that) and you should be fine, though I'm that sure you have a way to switch between apps,when combing platforms (you'll be missing buttons/launcher that performs the switch).
So for my understanding this means that i'm need to install both Qt Homescreen and WAM, then just one of them must be activated at runtime based on the application type that needs to be executed. Is this correct?
In this case do i need to have two homescreens, one in html and one in qt in order to perform the switch using the launcher or some other buttons on screen?
Moreover, is the config.xml referred to the generic apps or to the homescreens ?


Thank you very much

Fabrizio


Marius Vlad
 

On Fri, May 07, 2021 at 02:55:24AM -0700, fabrizio.didomenico@... wrote:
Hi Marius,
thanks for your feedbacks.

So if i understand well, there is no way to run Web apps on top of a
Qt Image (indeed homescreen implementation using Qt) like it was on
icefish, or i am missing somethings else?
There is, just not the client shell (homescreen for Qt).


On the same topic, there's nothing stopping running any other regular
clients.
What do you mean for regular clients? If i will not use WAM (but just
homescreen in Qt) and if i will have a web-runtime
installed on the image, is it possible for both a generic Qt or Web
app to be displayed and executed ?
Any other client than is not the client shell (homecreen or WAM). A
client shell is the client that implements a private extension to
specify how we place and order "windows".


Choose one of them at a time (notice that AppFW would attempt to startthem
by default -- you could tweak config.xml to avoid that) and you should be
fine, though I'm that sure you have a way to switch between apps,when
combing platforms (you'll be missing buttons/launcher that performs the
switch).
So for my understanding this means that i'm need to install both Qt
Homescreen and WAM, then just one of them must be activated at runtime
based on the application type that needs to be executed. Is this
correct?
I mean, you don't need to, you seem to be wanting to have both HTML5 and
Qt, which is fine. I think you might need to read [1], to understand
the role of the client shell and the private extension we have in AGL.

You can have both of the installed, but not running at the time.

In this case do i need to have two homescreens, one in html
and one in qt in order to perform the switch using the launcher or
some other buttons on screen? Moreover, is the config.xml referred to
the generic apps or to the homescreens ?
No, what I meant is that probably you'll need to amend either homescreen or WAM
such that you have a way to switch between different applications (and
most likely to start them).

For instance, you can have homescreen and start a browser instance (by
this I mean chromium but maybe any other html5 app). If
the browser is installed like a widget it will automatically show up in the
launcher application, and with it you can start it, and, at some later
point in time, to switch to it.

On the HTML5 side of things, you can have WAM as the client shell, and
still use Qt applcations. Where and how you start the Qt applications,
interactively using WAM is at this point an unknown to me, as I don't
believe we have something similar to what the launcher application does
now on the Qt platform.


Thank you very much

Fabrizio
[1] https://docs.automotivelinux.org/en/master/#5_Component_Documentation/1_agl-compositor/#private-extensions