# Failed to install a native app into webOS(emulator)

**URL:** <https://forum.webosose.org/t/failed-to-install-a-native-app-into-webos-emulator/1374>\
**Category:** Platform Development\
**Created:** [May 17, 2021, 11:17am UTC](https://forum.webosose.org/t/failed-to-install-a-native-app-into-webos-emulator/1374 "2021-05-17T11:17:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![initialjie](https://avatars.discourse-cdn.com/v4/letter/i/57b2e6/32.png) [@initialjie](https://forum.webosose.org/u/initialjie)\
**Post date:** [May 17, 2021, 11:17am UTC](https://forum.webosose.org/t/failed-to-install-a-native-app-into-webos-emulator/1374/1 "2021-05-17T11:17:44Z")

</div>

Hi, I met a error while install a native app to webOS(qemux86), my steps are the followings:

1. build & install webOS(./mcf -p 2 -b 2 qemux86), [Building webOS OSE | webOS Open Source Edition](https://www.webosose.org/docs/guides/setup/building-webos-ose/)

2. build & install NDK(./mcf -p 2 -b 2 qemux86), [Native Development Kit Setup | webOS Open Source Edition](https://www.webosose.org/docs/guides/setup/setting-up-native-development-kit/)

3. write a simple native app(just print "Hello world"), build it and package it, [Developing External Native Apps | webOS Open Source Edition](https://www.webosose.org/docs/tutorials/native-apps/developing-external-native-apps/)

4. check what arch the executable file is  
jaychou@jaychou-VirtualBox:~/samples/native-apps/external/com.sample.helloworld/BUILD$ cd ..  
jaychou@jaychou-VirtualBox:~/samples/native-apps/external/com.sample.helloworld$ ll  
总用量 64  
drwxrwxr-x 6 jaychou jaychou 4096 5月 17 10:23 ./  
drwxrwxr-x 4 jaychou jaychou 4096 5月 11 10:48 ../  
-rw-rw-r-- 1 jaychou jaychou 175 5月 11 10:58 appinfo.json  
drwxrwxr-x 3 jaychou jaychou 4096 5月 17 10:33 BUILD/  
-rw-rw-r-- 1 jaychou jaychou 1640 5月 11 11:03 CMakeLists.txt  
-rw-rw-r-- 1 jaychou jaychou 8928 5月 11 11:17 com.sample.helloworld\_0.0.1\_arm.ipk  
-rw-rw-r-- 1 jaychou jaychou 8696 5月 17 10:23 com.sample.helloworld\_0.0.1\_x86.ipk  
-rw-rw-r-- 1 jaychou jaychou 2375 4月 19 10:29 icon.png  
drwxrwxr-x 2 jaychou jaychou 4096 5月 11 11:17 pkg\_arm/  
drwxrwxr-x 2 jaychou jaychou 4096 5月 17 10:34 pkg\_x86/  
-rw-rw-r-- 1 jaychou jaychou 1626 4月 19 10:29 README.md  
drwxrwxr-x 2 jaychou jaychou 4096 5月 11 20:42 src/  
jaychou@jaychou-VirtualBox:~/samples/native-apps/external/com.sample.helloworld$ cd pkg\_x86/  
jaychou@jaychou-VirtualBox:~/samples/native-apps/external/com.sample.helloworld/pkg\_x86$ ll  
总用量 32  
drwxrwxr-x 2 jaychou jaychou 4096 5月 17 10:34 ./  
drwxrwxr-x 6 jaychou jaychou 4096 5月 17 10:23 ../  
-rw-rw-r-- 1 jaychou jaychou 175 5月 11 10:58 appinfo.json  
-rwxrwxr-x 1 jaychou jaychou 13100 5月 17 10:34 helloworld\*  
-rw-rw-r-- 1 jaychou jaychou 2375 4月 19 10:29 icon.png  
jaychou@jaychou-VirtualBox:~/samples/native-apps/external/com.sample.helloworld/pkg\_x86$ file helloworld  
helloworld: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=e9ce17cdf9076f6d5ad5e08a503a0f61998af63b, with debug\_info, not stripped

5. check if it can run  
jaychou@jaychou-VirtualBox:~/samples/native-apps/external/com.sample.helloworld/pkg\_x86$ ./helloworld  
Hello world!jaychou@jaychou-VirtualBox:~/samples/native-apps/external/com.sample.helloworld/pkg\_x86$ ^C

6. package it to IPK  
jaychou@jaychou-VirtualBox:~/samples/native-apps/external/com.sample.helloworld/pkg\_x86$ cd ..  
jaychou@jaychou-VirtualBox:~/samples/native-apps/external/com.sample.helloworld$ ares-package pkg\_x86/  
Create com.sample.helloworld\_0.0.1\_x86.ipk to /home/jaychou/samples/native-apps/external/com.sample.helloworld  
Success

7. install to webOS emualter but failed  
PS C:\Users\1\> ares-install.cmd E:\VirtualBox\Ubuntu\share\com.sample.helloworld\_0.0.1\_x86.ipk  
Installing package E:\VirtualBox\Ubuntu\share\com.sample.helloworld\_0.0.1\_x86.ipk  
ares-install ERR!

The logs are the following:  
ares-install verb installer#install(): lineObj: {"id":"com.ares.defaultName","statusValue":24,"details":{"receivedSize":"0","packageId":"com.sample.helloworld","modifiedTime":"","unpackFileSize":"45826","client":"com.webos.lunasendpub-1128","totalSize":"0","verified":false,"progress":100,"errorCode":-5,"installBasePath":"/media/developer","reason":"FAILED\_IPKG\_INSTALL","downgrade":true,"paused":false,"simpleStatus":"install","state":"install failed","update":false,"ipkFile":"/media/developer/temp/com.sample.helloworld\_0.0.1\_arm.ipk"}}  
ares-install verb installer#install(): failure  
ares-install verb luna#send() Error  
ares-install verb luna#send() at new CLIError (F:\Node\npm-global\node\_modules@webosose\ares-cli\lib\base\error-handler.js:118:22)  
ares-install verb luna#send() at Object.errMsgHdlr.changeErrMsg (F:\Node\npm-global\node\_modules@webosose\ares-cli\lib\base\error-handler.js:113:16)  
ares-install verb luna#send() at F:\Node\npm-global\node\_modules@webosose\ares-cli\lib\install.js:231:46  
ares-install verb luna#send() at \_onLine (F:\Node\npm-global\node\_modules@webosose\ares-cli\lib\base\luna.js:92:25)  
ares-install verb luna#send() at Array.forEach ()  
ares-install verb luna#send() at \_onData (F:\Node\npm-global\node\_modules@webosose\ares-cli\lib\base\luna.js:74:36)  
ares-install verb luna#send() at Channel. (F:\Node\npm-global\node\_modules@webosose\ares-cli\lib\base\novacom.js:919:56)  
ares-install verb luna#send() at Channel.emit (events.js:182:13)  
ares-install verb luna#send() at addChunk (\_stream\_readable.js:287:12)  
ares-install verb luna#send() at readableAddChunk (\_stream\_readable.js:268:11)  
ares-install verb luna#send() err: { Error  
ares-install verb luna#send() at new CLIError (F:\Node\npm-global\node\_modules@webosose\ares-cli\lib\base\error-handler.js:118:22)  
ares-install verb luna#send() at Object.errMsgHdlr.changeErrMsg (F:\Node\npm-global\node\_modules@webosose\ares-cli\lib\base\error-handler.js:113:16)  
ares-install verb luna#send() at F:\Node\npm-global\node\_modules@webosose\ares-cli\lib\install.js:231:46  
ares-install verb luna#send() at \_onLine (F:\Node\npm-global\node\_modules@webosose\ares-cli\lib\base\luna.js:92:25)  
ares-install verb luna#send() at Array.forEach ()  
ares-install verb luna#send() at \_onData (F:\Node\npm-global\node\_modules@webosose\ares-cli\lib\base\luna.js:74:36)  
ares-install verb luna#send() at Channel. (F:\Node\npm-global\node\_modules@webosose\ares-cli\lib\base\novacom.js:919:56)  
ares-install verb luna#send() at Channel.emit (events.js:182:13)  
ares-install verb luna#send() at addChunk (\_stream\_readable.js:287:12)  
ares-install verb luna#send() at readableAddChunk (\_stream\_readable.js:268:11)  
ares-install verb luna#send() message: 'luna-send command failed \<FAILED\_IPKG\_INSTALL\>',  
ares-install verb luna#send() stack:  
ares-install verb luna#send() 'Error\n at new CLIError (F:\Node\npm-global\node\_modules@webosose\ares-cli\lib\base\error-handler.js:118:22)\n at Object.errMsgHdlr.changeErrMsg (F:\Node\npm-global\node\_modules@webosose\ares-cli\lib\base\error-handler.js:113:16)\n at F:\Node\npm-global\node\_modules@webosose\ares-cli\lib\install.js:231:46\n at \_onLine (F:\Node\npm-global\node\_modules@webosose\ares-cli\lib\base\luna.js:92:25)\n at Array.forEach ()\n at \_onData (F:\Node\npm-global\node\_modules@webosose\ares-cli\lib\base\luna.js:74:36)\n at Channel. (F:\Node\npm-global\node\_modules@webosose\ares-cli\lib\base\novacom.js:919:56)\n at Channel.emit (events.js:182:13)\n at addChunk (\_stream\_readable.js:287:12)\n at readableAddChunk (\_stream\_readable.js:268:11)' } value: undefined  
ares-install verb luna#send() closing exec stream  
ares-install verb installer#waterfall callback err: Error  
ares-install verb installer#waterfall callback err: at new CLIError (F:\Node\npm-global\node\_modules@webosose\ares-cli\lib\base\error-handler.js:118:22)  
ares-install verb installer#waterfall callback err: at Object.errMsgHdlr.changeErrMsg (F:\Node\npm-global\node\_modules@webosose\ares-cli\lib\base\error-handler.js:113:16)  
ares-install verb installer#waterfall callback err: at F:\Node\npm-global\node\_modules@webosose\ares-cli\lib\install.js:231:46  
ares-install verb installer#waterfall callback err: at \_onLine (F:\Node\npm-global\node\_modules@webosose\ares-cli\lib\base\luna.js:92:25)  
ares-install verb installer#waterfall callback err: at Array.forEach ()  
ares-install verb installer#waterfall callback err: at \_onData (F:\Node\npm-global\node\_modules@webosose\ares-cli\lib\base\luna.js:74:36)  
ares-install verb installer#waterfall callback err: at Channel. (F:\Node\npm-global\node\_modules@webosose\ares-cli\lib\base\novacom.js:919:56)  
ares-install verb installer#waterfall callback err: at Channel.emit (events.js:182:13)  
ares-install verb installer#waterfall callback err: at addChunk (\_stream\_readable.js:287:12)  
ares-install verb installer#waterfall callback err: at readableAddChunk (\_stream\_readable.js:268:11)  
ares-install verb installer#waterfall callback err: { Error  
ares-install verb installer#waterfall callback err: at new CLIError (F:\Node\npm-global\node\_modules@webosose\ares-cli\lib\base\error-handler.js:118:22)  
ares-install verb installer#waterfall callback err: at Object.errMsgHdlr.changeErrMsg (F:\Node\npm-global\node\_modules@webosose\ares-cli\lib\base\error-handler.js:113:16)  
ares-install verb installer#waterfall callback err: at F:\Node\npm-global\node\_modules@webosose\ares-cli\lib\install.js:231:46  
ares-install verb installer#waterfall callback err: at \_onLine (F:\Node\npm-global\node\_modules@webosose\ares-cli\lib\base\luna.js:92:25)  
ares-install verb installer#waterfall callback err: at Array.forEach ()  
ares-install verb installer#waterfall callback err: at \_onData (F:\Node\npm-global\node\_modules@webosose\ares-cli\lib\base\luna.js:74:36)  
ares-install verb installer#waterfall callback err: at Channel. (F:\Node\npm-global\node\_modules@webosose\ares-cli\lib\base\novacom.js:919:56)  
ares-install verb installer#waterfall callback err: at Channel.emit (events.js:182:13)  
ares-install verb installer#waterfall callback err: at addChunk (\_stream\_readable.js:287:12)  
ares-install verb installer#waterfall callback err: at readableAddChunk (\_stream\_readable.js:268:11)  
ares-install verb installer#waterfall callback err: message: 'luna-send command failed \<FAILED\_IPKG\_INSTALL\>',  
ares-install verb installer#waterfall callback err: stack:  
ares-install verb installer#waterfall callback err: 'Error\n at new CLIError (F:\Node\npm-global\node\_modules@webosose\ares-cli\lib\base\error-handler.js:118:22)\n at Object.errMsgHdlr.changeErrMsg (F:\Node\npm-global\node\_modules@webosose\ares-cli\lib\base\error-handler.js:113:16)\n at F:\Node\npm-global\node\_modules@webosose\ares-cli\lib\install.js:231:46\n at \_onLine (F:\Node\npm-global\node\_modules@webosose\ares-cli\lib\base\luna.js:92:25)\n at Array.forEach ()\n at \_onData (F:\Node\npm-global\node\_modules@webosose\ares-cli\lib\base\luna.js:74:36)\n at Channel. (F:\Node\npm-global\node\_modules@webosose\ares-cli\lib\base\novacom.js:919:56)\n at Channel.emit (events.js:182:13)\n at addChunk (\_stream\_readable.js:287:12)\n at readableAddChunk (\_stream\_readable.js:268:11)' }  
ares-install ERR! CLI: luna-send command failed \<FAILED\_IPKG\_INSTALL\>  
ares-install verb Error  
at new CLIError (F:\Node\npm-global\node\_modules@webosose\ares-cli\lib\base\error-handler.js:118:22)  
at Object.errMsgHdlr.changeErrMsg (F:\Node\npm-global\node\_modules@webosose\ares-cli\lib\base\error-handler.js:113:16)  
at F:\Node\npm-global\node\_modules@webosose\ares-cli\lib\install.js:231:46  
at \_onLine (F:\Node\npm-global\node\_modules@webosose\ares-cli\lib\base\luna.js:92:25)  
at Array.forEach ()  
at \_onData (F:\Node\npm-global\node\_modules@webosose\ares-cli\lib\base\luna.js:74:36)  
at Channel. (F:\Node\npm-global\node\_modules@webosose\ares-cli\lib\base\novacom.js:919:56)  
at Channel.emit (events.js:182:13)  
at addChunk (\_stream\_readable.js:287:12)  
at readableAddChunk (\_stream\_readable.js:268:11)  
ares-install verb luna#send() JSON line:  
ares-install verb Clear Session  
ares-install verb Session#end() user-requested termination

I am at a loss currently as to what should I do, any help would be appreciated,  
Thank you in advance.

---

<div class="post-metadata">

**Author:** ![initialjie](https://avatars.discourse-cdn.com/v4/letter/i/57b2e6/32.png) [@initialjie](https://forum.webosose.org/u/initialjie)\
**Post date:** [May 17, 2021, 11:18am UTC](https://forum.webosose.org/t/failed-to-install-a-native-app-into-webos-emulator/1374/2 "2021-05-17T11:18:36Z")

</div>

My demo native app is very simple.

1. Source file 'main.c' are as follows:  
jaychou@jaychou-VirtualBox:~/samples/native-apps/external/com.sample.helloworld/src$ ll  
总用量 12  
drwxrwxr-x 2 jaychou jaychou 4096 5月 17 13:57 ./  
drwxrwxr-x 6 jaychou jaychou 4096 5月 17 10:35 ../  
-rw-rw-r-- 1 jaychou jaychou 787 5月 11 10:50 main.c  
jaychou@jaychou-VirtualBox:~/samples/native-apps/external/com.sample.helloworld/src$ cat main.c

#include \<stdio.h\>  
#include \<stdlib.h\>  
#include \<string.h\>

int main(int argc, char \*\*argv)  
{  
fprintf(stdout, "Hello world!");  
exit(0);  
}

1. CMakeLists.txt are as follows:  
jaychou@jaychou-VirtualBox:~/samples/native-apps/external/com.sample.helloworld$ cat CMakeLists.txt

cmake\_minimum\_required(VERSION 2.8.7)  
project(helloworld C CXX)

include\_directories(${CMAKE\_SOURCE\_DIR})  
include\_directories(${CMAKE\_SOURCE\_DIR}/src)  
include\_directories(${CMAKE\_SOURCE\_DIR}/include)

set(BIN\_NAME helloworld)

set(SRC\_LIST  
${CMAKE\_SOURCE\_DIR}/src/main.c  
)

set(CMAKE\_RUNTIME\_OUTPUT\_DIRECTORY "${CMAKE\_SOURCE\_DIR}/pkg\_$ENV{ARCH}/")  
add\_executable(${BIN\_NAME} ${SRC\_LIST})  
set\_target\_properties(${BIN\_NAME} PROPERTIES LINKER\_LANGUAGE C)

target\_link\_libraries (${BIN\_NAME}  
)

if(EXISTS "${CMAKE\_SOURCE\_DIR}/appinfo.json")  
file(COPY "${CMAKE\_SOURCE\_DIR}/appinfo.json" DESTINATION ${CMAKE\_RUNTIME\_OUTPUT\_DIRECTORY})  
else()  
MESSAGE( "'appinfo.json' file was not found !!")  
endif()

if(EXISTS "${CMAKE\_SOURCE\_DIR}/icon.png")  
file(COPY "${CMAKE\_SOURCE\_DIR}/icon.png" DESTINATION ${CMAKE\_RUNTIME\_OUTPUT\_DIRECTORY})  
else()  
MESSAGE( "'icon.png' file was not found !!")  
endif()

1. appinfo.json are as follows:  
jaychou@jaychou-VirtualBox:~/samples/native-apps/external/com.sample.helloworld$ cat appinfo.json  
{  
"id": "com.sample.helloworld",  
"version": "0.0.1",  
"vendor": "My Company",  
"type": "native",  
"main": "helloworld",  
"title": "helloworld",  
"icon": "icon.png"  
}

2. Check whether the app is valid and it show 'no problems detected'

jaychou@jaychou-VirtualBox:~/samples/native-apps/external/com.sample.helloworld/pkg\_x86$ ll  
总用量 32  
drwxrwxr-x 2 jaychou jaychou 4096 5月 17 10:34 ./  
drwxrwxr-x 6 jaychou jaychou 4096 5月 17 10:35 ../  
-rw-rw-r-- 1 jaychou jaychou 175 5月 17 10:35 appinfo.json  
-rwxrwxr-x 1 jaychou jaychou 13100 5月 17 10:34 helloworld\*  
-rw-rw-r-- 1 jaychou jaychou 2375 4月 19 10:29 icon.png  
jaychou@jaychou-VirtualBox:~/samples/native-apps/external/com.sample.helloworld/pkg\_x86$ ares-package -c  
no problems detected

Eveything seems normal, and I don't know why it failed when installing...

---

<div class="post-metadata">

**Author:** ![NERGI](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.webosose.org/nergi/32/364_2.png) [@NERGI](https://forum.webosose.org/u/NERGI)\
**Post date:** [May 25, 2021, 12:47am UTC](https://forum.webosose.org/t/failed-to-install-a-native-app-into-webos-emulator/1374/3 "2021-05-25T00:47:04Z")

</div>

@initialjie ,

~~This error is similar to [Failed to install a native app into webOS(emulator)](https://forum.webosose.org/t/failed-to-install-a-native-app-into-webos-emulator/1370/).~~

~~So it also will be fixed in OSE 2.11.0 release.~~

It need more time to figure out.

If we fix this error, we'll let you know in this post.

Thanks!

---

<div class="post-metadata">

**Author:** ![NERGI](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.webosose.org/nergi/32/364_2.png) [@NERGI](https://forum.webosose.org/u/NERGI)\
**Post date:** [June 8, 2021, 4:15am UTC](https://forum.webosose.org/t/failed-to-install-a-native-app-into-webos-emulator/1374/4 "2021-06-08T04:15:26Z")

</div>

Long time no see!

This issue was resolved in webOS OSE build #359.  
You can check the resolved version in webOS OSE 2.11.0 release. 😁 (at the end of June)

Thanks for reporting the issue and have a nice day!
