{ "id": "149151", "key": "TIMOB-19400", "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": "16925", "description": "WatchKit Support--all going into 5.0 now", "name": "Release 5.0.0", "archived": true, "released": true, "releaseDate": "2015-09-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-08-31T22:19:11.000+0000", "created": "2015-06-25T23:05:24.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "qe-4.1.0" ], "versions": [ { "id": "16723", "description": "Windows Platform Support, ListView updates, Vector overlays in maps", "name": "Release 4.1.0", "archived": false, "released": true, "releaseDate": "2015-07-08" } ], "issuelinks": [], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2015-09-30T18:54:47.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": "10207", "name": "Tooling" } ], "description": "h5.Description:\r\n1. On a clean machine setup appcelerator studio.\r\n2. Studio will download java 1.7.0_XX, node js & appc CLI.\r\n3. Login to studio & download android SDK from with in studio.\r\n4. Create an app & run it on android device/emulator.\r\n\r\nh5.Actual Results:\r\n1. The build fails as it looks for java 1.6 & errors as it can't find it with the errors below:\r\n{code}\r\n[INFO] Encrypting JavaScript files: /Users/qetester/Library/Application Support/Titanium/mobilesdk/osx/4.0.0.GA/android/titanium_prep.macos \"com.app.test1\" \"/Users/qetester/Documents/Appcelerator_Studio_Workspace/test1/build/android/assets\" \"alloy/CFG.js\" \"app.js\" \"alloy/backbone.js\" \"alloy/constants.js\" \"alloy/controllers/BaseController.js\" \"alloy/controllers/index.js\" \"alloy/styles/index.js\" \"alloy/sync/localStorage.js\" \"alloy/sync/properties.js\" \"alloy/sync/sql.js\" \"alloy/underscore.js\" \"alloy/widget.js\" \"alloy.js\" \"ti.cloud.js\" \"_app_props_.json\"\r\n[ERROR] Failed to encrypt JavaScript files\r\n[ERROR] No Java runtime present, requesting install.\r\n \r\nTRACE | titanium exited with exit code 1\r\nERROR | Error: ti run exited with error code 1\r\n at ChildProcess. (/Users/qetester/.appcelerator/install/4.0.2/package/node_modules/appc-cli-titanium/plugins/run.js:84:66)\r\n at ChildProcess.emit (events.js:98:17)\r\n at Process.ChildProcess._handle.onexit (child_process.js:820:12)\r\n{code}\r\n2. We also get a dialog saying \"This application needs java 6\" & clicking on more info button on the dialog it takes us to the java 1.6 download page on apple's website.\r\n*NOTE* - Attached screenshot for reference.\r\n\r\nh5.Expected Result:\r\n1. The build should succeed with java 1.7.0_X.", "attachment": [ { "id": "55961", "filename": "Screen Shot 2015-06-25 at 3.58.30 PM.png", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-06-25T23:07:15.000+0000", "size": 26044, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: Build fails if Java 1.6 is not installed", "creator": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Environment:\r\nAppc Studio : 4.1.0.201506232351\r\nTi SDK : 4.1.0.v20150625095733\r\nTi CLI : 4.0.1\r\nAlloy : 1.6.2\r\nMAC Yosemite : 10.10.3\r\nAppc NPM : 4.0.1\r\nAppc CLI : 4.0.2\r\nNode: v0.10.37\r\nNexus 5 - Android 5.1.1\r\nJava Version Installed : 1.7.0_80 (Installed by studio)", "closedSprints": [ { "id": 464, "state": "closed", "name": "2015 Sprint 17 SDK", "startDate": "2015-08-15T00:30:59.243Z", "endDate": "2015-08-29T00:30:00.000Z", "completeDate": "2015-08-31T08:10:47.969Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "358809", "author": { "name": "killroyboy", "key": "killroyboy", "displayName": "Dan Wilson", "active": true, "timeZone": "America/Denver" }, "body": "I'm running into this issue as well. I recently upgraded to El Capitan DP5. Previously, I just installed the second version of Java (which is pretty lame to have 2 versions on your system). But El Cap doesn't have Java 1.6.\r\n\r\nI even tried the --skip-js-minify, but that doesn't help either.\r\n\r\n{code}\r\nOperating System\r\n Name = Mac OS X\r\n Version = 10.11\r\n Architecture = 64bit\r\n # CPUs = 8\r\n Memory = 17179869184\r\n\r\nNode.js\r\n Node.js Version = 0.10.37\r\n npm Version = 1.4.28\r\n\r\nTitanium CLI\r\n CLI Version = 4.1.3\r\n\r\nTitanium SDK\r\n SDK Version = 4.1.0.GA\r\n SDK Path = /Users/danwilson/Library/Application Support/Titanium/mobilesdk/osx/4.1.0.GA\r\n Target Platform = android\r\n\r\nCommand\r\n /usr/local/bin/node /Users/danwilson/git/ultimatehang/node_modules/grunt-titanium/node_modules/.bin/titanium build --log-level info --platform android --project-dir . --no-banner --no-progress-bars --no-prompt --build-only --deploy-type production --target dist-playstore --keystore ~/Documents/Codeality/Ultimate Hang/Keystore/UltimateHang --store-password **** --alias UltimateHang --output-dir /Users/danwilson/tmp --skip-js-minify\r\n{code}", "updateAuthor": { "name": "killroyboy", "key": "killroyboy", "displayName": "Dan Wilson", "active": true, "timeZone": "America/Denver" }, "created": "2015-08-02T01:17:25.000+0000", "updated": "2015-08-02T01:17:25.000+0000" }, { "id": "358810", "author": { "name": "killroyboy", "key": "killroyboy", "displayName": "Dan Wilson", "active": true, "timeZone": "America/Denver" }, "body": "Just realized I didn't add the actual error:\r\n\r\n{code}\r\nINFO] : \b\b \b Processing JavaScript files\r\n[INFO] : \b\b \b Encrypting JavaScript files: /Users/danwilson/Library/Application Support/Titanium/mobilesdk/osx/4.1.0.GA/android/titanium_prep.macos \"com.codeality.UltimateHang\" \"/Users/danwilson/git/ultimatehang/build/android/assets\" \"app.js\" \"lib/Hang.js\" \"lib/WindowAnim.js\" \"lib/lodash.min.js\" \"ui/AboutView.js\" \"ui/AboutWindow.js\" \"ui/ApplicationWindow.js\" \"ui/ClinometerView.js\" \"ui/ClinometerWindow.js\" \"ui/MainView.js\" \"ui/QuickstartView.js\" \"ui/QuickstartWindow.js\" \"ui/SettingsView.js\" \"ui/SettingsWindow.js\" \"ti.cloud.js\" \"_app_props_.json\"\r\n[ERROR] : \b\b \bFailed to encrypt JavaScript files\r\n[ERROR] : \b\b \bJavaVM: Failed to load JVM: /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/bundle/Libraries/libserver.dylib\r\n[ERROR] : \b\b \bJavaVM FATAL: Failed to load the jvm library.\r\n[ERROR] : \b\b \bProgram launch failed.\r\n{code}", "updateAuthor": { "name": "killroyboy", "key": "killroyboy", "displayName": "Dan Wilson", "active": true, "timeZone": "America/Denver" }, "created": "2015-08-02T02:45:22.000+0000", "updated": "2015-08-02T02:45:22.000+0000" }, { "id": "361640", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "node-appc PR: https://github.com/appcelerator/node-appc/pull/111", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2015-08-29T02:13:51.000+0000", "updated": "2015-08-29T02:13:51.000+0000" }, { "id": "361816", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "node-appc PR 2: https://github.com/appcelerator/node-appc/pull/112", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2015-08-31T18:48:37.000+0000", "updated": "2015-08-31T18:48:37.000+0000" }, { "id": "361836", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "tisdk PR: https://github.com/appcelerator/titanium_mobile/pull/7102", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2015-08-31T22:15:05.000+0000", "updated": "2015-08-31T22:15:05.000+0000" }, { "id": "361838", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "After a bunch of testing and research, I've concluded that titanium_prep uses certain JNI APIs that are only available in JDK 1.6. They do not exist in 1.7 or 1.8. I tried changing how titanium_prep links with the JDK, but the result was always the same. So, I've greatly improved node-appc's JDK detection code to find all JDKs, then implemented a check in the Android build to ensure JDK 1.6 is installed when building on OS X. About as good as it gets.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2015-08-31T22:19:12.000+0000", "updated": "2015-08-31T22:19:12.000+0000" }, { "id": "361847", "author": { "name": "killroyboy", "key": "killroyboy", "displayName": "Dan Wilson", "active": true, "timeZone": "America/Denver" }, "body": "I'm not sure this is a proper solution. It's my understanding that JDK 1.6 will not be supported going forward. It's not available from Oracle and Apple is discontinuing support in El Cap. So checking to ensure it is installed won't do us any good if there is no way to get it installed in the (near) future.", "updateAuthor": { "name": "killroyboy", "key": "killroyboy", "displayName": "Dan Wilson", "active": true, "timeZone": "America/Denver" }, "created": "2015-08-31T23:12:31.000+0000", "updated": "2015-08-31T23:12:31.000+0000" }, { "id": "361848", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "We can't replace these APIs with alternates?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-08-31T23:15:15.000+0000", "updated": "2015-08-31T23:15:15.000+0000" }, { "id": "361849", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "[~killroyboy] I know. This is not ideal. We have a replacement for titanium_prep which will be remove this dependency on JDK 1.6, however it currently requires the Appcelerator CLI and it requires that all users of your app have an Internet connection when the app is first launch. You can read more about this here: https://docs.appcelerator.com/platform/latest/#!/guide/tiapp.xml_and_timodule.xml_Reference (search for \"appc-sourcecode-encryption-policy\").\r\n\r\n[~ingo] Nope. The JNI APIs we need have been deprecated. No idea when they'll be removed, but they are still present in Java 1.8's headers. There's nothing that we can easily do aside from a major rewrite of titanium_prep... or I suppose we could distribute the JDK 1.6 with Titanium. Probably a bad idea. I think the correct solution here is to rewrite titanium_prep using a combination of Node.js and C++. The overall architecture would be essentially the same.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2015-08-31T23:26:46.000+0000", "updated": "2015-08-31T23:26:46.000+0000" }, { "id": "362215", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "node-appc PR 3: https://github.com/appcelerator/node-appc/pull/113", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2015-09-03T21:47:52.000+0000", "updated": "2015-09-03T21:47:52.000+0000" }, { "id": "362223", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "TiSDK master PR 2: https://github.com/appcelerator/titanium_mobile/pull/7122\r\nTiSDK 5_0_X PR: https://github.com/appcelerator/titanium_mobile/pull/7123", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2015-09-03T22:14:34.000+0000", "updated": "2015-09-03T22:14:34.000+0000" }, { "id": "363559", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix on a clean machine.\r\nIf you don't have java 1.6 the build fails & the error logs has the link to download java 1.6.\r\nInstalling java 1.6 from the link fixes the issue & the android build are successfull.\r\n\r\nClosing.\r\n\r\nEnvironment:\r\nAppc studio : 4.1.1.201507141126\r\nTi SDK : 5.0.0.v20150910052019\r\nAppc NPM : 4.1.1\r\nAppc Core : 4.1.3\r\nMac Yosemite : 10.10.4 \r\nAndroid Device : Nexus 5.1.1\r\nNode : 0.10.37", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-09-10T23:12:30.000+0000", "updated": "2015-09-10T23:13:02.000+0000" }, { "id": "365448", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "[~cwilliams] On OS X, we do not {{dlopen()}} the jvm library. It's dynamically linked at compile time. I converted titanium_prep to use the same code path as Linux and Windows so that it used {{dlopen()}} to dynamically link at runtime and had the exact same results.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2015-09-30T18:36:23.000+0000", "updated": "2015-09-30T18:36:23.000+0000" } ], "maxResults": 18, "total": 18, "startAt": 0 } } }