Application build fails with 15.04 framework

Bug #1471384 reported by XiaoGuo, Liu
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Cordova Ubuntu
Fix Released
High
David Barth
webapps-sprint
Fix Released
High
David Barth

Bug Description

I am now trying to create a very basic cordova html 5 application according to the instructions at:

http://cordova.apache.org/docs/en/4.0.0/guide_platforms_ubuntu_index.md.html#Ubuntu%20Platform%20Guide

and also, I build our tutorial example at:

https://developer.ubuntu.com/en/apps/html-5/tutorials/cordova-camera-app-tutorial/

Desktop environment:

liuxg@liuxg:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 15.04
Release: 15.04
Codename: vivid

After adding the icon in the config.xml:

liuxg@liuxg:~/web/hello$ cordova run --device --debug
Running command: /home/liuxg/web/hello/platforms/ubuntu/cordova/run --debug --device
No framework specified. Using default framework: ubuntu-sdk-14.10
Searching for connected devices
List of devices attached
04db17279bc710ba device

Target Device: 04db17279bc710ba
Building Phone Application...

Error: missing armhf chroot
run:
sudo click chroot -a armhf -f ubuntu-sdk-14.10 create
sudo click chroot -a armhf -f ubuntu-sdk-14.10 install cmake libicu-dev:armhf pkg-config qtbase5-dev:armhf qtchooser qtdeclarative5-dev:armhf qtfeedback5-dev:armhf qtlocation5-dev:armhf qtmultimedia5-dev:armhf qtpim5-dev:armhf libqt5sensors5-dev:armhf qtsystems5-dev:armhf

liuxg@liuxg:~/web/hello$ cordova build ubuntu --framework ubuntu-sdk-15.04
Unknown platforms: ubuntu-sdk-15.04

=======================================================================
When I tried to build the cordova camera application at the instruction in the above document, it shows the following. Should we update the sample code as well?

liuxg@liuxg:~/release/ubuntu-sdk-tutorials/html5/html5-tutorial-cordova-camera$ cordova platform add ubuntu
Adding ubuntu project...
Creating a Cordova Project:
 Project Path: /home/liuxg/release/ubuntu-sdk-tutorials/html5/html5-tutorial-cordova-camera/platforms/ubuntu
 Package Name: io.cordova.hellocordova
 Project Name: CordovaCamera

Discovered plugin "org.apache.cordova.camera" in config.xml. Installing to the project
Found deprecated feature entry for org.apache.cordova.camera in config.xml.
Fetching plugin "/home/zaspire/work/cordova-plugin-camera" via npm
npm ERR! addLocal Could not install /home/zaspire/work/cordova-plugin-camera
Fetching from npm failed: ENOENT, stat '/home/zaspire/work/cordova-plugin-camera'

Please update the above two documents to reflect the exact steps to build a click package for a given armhf chroots (15.04/14.10)

Thanks & best regards,
XiaoGuo

Tags: univ-train
Rex Tsai (chihchun)
affects: web → cordova-ubuntu
tags: added: univ-train
Maxim Ermilov (zaspire)
Changed in cordova-ubuntu:
status: New → Invalid
description: updated
Changed in cordova-ubuntu:
status: Invalid → New
description: updated
Maxim Ermilov (zaspire)
Changed in cordova-ubuntu:
status: New → Invalid
David Barth (dbarth)
summary: - Cordova HTML 5 application cannot be successfully compiled and deployed
+ Application build fails with 15.04 framework
Changed in cordova-ubuntu:
status: Invalid → Confirmed
importance: Undecided → High
assignee: nobody → Maxim Ermilov (zaspire)
Changed in webapps-sprint:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Maxim Ermilov (zaspire)
Revision history for this message
Maxim Ermilov (zaspire) wrote :

Not a bug. error message is self explain.

Error: missing armhf chroot

Changed in cordova-ubuntu:
status: Confirmed → Invalid
Changed in webapps-sprint:
status: Confirmed → Invalid
Revision history for this message
David Barth (dbarth) wrote :

The initial bug description indicates that the 15.04 chroot is missing on the developer desktop.

However, once a proper chroot is installed (just using the Ubuntu SDK / QtCreator), then the generated package fails click validation, with the error :

Errors
------
 - security_policy_version_matches_framework (apparmor.json)
 1.2 != 1.3 (ubuntu-sdk-15.04)

Changed in cordova-ubuntu:
status: Invalid → Confirmed
Changed in webapps-sprint:
status: Invalid → Confirmed
description: updated
description: updated
Revision history for this message
Maxim Ermilov (zaspire) wrote :

> then the generated package fails click validation

no, It does not with version from repository (not phablet ppa), it's just a warning.

$~/work/node_modules/.bin/cordova build --device -- --framework ubuntu-sdk-15.04
Running command: /home/zaspire/tmp/1/platforms/ubuntu/cordova/build --device --framework ubuntu-sdk-15.04
Building Phone Application...
1.2 != 1.3 (ubuntu-sdk-15.04)
$

Revision history for this message
XiaoGuo, Liu (liu-xiao-guo) wrote :

When I tried to build my "hello" example, it complained:

liuxg@liuxg:~/web/hello$ cordova build --device -- --framework ubuntu-sdk-15.04
Running command: /home/liuxg/web/hello/platforms/ubuntu/cordova/build --device --framework ubuntu-sdk-15.04
Building Phone Application...
find . -name AutomocInfo.cmake | xargs sed -i 's;AM_QT_MOC_EXECUTABLE .*;AM_QT_MOC_EXECUTABLE "/usr/lib/'$(dpkg-architecture -qDEB_BUILD_MULTIARCH)'/qt5/bin/moc");' FAILED
sed: no input files

Try running the task again with --verbose for more logs.
Example: cordova run -- --verbose
ERROR building one of the platforms: Error: /home/liuxg/web/hello/platforms/ubuntu/cordova/build: Command failed with exit code 1
You may not have the required environment or OS to build this project
Error: /home/liuxg/web/hello/platforms/ubuntu/cordova/build: Command failed with exit code 1
    at ChildProcess.whenDone (/usr/share/cordova-cli/node_modules/cordova-lib/src/cordova/superspawn.js:131:23)
    at ChildProcess.EventEmitter.emit (events.js:98:17)
    at maybeClose (child_process.js:743:16)
    at Process.ChildProcess._handle.onexit (child_process.js:810:5)

David Barth (dbarth)
Changed in cordova-ubuntu:
status: Confirmed → Fix Released
Changed in webapps-sprint:
status: Confirmed → Fix Released
Changed in cordova-ubuntu:
assignee: Maxim Ermilov (zaspire) → David Barth (dbarth)
Changed in webapps-sprint:
assignee: Maxim Ermilov (zaspire) → David Barth (dbarth)
milestone: none → sprint-19
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.