{ "id": "167919", "key": "ALOY-1565", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "11113", "key": "ALOY", "name": "Alloy", "projectCategory": { "id": "10400", "description": "Tools for developing applications", "name": "Tooling" } }, "fixVersions": [ { "id": "19575", "name": "Alloy 1.10.1", "archived": false, "released": true }, { "id": "19783", "name": "CLI Release 6.3.0", "archived": false, "released": true } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-05-25T20:59:00.000+0000", "created": "2017-05-25T18:07:00.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [ { "id": "19558", "name": "Alloy 1.10.0", "archived": false, "released": true, "releaseDate": "2017-05-19" } ], "issuelinks": [ { "id": "54973", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "167949", "key": "TIMOB-24884", "fields": { "summary": "CLI: Minification produces invalid code", "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": "None", "id": "6" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "updated": "2017-10-10T17:41:17.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": [], "description": "h5.Description\r\n\r\n*I consider this a blocker as we will possibly be breaking applications in a minor version, and this also leads to uncertainties as to whether there are anymore issues like this*\r\n\r\n\r\nWhen building kitchensink-v2 for iOS with the latest Alloy, the app will error out when launching. With the below error\r\n\r\n*Notes*\r\n\r\n* The error only occurs when using TiCore, using JSCore the error is not seen. It seems the older TiCore will choke on the code, Android seems to be fine, Windows is currently untested\r\n* The error appears to be caused by the move to babylon/babili\r\n* The code that errors is\r\n\r\n{code}\r\nvar res = { milliseconds: 0, months: 0, months: other.month() - base.month() + 12 * (other.year() - base.year())\r\n };\r\n{code}\r\n\r\n{code}\r\n[ERROR] Script Error {\r\n[ERROR] line = 2058;\r\n[ERROR] message = \"Attempted to redefine property 'months'.\";\r\n[ERROR] sourceURL = \"file:///Users/eharris/Library/Developer/CoreSimulator/Devices/DAE930F3-D384-42DE-B14D-F2EB6DDFE798/data/Containers/Bundle/Application/8EB66036-ABCE-4A04-B5B7-8BF05FDBBECC/KitchenSink.app/alloy/moment.js\";\r\n[ERROR] stack = \"require@[native code]\\nfile:///Users/eharris/Library/Developer/CoreSimulator/Devices/DAE930F3-D384-42DE-B14D-F2EB6DDFE798/data/Containers/Bundle/Application/8EB66036-ABCE-4A04-B5B7-8BF05FDBBECC/KitchenSink.app/log.js:3:21\\nglobal code@file:///Users/eharris/Library/Developer/CoreSimulator/Devices/DAE930F3-D384-42DE-B14D-F2EB6DDFE798/data/Containers/Bundle/Application/8EB66036-ABCE-4A04-B5B7-8BF05FDBBECC/KitchenSink.app/log.js:24:70\\nrequire@[native code]\\nController@file:///Users/eharris/Library/Developer/CoreSimulator/Devices/DAE930F3-D384-42DE-B14D-F2EB6DDFE798/data/Containers/Bundle/Application/8EB66036-ABCE-4A04-B5B7-8BF05FDBBECC/KitchenSink.app/alloy/controllers/controls/index.js:45:19\\ncreateController@file:///Users/eharris/Library/Developer/CoreSimulator/Devices/DAE930F3-D384-42DE-B14D-F2EB6DDFE798/data/Containers/Bundle/Application/8EB66036-ABCE-4A04-B5B7-8BF05FDBBECC/KitchenSink.app/alloy.js:306:52\\nController@file:///Users/eharris/Library/Developer/CoreSimulator/Devices/DAE930F3-D384-42DE-B14D-F2EB6DDFE798/data/Containers/Bundle/Application/8EB66036-ABCE-4A04-B5B7-8BF05FDBBECC/KitchenSink.app/alloy/controllers/index.js:31:67\\ncreateController@file:///Users/eharris/Library/Developer/CoreSimulator/Devices/DAE930F3-D384-42DE-B14D-F2EB6DDFE798/data/Containers/Bundle/Application/8EB66036-ABCE-4A04-B5B7-8BF05FDBBECC/KitchenSink.app/alloy.js:306:52\\nglobal code@file:///Users/eharris/Library/Developer/CoreSimulator/Devices/DAE930F3-D384-42DE-B14D-F2EB6DDFE798/data/Containers/Bundle/Application/8EB66036-ABCE-4A04-B5B7-8BF05FDBBECC/KitchenSink.app/app.js:7:23\";\r\n[ERROR] }\r\n[ERROR] Script Error Module \"alloy/moment.js\" failed to leave a valid exports object\r\n[ERROR] Script Error Module \"log.js\" failed to leave a valid exports object\r\n[DEBUG] Application booted in 891.723990 ms\r\n[ERROR] ErrorController is up. ABORTING showing of modal controller\r\n[ERROR] ErrorController is up. ABORTING showing of modal controller\r\n{code}\r\n\r\nh5.Steps to reproduce\r\n\r\n# Install titanium and alloy {{npm i alloy -g && npm i titanium -g}}\r\n# Get kitchensink v2, from https://github.com/appcelerator/kitchensink-v2\r\n# Build the project using {{ti build -p ios}}\r\n\r\nh5.Actual\r\n\r\nThe app will error out\r\n\r\nh5.Expected\r\n\r\n\r\nThe app should not error out\r\n", "attachment": [], "flagged": false, "summary": "KitchenSink v2 errors out on iOS", "creator": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "subtasks": [], "reporter": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "environment": "Alloy: 1.10.0\r\nKitchenSink v2: https://github.com/appcelerator/kitchensink-v2\r\niOS 10.3 Simulator", "comment": { "comments": [ { "id": "420454", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Uglify would keep the code as is\r\n\r\n{code}\r\nvar res = {\r\n milliseconds: 0,\r\n months: 0\r\n };\r\n res.months = other.month() - base.month() + 12 * (other.year() - base.year());\r\n{code}", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2017-05-25T18:17:05.000+0000", "updated": "2017-05-25T18:17:05.000+0000" }, { "id": "420462", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "https://github.com/appcelerator/alloy/pull/826", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2017-05-25T20:48:27.000+0000", "updated": "2017-05-25T20:48:27.000+0000" }, { "id": "420463", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "[~eharris] Note that this likely means minified builds on the SDK for iOS will have the same issue, as we're using babili to minify there. I think a quick investigation and another ticket likely need to be opened there. I suppose we'll just have to check if we're building for iOS on TiCore *and* minifying and if so, find some way to minify other than babili...", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2017-05-25T20:50:39.000+0000", "updated": "2017-05-25T20:50:39.000+0000" }, { "id": "420469", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "Looks like it's {{babel-plugin-transform-inline-consecutive-adds}}.", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2017-05-25T21:44:31.000+0000", "updated": "2017-05-25T21:44:31.000+0000" }, { "id": "420496", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "[~cwilliams] unsurprisingly you're right TIMOB-24736", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2017-05-26T13:02:29.000+0000", "updated": "2017-05-26T13:02:29.000+0000" }, { "id": "428900", "author": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Node Version: 6.10.3\r\nNPM Version: 3.10.10\r\nMac OS: 10.13\r\nAppc CLI: 6.3.0-master.7\r\nAlloy 1.10.5\r\nAppc CLI NPM: 4.2.9\r\nTitanium SDK version: 6.2.2\r\n\r\nVerified that kitchensink-v2 runs correctly with the above environment.\r\n", "updateAuthor": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-10-10T17:41:12.000+0000", "updated": "2017-10-10T17:41:12.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }