iotbzh / helloworld-html-application

An HTML5 application example for AGL
Apache License 2.0
3 stars 3 forks source link

"can't start" error when running #6

Open KernelDeimos opened 5 years ago

KernelDeimos commented 5 years ago

After compiling and installing the widget using afm-util, clicking the icon does nothing.

When starting the application using afm-util, the following error is displayed:

root@raspberrypi3:~# afm-util start helloworld-application@0.1-f92a6dd
Error org.freedesktop.DBus.Error.Failed: "can't start"

Additionally, some menu icons break, but their respective applications still work by using afm-util start ...

KernelDeimos commented 5 years ago

Update: after reinstalling and uninstalling the widget a few times using afm-util, not a single application works even after restarting the OS

jobol commented 5 years ago

What AGL version do you use? There is a fix to by pass a bug in the security manager

KernelDeimos commented 5 years ago

It turns out I was using Eel, but I'm going to try it again in Flounder. The developer docs still say Eel is the latest release

KernelDeimos commented 5 years ago

Unfortunately I can't compile Flounder for Raspberry Pi 3 (which is what I'm currently targeting)

lvguowei commented 5 years ago

I got the same erorr:

ERROR: can't start system unit afm-appli-helloworld-application--0.1-2c37fd4-dirty--main@.service for uid 1001 [/w/workspace/release-jjb-halibut-snapshot/MACHINE/qemux86-64/label/agl-test-slave/repoclone/output/tmp/work/corei7-64-agl-linux/af-main/halibut+gitAUTOINC+533d5a1a51-r0/git/src/afm-urun.c:252]

I'm using agl-demo-platform-crosssdk-qemux86-64.wic.vmdk version 8.0.1

jobol commented 5 years ago

The application must be installed on the target image not in the crosssdk image that is only available for compiling

lvguowei commented 5 years ago

The application must be installed on the target image not in the crosssdk image that is only available for compiling

Thanks for replying quickly.

I downloaded the vmdk file from here https://mirrors.edge.kernel.org/AGL/release/halibut/8.0.1/qemux86-64/deploy/images/qemux86-64/ I also built an agl-demo-platform-qemux86-64.wic.vmdk myself. And they have the same error when I try to start the app.

jobol commented 5 years ago

Okay so that is an error. Are you sure to have the image with the webruntime? It is called Web Application Manager. It comes when you perform aglsetup.sh with the feature agl-html5-framework

blvckcrxw commented 5 years ago

I'm struggling with the same kind of error. My setup is agl-demo-platform-qemux86-64.wic.vmdk image and guppy 7.0.4 SDK. Command qemux86-64:~# afm-util install helloworld-native-application.wgt returns

{
  "added":"helloworld-native-application@0.1-fe47611-dirty"
}

However when I try to run qemux86-64:~# afm-util start helloworld-native-application@0.1-fe47611-dirty, I receive the following error:

ERROR: cannot-start

Other preinstalled applications like dashboard or hvac are running ok with afm-utils start ...

Any ideas on what I'm doing wrong and how to fix it?

lvguowei commented 5 years ago

Hi, I also want to ask are there more tutorials or instructions on how to build html5 apps on AGL? I think more materials on that would be great for more people/companies to get started more easily.

sebd71 commented 5 years ago

Stéphane sent a reply about similar issue on agl-dev-community : https://lists.automotivelinux.org/g/agl-dev-community/topic/57195627#7822

Support of HTML5 apps on AGL are quite recent and I'm fully agree with you about the lack of documentation. We/IoT.bzh partially contribute to HTML5 app support but most of work has been done by other compagnies. Feel free to post your request on agl-dev-community mailing and also feel free to contribute to AGL docs.

janaki2 commented 4 years ago

I'm struggling with the same kind of error. My setup is agl-demo-platform-qemux86-64.wic.vmdk image and guppy 7.0.4 SDK. Command qemux86-64:~# afm-util install helloworld-native-application.wgt returns

{
  "added":"helloworld-native-application@0.1-fe47611-dirty"
}

However when I try to run qemux86-64:~# afm-util start helloworld-native-application@0.1-fe47611-dirty, I receive the following error:

ERROR: cannot-start

Other preinstalled applications like dashboard or hvac are running ok with afm-utils start ...

Any ideas on what I'm doing wrong and how to fix it?

@karapetyantv, @jobol I have same issue and are there any ideas on how to fix this? Thanks, Janaki

jobol commented 4 years ago
janaki2 commented 4 years ago

@jobol

  1. I am using the Flounder 6.0 AGL version image which is available to download - https://mirrors.edge.kernel.org/AGL/release/flounder/6.0.4/qemux86-64/deploy/images/qemux86-64/
  2. I have used the SDK to build .wgt file for the helloworld-native-application
  3. Secure copied the .wgt to AGL environment which is running on qemu x86_64
  4. Using afm_util commands installed the .wgt.
  5. afm_util start throws an error messgae as below - afm-util start helloworld-native-application@0.1-fe2c958-dirty ERROR: cannot-start

The output for journalctl -f on the AGL - when starting application -

Jan 07 22:38:03 qemux86-64 afm-system-daemon[363]: ERROR: can't start system unit afm-appli-helloworld-native-application--0.1-fe2c958-dirty--main@.service for uid 0 [/usr/src/debug/af-main/flounder+gitAUTOINC+3b49f2c7b0-r0/git/src/afm-urun.c:252] Jan 07 22:39:17 qemux86-64 named[335]: listening on IPv6 interfaces, port 53 Jan 07 22:39:17 qemux86-64 named[335]: could not listen on UDP socket: address in use Jan 07 22:39:17 qemux86-64 named[335]: listening on all IPv6 interfaces failed Jan 07 22:39:17 qemux86-64 named[335]: listening on IPv4 interface lo, 127.0.0.1#53 Jan 07 22:39:17 qemux86-64 named[335]: could not listen on UDP socket: address in use Jan 07 22:39:17 qemux86-64 named[335]: creating IPv4 interface lo failed; interface ignored

jobol commented 4 years ago

What is the output of the commands

systemctl status afm-appli-helloworld-native-application--0.1-fe2c958-dirty--main@0.service
journalctl -xu afm-appli-helloworld-native-application--0.1-fe2c958-dirty--main@0.service
janaki2 commented 4 years ago

Output for the commands -

qemux86-64:~# systemctl status afm-appli-helloworld-native-application--0.1-fe2c958-dirty--main@0.service ● afm-appli-helloworld-native-application--0.1-fe2c958-dirty--main@0.service - A Loaded: loaded (/usr/local/lib/systemd/system/afm-appli-helloworld-native-app Active: inactive (dead) lines 1-3/3 (END)

qemux86-64:~# journalctl -xu afm-appli-helloworld-native-application--0.1-fe2c958-dirty--main@0.service -- Logs begin at Wed 2020-01-08 15:43:41 UTC, end at Wed 2020-01-08 15:44:33 UTC -- No entries -- lines 1-2/2 (END)

jobol commented 4 years ago

thank you. It does not explain anything. Have you try to start the application before? using afm-util? or systemctl start afm-appli-helloworld-native-application--0.1-fe2c958-dirty--main@0.service

janaki2 commented 4 years ago

Yes, I did using afm-util

qemux86-64:~# afm-util start helloworld-native-application@0.1-fe2c958-dirty ERROR: cannot-start qemux86-64:~# systemctl status afm-appli-helloworld-native-application--0.1-fe2c958-dirty--main@0.service ● afm-appli-helloworld-native-application--0.1-fe2c958-dirty--main@0.service - A Loaded: loaded (/usr/local/lib/systemd/system/afm-appli-helloworld-native-app Active: inactive (dead) lines 1-3/3 (END)

qemux86-64:~# journalctl -xu afm-appli-helloworld-native-application--0.1-fe2c958-dirty--main@0.service -- Logs begin at Wed 2020-01-08 15:43:41 UTC, end at Wed 2020-01-08 16:00:31 UTC -- No entries -- lines 1-2/2 (END)

janaki2 commented 4 years ago

And I see the following output if I start using qemux86-64:~# systemctl start afm-appli-helloworld-native-application--0.1-fe2c958-dirty--main@0.service Failed to start afm-appli-helloworld-native-application--0.1-fe2c958-dirty--main@0.service: Unit afm-api-helloworld@0.service not found.

blvckcrxw commented 4 years ago

Hello @janaki2. I managed to run helloworld native application and service only by migrating from flounder to guppy. I could not find a workaround to run it on flounder. I know this is not much but I hope it helps.

janaki2 commented 4 years ago

Hello @janaki2. I managed to run helloworld native application and service only by migrating from flounder to guppy. I could not find a workaround to run it on flounder. I know this is not much but I hope it helps.

Thanks a lot @karapetyantv. I appreciate your help. Can you please tell which version of guppy you are using to make it work.

jobol commented 4 years ago

@janaki2 , your message says: Unit afm-api-helloworld@0.service not found I'm not aware of the hello world application but it seems that there is a missing service. @sebd71 can you help please?

janaki2 commented 4 years ago

@janaki2 , your message says: Unit afm-api-helloworld@0.service not found I'm not aware of the hello world application but it seems that there is a missing service. @sebd71 can you help please?

Hi @jobol , @sebd71 Thank you for the help. I see some progress in this issue when using halibut 8.0.3 and installing agl-service-helloworld. But now I see a different issue. I have addressed that in the following link https://lists.automotivelinux.org/g/agl-dev-community/topic/57195627#7821 Please let me know if you have any idea on this.

Thanks, Janaki