{ "id": "171438", "key": "TIMOB-25920", "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": "20102", "name": "Release 7.1.1", "archived": false, "released": true, "releaseDate": "2018-05-02" } ], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2018-04-02T17:15:44.000+0000", "created": "2018-03-30T19:00:50.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [], "issuelinks": [ { "id": "56423", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "171169", "key": "TIMOB-25799", "fields": { "summary": "Android: Cannot build titanium project with JDK 1.9", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2018-04-03T22:03:13.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" } ], "description": "I am not sure if this is an issue or its just to be like this due to the architecture of CLI & SDK.\r\nWhat I am seeing is if I do not have an SDK with the new JDK 9/10 detection fix in both the CLI & tiapp.xml the build fails. \r\n\r\nh5.Steps to reproduce:\r\n*A. SDK with jdk 9/10 fix selected in the CLI & 7.1.0.GA in tiapp.xml:*\r\n1. Make sure you have CLI core 7.0.3-master.24 installed which has the jdk 9/10 fix.\r\n2. Create an app with SDK 7.1.0.GA (this will have sdk 7.1.0.GA in the tiapp.xml).\r\n3. Make sure you have the SDK with the jdk 9/10 selected in the CLI.\r\n4. Build for android.\r\n5. Build fails with:\r\n{code}\r\n[INFO] tiapp.xml set to 7.1.0.GA, but current Titanium SDK set to 7.2.0.v20180328162916\r\n[INFO] Forking correct SDK command: \"/usr/local/bin/node\" \"/Users/lchoudhary/.appcelerator/install/7.0.3-master.24/package/node_modules/titanium/lib/titanium.js\" \"build\" \"--sdk\" \"7.1.0.GA\" \"--no-banner\" \"--config-file\" \"/var/folders/pk/k370szc955l_9w7hsb9nfvg00000gq/T/build-1522435392553.json\" \"--platform\" \"android\" \"--project-dir\" \"/Users/lchoudhary/Desktop/lokitest\" \"--log-level\" \"trace\" \"--android-sdk\" \"/Users/lchoudhary/Desktop/android-sdk-macosx\" \"--target\" \"emulator\"\r\n\r\n[ERROR] JDK (Java Development Kit) not found.\r\n[ERROR] If you already have installed the JDK, verify your JAVA_HOME environment variable is correctly set.\r\n[ERROR] The JDK can be downloaded and installed from http://appcelerator.com/jdk.\r\n{code}\r\n\r\n*B. 7.1.0.GA in selected in CLI & SDK with jdk 9/10 fix in the tiapp.xml:*\r\n1. Make sure you have CLI core 7.0.3-master.24 installed which has the jdk 9/10 fix.\r\n2. Select 7.1.0.GA in CLI & have sdk with jdk9/10 fix in tiapp.xml.\r\n3. Build for android.\r\n4. Build fails with:\r\n{code}\r\n[ERROR] JDK (Java Development Kit) not found.\r\n[ERROR] If you already have installed the JDK, verify your JAVA_HOME environment variable is correctly set.\r\n[ERROR] The JDK can be downloaded and installed from http://appcelerator.com/jdk.\r\n{code}\r\n\r\nExpected result:\r\nFor A : Probably fail\r\nFor B : Probably should not fail with JDK not found error.", "attachment": [], "flagged": false, "summary": "Android: Build fails if SDK with JDK 9/10 fix is not selected in CLI & tiapp.xml (only if ran from CLI)", "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": "Studio Ver: 5.1.0\r\nSDK Ver: 7.2.0.v20180328162916. 7.1.0.GA\r\nOS Ver: 10.13.2\r\nXcode Ver: Xcode 9.2\r\nAppc NPM: 4.2.12\r\nAppc CLI: 7.0.3-master.24\r\nDaemon Ver: 1.0.1\r\nTi CLI Ver: 5.1.0\r\nAlloy Ver: 1.11.0\r\nNode Ver: 8.9.1\r\nNPM Ver: 5.5.1\r\nJava Ver: 10\r\n", "closedSprints": [ { "id": 1019, "state": "closed", "name": "2018 Sprint 07 Tooling", "startDate": "2018-03-25T21:58:00.558Z", "endDate": "2018-04-08T21:58:00.000Z", "completeDate": "2018-04-08T17:56:19.404Z", "originBoardId": 219 } ], "comment": { "comments": [ { "id": "436136", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "The fix is in node-appc@0.2.44, though the latest version is node-appc@0.2.45. Both the master and 7_1_X branch of titanium_mobile reference node-appc@0.2.43. Someone needs to update the node-appc version and then this will be fixed.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2018-03-30T19:27:22.000+0000", "updated": "2018-03-30T19:27:22.000+0000" }, { "id": "436139", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Ti SDK master PR: https://github.com/appcelerator/titanium_mobile/pull/9975\r\nTi SDK 7_1_X PR: https://github.com/appcelerator/titanium_mobile/pull/9976", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2018-03-30T20:22:32.000+0000", "updated": "2018-04-02T16:28:59.000+0000" }, { "id": "436144", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~cbarber], I think master & 7_1_X are not referencing node-appc@0.2.45 because https://github.com/appcelerator/titanium_mobile/pull/9964 & https://github.com/appcelerator/titanium_mobile/pull/9965 are not merged yet.\r\nWhen I tested I manually copied node-appc@0.2.45 in to the node modules & I am still seeing this failure.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-03-30T22:03:54.000+0000", "updated": "2018-03-30T22:03:54.000+0000" }, { "id": "436147", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "[~lchoudhary] Apparently my PR's are void as https://github.com/appcelerator/titanium_mobile/pull/9964 solves it. I was assigned as the reviewer for 9964, but I'm not certain I'm in a place to test it properly.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2018-03-31T00:21:37.000+0000", "updated": "2018-03-31T00:21:37.000+0000" }, { "id": "436178", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "This should be resolved by https://github.com/appcelerator/titanium_mobile/pull/9964 and https://github.com/appcelerator/titanium_mobile/pull/9965.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2018-04-02T16:41:14.000+0000", "updated": "2018-04-02T16:41:14.000+0000" }, { "id": "436181", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Scenario A is unsupported. If the tiapp references a Titanium SDK that doesn't support JDK 9/10, then an error is expected.\r\n\r\nScenario B is basically a dupe of TIMOB-25799 and will be fixed once it's merged.\r\n\r\nResolving this ticket as not valid.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2018-04-02T17:15:44.000+0000", "updated": "2018-04-02T17:15:44.000+0000" }, { "id": "436187", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-04-02T18:57:26.000+0000", "updated": "2018-04-02T18:57:26.000+0000" }, { "id": "436188", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "[~lchoudhary] How can this be? You tested and merged https://github.com/appcelerator/titanium_mobile/pull/9965 which would require you to do scenario B. Are you sure you're testing with the correct 7_1_X CI build?", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2018-04-02T19:02:40.000+0000", "updated": "2018-04-02T19:02:40.000+0000" }, { "id": "436195", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~cbarber], I tested the PR https://github.com/appcelerator/titanium_mobile/pull/9965 for the detection & build failure issue due to dexer, with having the SDK with the fix at both places CLI as well as tiapp.xml. \r\nBut with scenario B it is still failing. It looks more like the CLI forking not working properly?(I might be wrong though).", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-04-02T22:44:36.000+0000", "updated": "2018-04-02T22:49:28.000+0000" }, { "id": "436196", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "I can't build the SDK for whatever reason and so I cannot reproduce the problem. Try running a build by explicitly passing in {{\\-\\-sdk 7.1.1}}.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2018-04-02T22:57:51.000+0000", "updated": "2018-04-02T22:58:10.000+0000" }, { "id": "436197", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Ok so on further testing, I see the failure only if I build using the CLI. If from studio then scenario B works fine.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-04-02T22:58:37.000+0000", "updated": "2018-04-02T22:58:37.000+0000" }, { "id": "436198", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~cbarber], I checked & passing the {{--sdk}} actually works. Studio also passed the flag when the build runs from studio. \r\nSo would it mean something goofy with the CLI ?", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-04-02T23:22:51.000+0000", "updated": "2018-04-02T23:23:34.000+0000" }, { "id": "436245", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Did get things cleared here. Thanks [~fmiao].\r\nWe need to use an SDK with JDK 9 support if we only have JDK 9.0.4 installed. If we have JDK 8 & 9 installed the it takes JDK 8 & builds fine.\r\nCLI uses the active (selected) SDK in CLI to start the build process (before fork) & if the active SDK does not support JDK 9 then the build is expected to fail.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-04-03T17:39:04.000+0000", "updated": "2018-04-03T17:39:04.000+0000" } ], "maxResults": 13, "total": 13, "startAt": 0 } } }