{ "id": "174165", "key": "TIMOB-27415", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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": [], "resolution": null, "resolutiondate": null, "created": "2019-09-23T20:55:49.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [ "cb-tooling" ], "versions": [], "issuelinks": [], "assignee": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "updated": "2020-01-30T23:23:17.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "13103", "name": "CLI", "description": "Node-based command line interface" } ], "description": "h5.Description\r\n\r\nWe've seen a number of people having issues around the titanium_prep executables stripped of their executable permissions (AC-6376, and slack). We should try and check these on download just incase they get lost somehow\r\n\r\nThis is fixable by running \r\n\r\niOS: {{chmod +x ~/Library/Application\\ Support/Titanium/mobilesdk/osx//iphone/titanium_prep}}\r\nAndroid: {{chmod +x /~/Library/Application\\ Support/Titanium/mobilesdk/osx//android/titanium_prep.macos}}\r\n\r\nThis commonly manifests in the following kind of errors\r\n\r\n{{\\[ERROR\\] Error: spawn EACCES}}\r\n{code}\r\n2019-09-23T17:39:47.317Z | ERROR | An uncaught exception was thrown!\r\nCannot read property 'replace' of undefined\r\n2019-09-23T17:39:47.318Z | ERROR | Cannot read property 'replace' of undefined\r\n{code}\r\n{code}\r\n[ERROR] : TypeError: Cannot read property 'on' of undefined\r\n{code}", "attachment": [], "flagged": false, "summary": "CLI: Check and fix executable permissions on titanium_prep binaries on install", "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": null, "comment": { "comments": [ { "id": "451580", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "cc [~cb1kenobi], what're your thoughts on this?\r\n\r\nIt's a bandaid fix, but this seems to be random. It happens to people who install via Studio, the CLI itself, and even VS Code (which uses titaniumlib and not the CLI to install). I've had absolutely no luck in reproducing, and due to the low number of people that seem to have hit this I don't see it being an issue with the actual SDK we're shipping but maybe something on the machines sniping them", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2019-09-23T21:00:25.000+0000", "updated": "2019-09-23T21:00:25.000+0000" }, { "id": "451581", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "There are issues [years ago] with Node-based zip libraries with preserving the executable flag for both creating and extracting zip files which is part of the reason we use adm-zip (and recently yauzl) to unzip and archiver to zip.\r\n\r\nI would be very interested in inspected the actual SDK zip files to ensure the executables are indeed flags as executable as well as look into titaniumlib's SDK extraction to see what's going on.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2019-09-23T21:08:36.000+0000", "updated": "2019-09-23T21:08:36.000+0000" }, { "id": "451582", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "The zip file itself is definitely fine (I checked it), and https://github.com/appcelerator/titanium_mobile/pull/10835 fixes any errors in copying over from Jenkins. After some further work I was able to repro in atom/vs code, we use titaniumlib there so I guess that's my port of call tomorrow to see whether that is extracting ok", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2019-09-23T21:12:50.000+0000", "updated": "2019-09-23T21:12:50.000+0000" }, { "id": "451583", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "It's unfortunate that the executable flag is not be honored and that PR was necessary.\r\n\r\nAre you using the latest titaniumlib in the Atom/VS Code plugins? Perhaps you're dealing with a bugged, outdated dependency?", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2019-09-23T21:16:22.000+0000", "updated": "2019-09-23T21:16:22.000+0000" }, { "id": "451586", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "[~cbarber], we're using 1.x but I can confirm I'm seeing the same on 2.x", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2019-09-23T21:29:40.000+0000", "updated": "2019-09-23T21:29:40.000+0000" }, { "id": "451587", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Probably yauzl https://github.com/thejoshwolfe/yauzl/issues/101", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2019-09-23T21:38:25.000+0000", "updated": "2019-09-23T21:38:25.000+0000" }, { "id": "451588", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "OK, I follow now. So we need to get the entry's file \"mode\" and set it after writing it. We do not do this currently in titaniumlib, we just continue to the next entry: https://github.com/appcelerator/titaniumlib/blob/master/src/util.js#L133.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2019-09-23T21:44:32.000+0000", "updated": "2019-09-23T21:44:32.000+0000" }, { "id": "451709", "author": { "name": "a.marcone", "key": "a.marcone", "displayName": "Alberto Marcone", "active": true, "timeZone": "Europe/Berlin" }, "body": "I'm one of the 'lucky' ones. I got this error by downloading the sdk from the cli and manually (stopped using Studio years ago). Chmod +x didn't help. I really don't know how to fix it.", "updateAuthor": { "name": "a.marcone", "key": "a.marcone", "displayName": "Alberto Marcone", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-09-30T16:12:41.000+0000", "updated": "2019-09-30T16:12:51.000+0000" }, { "id": "451712", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Here's the titaniumlib PR that fixes the Atom plugin and Titanium daemon plugin: https://github.com/appcelerator/titaniumlib/pull/17.\r\n\r\nnode-appc (used by {{ti sdk install}}) should already be good to go: https://github.com/appcelerator/node-appc/blob/master/lib/zip.js#L59.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2019-09-30T16:25:15.000+0000", "updated": "2019-09-30T16:30:19.000+0000" }, { "id": "451713", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "[~a.marcone], can you paste the error you're seeing into this ticket so we can try to help solve it", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2019-09-30T16:29:15.000+0000", "updated": "2019-09-30T16:29:15.000+0000" }, { "id": "451738", "author": { "name": "a.marcone", "key": "a.marcone", "displayName": "Alberto Marcone", "active": true, "timeZone": "Europe/Berlin" }, "body": "I actually dug a little deeper on the issue, and it's not the same thing\r\n\r\n{code}\r\n[INFO] Creating assets image set\r\n[LiveView] TypeError: Cannot read property 'replace' of undefined\r\n at iOSBuilder. (/Users/xxx/Library/Application Support/Titanium/mobilesdk/osx/8.3.0.v20190927113609/iphone/cli/commands/_build.js:5772:51)\r\n at Array.forEach ()\r\n{code}\r\n\r\nand the replace mentioned is actually about assets:\r\n{code}\r\nconst imageSet = {\r\n\tidiom: !match[4] ? 'universal' : match[3].replace('~', ''),\r\n\tfilename: imageName + '.' + imageExt,\r\n\tscale: !match[3] ? '1x' : match[3].replace('@', '')\r\n};\r\n{code}\r\n\r\nI worked aroud that and it's all good now. Thank you", "updateAuthor": { "name": "a.marcone", "key": "a.marcone", "displayName": "Alberto Marcone", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-10-01T08:31:27.000+0000", "updated": "2019-10-01T08:31:27.000+0000" }, { "id": "453329", "author": { "name": "timpoulsen", "key": "timpoulsen", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/Havana" }, "body": "I seem to have encountered the same issue as Alberto (same error as his Oct 1 comment). I removed all graphics that contained a tilde (~) in their name and now my app will build.\r\n\r\nTiSDK 8.3.0.GA, Alloy 1.14.5, Titanium CLI v5.2.2, and with Node I tried with versions 12.13, 10.18, and 8.17. Per a recommendation in TiSlack, I downgraded from XCode 11.3 to 11.2 but that didn't help. ", "updateAuthor": { "name": "timpoulsen", "key": "timpoulsen", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/Havana" }, "created": "2019-12-28T23:36:03.000+0000", "updated": "2019-12-28T23:36:03.000+0000" } ], "maxResults": 12, "total": 12, "startAt": 0 } } }