{ "id": "122903", "key": "TIMOB-15818", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "15711", "description": "2013 Sprint 24", "name": "2013 Sprint 24", "archived": true, "released": true, "releaseDate": "2013-11-29" }, { "id": "15713", "description": "2013 Sprint 24 Core", "name": "2013 Sprint 24 Core", "archived": true, "released": true, "releaseDate": "2013-11-29" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-11-26T00:56:27.000+0000", "created": "2013-11-25T22:30:54.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "qe-closed-3.2.0", "triage" ], "versions": [ { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2013-12-19T02:19:29.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" }, { "id": "13103", "name": "CLI", "description": "Node-based command line interface" } ], "description": "When building for device in Linux (Ubuntu in this case), the build fails if JAVA_HOME is incorrect.\r\n\r\n{code}\r\n...\r\n\r\n[INFO] Processing JavaScript files\r\n[DEBUG] Copying and minifying /home/chris/Desktop/testapp/Resources/app.js => /home/chris/Desktop/testapp/build/android/assets/app.js\r\n[INFO] Encrypting JavaScript files: /home/chris/.titanium/mobilesdk/linux/3.2.0.v20131125103938/android/titanium_prep.linux64 \"com.appcelerator.testapp\" \"/home/chris/Desktop/testapp/build/android/assets\" \"app.js\" \"_app_props_.json\"\r\n[ERROR] Failed to encrypt JavaScript files\r\n[ERROR] Program launch failed. Unable to locate Java VM. Please set JAVA_HOME environment variable.\r\n{code}\r\n\r\nJAVA_HOME is required for titanium_prep to run. If it's not set, then the CLI will try to autodetect the JAVA_HOME and pass that into titanium_prep. If JAVA_HOME is set and is invalid, titanium_prep will error.\r\n\r\nThis will require changes to both the Titanium SDK and node-appc.\r\n\r\n*node-appc*\r\nnode-appc's jdk detection library needs to improve JAVA_HOME detection, specifically looking for {{JAVA_HOME/lib///libjvm.so}} or {{JAVA_HOME/jre/lib//}}/libjvm.so. If these are not found, then it needs to add an issue JDK_INVALID_JAVA_HOME with description.\r\n\r\n*Titanium SDK*\r\nAndroid build needs to check if JDK_INVALID_JAVA_HOME is set and if so, fail.", "attachment": [], "flagged": false, "summary": "CLI: Android: Incorrect JAVA_HOME passed into titanium_prep", "creator": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "environment": "Ubuntu 13.04\r\nTitanium CLI 3.2.0 (master)\r\nTitanium CLI 3.2.0.v20131125103938", "comment": { "comments": [ { "id": "281290", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Titanium Mobile pull request: https://github.com/appcelerator/titanium_mobile/pull/5024\nnode-appc pull request: https://github.com/appcelerator/node-appc/pull/70", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2013-11-26T00:01:58.000+0000", "updated": "2013-11-26T00:01:58.000+0000" }, { "id": "284807", "author": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "body": "@Chris - I do not see any test instructions in this ticket. Can you please provide with some test steps.", "updateAuthor": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-12-17T18:52:51.000+0000", "updated": "2013-12-17T18:52:51.000+0000" }, { "id": "284891", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "To test this, it's easiest to test on Windows since you can unset the JAVA_HOME and run \"ti config java.home /path/to/jdk\".", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2013-12-17T22:29:26.000+0000", "updated": "2013-12-17T22:29:26.000+0000" }, { "id": "285120", "author": { "name": "sdowse", "key": "sdowse", "displayName": "Samuel Dowse", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed on:\nWindows 7, 8 and 8.1\nCLI: 3.2.0-cr3\nTitanium SDK, build: 3.2.0.v20131812153242\n\nFollowed test instruction from [~cbarber].\nRemoved all instances of the java location from the environment variables.\nRunning ti info -t jdk displayed no jdk was found.\nSet java.home in ti config and the java location was found.\nClosing.", "updateAuthor": { "name": "sdowse", "key": "sdowse", "displayName": "Samuel Dowse", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-19T02:19:13.000+0000", "updated": "2013-12-19T02:19:13.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }