{ "id": "171089", "key": "DAEMON-233", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12519", "key": "DAEMON", "name": "Appcelerator Daemon" }, "fixVersions": [ { "id": "19959", "description": "", "name": "Appc Daemon 1.1.0", "archived": false, "released": true, "releaseDate": "2018-04-09" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-03-09T22:34:06.000+0000", "created": "2018-02-12T21:30:27.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [ { "id": "19959", "description": "", "name": "Appc Daemon 1.1.0", "archived": false, "released": true, "releaseDate": "2018-04-09" } ], "issuelinks": [], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2018-03-09T22:34:06.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "15607", "name": "appcd-fswatcher" } ], "description": "h5.Description\r\n\r\nWhen calling {{appcd exec /android/latest/info}} on master of appc-daemon, the plugin fails to start with, {{Failed to activate plugin (code 6)}}, I've tracked this back through the rabbit hole and there seems to be a few things that are at play here.\r\n\r\nI trimmed the plugin down to only do NDK detection to hopefully make the logs a little easier to read (although I had to bump the buffer to 2.5k from 1k)\r\n\r\n* Walking through the changes in appcd-detect seem to show [this commit|https://github.com/appcelerator/appc-daemon/commit/829d533762fbd03e52b0e9da88276992b5da6a30#diff-1174f97bf7dc72538ff82fe34bbc5c65] as being the commit that made this start failing\r\n* androidlib lists [/opt|https://github.com/appcelerator/androidlib/blob/82cfefac30aa5bb92fc5b7865a1ccbcf27c4eacd/src/ndk.js#L17] as a place to scan for the NDKs, this doesn't seem to exist on my system so when we do a real on this path [https://github.com/appcelerator/appc-daemon/blob/93841cf2c52a82151f061a1f1ea38317efbb8ecf/packages/appcd-detect/src/detect-engine.js#L228] it becomes {{/}}\r\n* From the logs in the attached appcd dump it then seems that the detect engine then starts to watch all subdirectories of / (timestamp is around {{2018-02-12T17:13:39.535Z}})\r\n* Some of the directories underneath the root throw an EACCESS on fs.watch, I've logged this in the logs around timestamp 2018-02-12T17:13:39.554Z, which cause the plugin to start\r\n\r\nI believe we should be handling EACCESS errors in the fswatcher", "attachment": [ { "id": "64842", "filename": "appcd-dump.json", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2018-02-12T21:26:48.000+0000", "size": 2129097, "mimeType": "application/json" } ], "flagged": false, "summary": "appcd-fswatcher: EACESS error when starting appcd-plugin-android", "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, "closedSprints": [ { "id": 1007, "state": "closed", "name": "2018 Sprint 05 Tooling", "startDate": "2018-02-25T17:48:46.503Z", "endDate": "2018-03-11T16:48:00.000Z", "completeDate": "2018-03-11T22:21:44.972Z", "originBoardId": 219 } ], "comment": { "comments": [ { "id": "435061", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "PR: https://github.com/appcelerator/appc-daemon/pull/289", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2018-03-01T16:12:15.000+0000", "updated": "2018-03-01T16:12:15.000+0000" }, { "id": "435100", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "[~cbarber] This PR deals with the access permissions I was seeing but https://github.com/appcelerator/appc-daemon/commit/829d533762fbd03e52b0e9da88276992b5da6a30#diff-1174f97bf7dc72538ff82fe34bbc5c65 is still causing something funky. Calling the android info endpoint takes a while and watches a ton of stuff, see the below output of appcd exec /appcd/status/fs after calling android info.\r\n\r\n{code: title=Daemon 1.0.1}\r\n{\r\n \"nodes\": 51,\r\n \"fswatchers\": 47,\r\n \"watchers\": 27\r\n}\r\n{code}\r\n\r\n{code: title=Daemon 1.1.0}\r\n{\r\n \"fswatchers\": 3607,\r\n \"nodes\": 5491,\r\n \"watchers\": 290\r\n{code}\r\n\r\nOn OSX calling appcd exec /android/latest/info takes around 44 seconds for me on 1.1.0, vs 2 seconds on 1.0.1\r\n", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2018-03-02T12:21:11.000+0000", "updated": "2018-03-02T12:21:11.000+0000" }, { "id": "435410", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "To test, run {{gulp coverage}} from the {{packages/appcd-fswatcher}} directory on all platforms. Then on Linux and macOS, run {{sudo gulp coverage}}.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2018-03-09T04:30:21.000+0000", "updated": "2018-03-09T04:30:21.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }