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

**URL:** <https://forum.webosose.org/t/failed-to-install-a-native-app-into-webos-emulator/1370>\
**Category:** App Development\
**Created:** [May 14, 2021, 10:27am UTC](https://forum.webosose.org/t/failed-to-install-a-native-app-into-webos-emulator/1370 "2021-05-14T10:27:47Z")\
**Posts on this page:** 9\
**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 14, 2021, 10:27am UTC](https://forum.webosose.org/t/failed-to-install-a-native-app-into-webos-emulator/1370/1 "2021-05-14T10:27:47Z")

</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 raspberrypi4), [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. got an error while installing, the log 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:** ![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 17, 2021, 12:09am UTC](https://forum.webosose.org/t/failed-to-install-a-native-app-into-webos-emulator/1370/2 "2021-05-17T00:09:21Z")

</div>

Hi @initialjie ,

Please try using `qemux86` for step 2 as follows:

```
./mcf -p 2 -b 2 qemux86
```

---

<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, 2:52am UTC](https://forum.webosose.org/t/failed-to-install-a-native-app-into-webos-emulator/1370/3 "2021-05-17T02:52:25Z")

</div>

Hi, I have re-install the NDK using qemux86 but still not working, here are the details:

1. set the environment  
source /opt/webos-sdk-x86\_64/2.8.g/environment-setup-core2-32-webos-linux

2. rebuild native app  
jaychou@jaychou-VirtualBox:~/samples/native-apps/external/com.sample.helloworld/BUILD$ rm -rf \*  
jaychou@jaychou-VirtualBox:~/samples/native-apps/external/com.sample.helloworld/BUILD$ cmake ..  
-- Toolchain file defaulted to '/opt/webos-sdk-x86\_64/2.8.g/sysroots/x86\_64-webossdk-linux/usr/share/cmake/OEToolchainConfig.cmake'  
-- The C compiler identification is GNU 9.3.0  
-- The CXX compiler identification is GNU 9.3.0  
-- Check for working C compiler: /opt/webos-sdk-x86\_64/2.8.g/sysroots/x86\_64-webossdk-linux/usr/share/i686-webos-linux-icecream/bin/i686-webos-linux-gcc  
-- Check for working C compiler: /opt/webos-sdk-x86\_64/2.8.g/sysroots/x86\_64-webossdk-linux/usr/share/i686-webos-linux-icecream/bin/i686-webos-linux-gcc -- works  
-- Detecting C compiler ABI info  
-- Detecting C compiler ABI info - done  
-- Detecting C compile features  
-- Detecting C compile features - done  
-- Check for working CXX compiler: /opt/webos-sdk-x86\_64/2.8.g/sysroots/x86\_64-webossdk-linux/usr/share/i686-webos-linux-icecream/bin/i686-webos-linux-g++  
-- Check for working CXX compiler: /opt/webos-sdk-x86\_64/2.8.g/sysroots/x86\_64-webossdk-linux/usr/share/i686-webos-linux-icecream/bin/i686-webos-linux-g++ -- works  
-- Detecting CXX compiler ABI info  
-- Detecting CXX compiler ABI info - done  
-- Detecting CXX compile features  
-- Detecting CXX compile features - done  
-- Configuring done  
-- Generating done  
-- Build files have been written to: /home/jaychou/samples/native-apps/external/com.sample.helloworld/BUILD  
jaychou@jaychou-VirtualBox:~/samples/native-apps/external/com.sample.helloworld/BUILD$ make  
Scanning dependencies of target helloworld  
[50%] Building C object CMakeFiles/helloworld.dir/src/main.c.o  
[100%] Linking C executable ../pkg\_x86/helloworld  
[100%] Built target helloworld

3. 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

4. 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

5. 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

6. install to webos TV 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!

---

<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, 2:57am UTC](https://forum.webosose.org/t/failed-to-install-a-native-app-into-webos-emulator/1370/4 "2021-05-17T02:57:52Z")

</div>

The ares-install -v logs are as follows, it seems that the cause of the error is the same:  
(left-side is arm arch and right-side is x86 arch)

 ![1621220207900.jpeg](https://canada1.discourse-cdn.com/flex031/uploads/developer1/original/1X/5eb75639ec6bbd577de135860483f0a534dece55.png)

---

<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, 3:08am UTC](https://forum.webosose.org/t/failed-to-install-a-native-app-into-webos-emulator/1370/5 "2021-05-17T03:08:35Z")

</div>

Sorry, the whole install log text can't be post here because the length exceeds limit, so I pick up the key info here, hope it can do something helpful:

ares-install verb Session#begin() ssh session event: connected  
ares-install verb Session#run() cmd=/bin/rm -rf /media/developer/temp && /bin/mkdir -p /media/developer/temp, opt={}  
ares-install verb Session#run() exec cmd=/bin/rm -rf /media/developer/temp && /bin/mkdir -p /media/developer/temp, opt={}, err:undefined  
ares-install verb Session#run() event EOF from (cmd: /bin/rm -rf /media/developer/temp && /bin/mkdir -p /media/developer/temp)  
ares-install verb Session#run() event exit code=0, signal=undefined (cmd: /bin/rm -rf /media/developer/temp && /bin/mkdir -p /media/developer/temp)  
ares-install verb Session#run() event close (cmd: /bin/rm -rf /media/developer/temp && /bin/mkdir -p /media/developer/temp)  
Installing package E:\VirtualBox\Ubuntu\share\com.sample.helloworld\_0.0.1\_x86.ipk  
ares-install verb Session#put() uploding into device: /media/developer/temp/com.sample.helloworld\_0.0.1\_x86.ipk from host: E:\VirtualBox\Ubuntu\share\com.sample.helloworld\_0.0.1\_x86.ipk  
ares-install verb Session#put() sftpPut() :: start  
ares-install verb Session#sftpPut() host:E:\VirtualBox\Ubuntu\share\com.sample.helloworld\_0.0.1\_x86.ipk =\> device:/media/developer/temp/com.sample.helloworld\_0.0.1\_x86.ipk  
ares-install verb Error: Received exit code 127 while establishing SFTP session  
ares-install verb Session#put() sftp is not available, attempt transfering file via streamPut  
ares-install verb Session#streamPut() streaming into device:/media/developer/temp/com.sample.helloworld\_0.0.1\_x86.ipk  
ares-install verb Session#run() cmd=/bin/cat \> "/media/developer/temp/com.sample.helloworld\_0.0.1\_x86.ipk", opt={}  
ares-install verb Session#run() exec cmd=/bin/cat \> "/media/developer/temp/com.sample.helloworld\_0.0.1\_x86.ipk", opt={}, err:undefined  
ares-install verb Session#run() resuming input  
ares-install verb Session#run() event EOF from (cmd: /bin/cat \> "/media/developer/temp/com.sample.helloworld\_0.0.1\_x86.ipk")  
ares-install verb Session#run() event exit code=0, signal=undefined (cmd: /bin/cat \> "/media/developer/temp/com.sample.helloworld\_0.0.1\_x86.ipk")  
ares-install verb Session#run() event close (cmd: /bin/cat \> "/media/developer/temp/com.sample.helloworld\_0.0.1\_x86.ipk")  
ares-install verb Session#run() cmd=/bin/ls -l "/media/developer/temp/com.sample.helloworld\_0.0.1\_x86.ipk", opt={}  
ares-install verb Session#run() exec cmd=/bin/ls -l "/media/developer/temp/com.sample.helloworld\_0.0.1\_x86.ipk", opt={}, err:undefined  
ares-install verb Session#run() on data (stdout)  
ares-install verb Session#run() event exit code=0, signal=undefined (cmd: /bin/ls -l "/media/developer/temp/com.sample.helloworld\_0.0.1\_x86.ipk")  
ares-install verb Session#run() event EOF from (cmd: /bin/ls -l "/media/developer/temp/com.sample.helloworld\_0.0.1\_x86.ipk")  
ares-install verb Session#run() event close (cmd: /bin/ls -l "/media/developer/temp/com.sample.helloworld\_0.0.1\_x86.ipk")  
ares-install verb installer#install(): ls -l: -rw-r--r-- 1 develope develope 8694 May 17 02:36 /media/developer/temp/com.sample.helloworld\_0.0.1\_x86.ipk  
ares-install verb installer#install():  
ares-install verb installer#install(): srcMd5: 8d2ca649057f06684e2798a5f2e0e333  
ares-install verb Session#run() cmd=/usr/bin/tail -c 200 "/media/developer/temp/com.sample.helloworld\_0.0.1\_x86.ipk" | /usr/bin/md5sum, opt={}  
ares-install verb Session#run() exec cmd=/usr/bin/tail -c 200 "/media/developer/temp/com.sample.helloworld\_0.0.1\_x86.ipk" | /usr/bin/md5sum, opt={}, err:undefined  
ares-install verb Session#run() on data (stdout)  
ares-install verb installer#install(): dstMd5: 8d2ca649057f06684e2798a5f2e0e333  
ares-install verb installer#install(): srcMd5: 8d2ca649057f06684e2798a5f2e0e333 , dstMd5: 8d2ca649057f06684e2798a5f2e0e333  
ares-install verb Session#run() event exit code=0, signal=undefined (cmd: /usr/bin/tail -c 200 "/media/developer/temp/com.sample.helloworld\_0.0.1\_x86.ipk" | /usr/bin/md5sum)  
ares-install verb Session#run() event EOF from (cmd: /usr/bin/tail -c 200 "/media/developer/temp/com.sample.helloworld\_0.0.1\_x86.ipk" | /usr/bin/md5sum)  
ares-install verb Session#run() event close (cmd: /usr/bin/tail -c 200 "/media/developer/temp/com.sample.helloworld\_0.0.1\_x86.ipk" | /usr/bin/md5sum)  
ares-install verb luna#send() calling: -i luna://com.webos.appInstallService/dev/install '{"id":"com.ares.defaultName","ipkUrl":"/media/developer/temp/com.sample.helloworld\_0.0.1\_x86.ipk","subscribe":true}'  
ares-install verb Session#run() cmd=/usr/bin/luna-send-pub -i luna://com.webos.appInstallService/dev/install '{"id":"com.ares.defaultName","ipkUrl":"/media/developer/temp/com.sample.helloworld\_0.0.1\_x86.ipk","subscribe":true}', opt={}  
ares-install verb Session#run() exec cmd=/usr/bin/luna-send-pub -i luna://com.webos.appInstallService/dev/install '{"id":"com.ares.defaultName","ipkUrl":"/media/developer/temp/com.sample.helloworld\_0.0.1\_x86.ipk","subscribe":true}', opt={}, err:undefined  
ares-install verb Session#run() resuming input  
ares-install verb Session#run() on data (stdout)  
ares-install verb luna#send() JSON line: {"subscribed":true,"returnValue":true}  
ares-install verb luna#send() JSON object: { subscribed: true, returnValue: true }  
ares-install verb installer#install(): lineObj: {"subscribed":true,"returnValue":true}

ares-install verb installer#install(): lineObj: {"id":"com.ares.defaultName","statusValue":13,"details":{"receivedSize":"0","packageId":"com.sample.helloworld","modifiedTime":"","unpackFileSize":"44414","client":"com.webos.lunasendpub-1138","totalSize":"0","verified":false,"progress":100,"installBasePath":"/media/developer","downgrade":true,"paused":false,"simpleStatus":"install","state":"installing : start","update":false,"ipkFile":"/media/developer/temp/com.sample.helloworld\_0.0.1\_x86.ipk"}}  
ares-install verb installer#install(): waiting  
ares-install verb luna#send() err: null value: null  
ares-install verb luna#send() JSON line:  
ares-install verb Session#run() on data (stdout)  
ares-install verb luna#send() JSON line: {"id":"com.ares.defaultName","statusValue":24,"details":{"receivedSize":"0","packageId":"com.sample.helloworld","modifiedTime":"","unpackFileSize":"44414","client":"com.webos.lunasendpub-1138","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\_x86.ipk"}}  
ares-install verb luna#send() JSON object: { id: 'com.ares.defaultName',  
ares-install verb luna#send() statusValue: 24,  
ares-install verb luna#send() details:  
ares-install verb luna#send() { receivedSize: '0',  
ares-install verb luna#send() packageId: 'com.sample.helloworld',  
ares-install verb luna#send() modifiedTime: '',  
ares-install verb luna#send() unpackFileSize: '44414',  
ares-install verb luna#send() client: 'com.webos.lunasendpub-1138',  
ares-install verb luna#send() totalSize: '0',  
ares-install verb luna#send() verified: false,  
ares-install verb luna#send() progress: 100,  
ares-install verb luna#send() errorCode: -5,  
ares-install verb luna#send() installBasePath: '/media/developer',  
ares-install verb luna#send() reason: 'FAILED\_IPKG\_INSTALL',  
ares-install verb luna#send() downgrade: true,  
ares-install verb luna#send() paused: false,  
ares-install verb luna#send() simpleStatus: 'install',  
ares-install verb luna#send() state: 'install failed',  
ares-install verb luna#send() update: false,  
ares-install verb luna#send() ipkFile: '/media/developer/temp/com.sample.helloworld\_0.0.1\_x86.ipk' } }  
ares-install verb installer#install(): lineObj: {"id":"com.ares.defaultName","statusValue":24,"details":{"receivedSize":"0","packageId":"com.sample.helloworld","modifiedTime":"","unpackFileSize":"44414","client":"com.webos.lunasendpub-1138","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\_x86.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

---

<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 17, 2021, 4:56am UTC](https://forum.webosose.org/t/failed-to-install-a-native-app-into-webos-emulator/1370/6 "2021-05-17T04:56:29Z")

</div>

Can you describe more about step 6?

If you try to install OSE's `.ipk` file to TV platform, it won't work.  
webOS OSE and webOS TV are different platform.

---

<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, 5:47am UTC](https://forum.webosose.org/t/failed-to-install-a-native-app-into-webos-emulator/1370/7 "2021-05-17T05:47:01Z")

</div>

Thanks for your reply, I have try to install this ipk to both webOS OSE and webOS TV emulator, neither are working. By the way, the js-app, js-service demo are working, I am very confused now, could you help me please? 🥵

---

<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, 6:00am UTC](https://forum.webosose.org/t/failed-to-install-a-native-app-into-webos-emulator/1370/8 "2021-05-17T06:00:42Z")

</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:43am UTC](https://forum.webosose.org/t/failed-to-install-a-native-app-into-webos-emulator/1370/9 "2021-05-25T00:43:28Z")

</div>

@initialjie ,

This error will be fixed in 2.11.0 release. (2021 June)
