{ "id": "171508", "key": "DAEMON-252", "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": "20774", "description": "", "name": "Appc Daemon 2.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": "2019-04-01T06:31:45.000+0000", "created": "2018-04-12T20:17:21.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [ { "id": "19959", "description": "", "name": "Appc Daemon 1.1.0", "archived": false, "released": true, "releaseDate": "2018-04-09" }, { "id": "20044", "description": "", "name": "Appc Daemon 1.0.1", "archived": false, "released": true, "releaseDate": "2017-12-15" } ], "issuelinks": [], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2019-04-01T06:31:45.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": "15049", "name": "appcd", "description": "Bootstrap, appcd CLI commands (start, stop, restart, exec, logcat, config, status)" }, { "id": "15623", "name": "appcd-plugin-genymotion" } ], "description": "Does not appear to be a regression. Seen in 1.0.1 as well.\r\n\r\nh5.Steps to reproduce:\r\n1. Add a 2-3 genymotion emulator in the genymotion app.\r\n2. Run {{appc appcd exec /android/latest/info/emulators}}.\r\n3. Repeat the steps after deleting 2-3 genymotion emulators.\r\n\r\nh5.Actual result:\r\n1. Appc daemon does not pick up the changes to genymotion immediately for both addition & deletion scenarios but, does after an {{appc appcd restart}}.\r\n\r\nh5.Expected results:\r\n1. Appc daemon should pickup the changes immediately.", "attachment": [], "flagged": false, "summary": "Android: Daemon does not detect addition/deletion of genymotion emulator's immediately", "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.1.1.v20180406141533\r\nOS Ver: 10.13.4\r\nXcode Ver: Xcode 9.3\r\nAppc NPM: 4.2.13-2\r\nAppc CLI: 7.0.3-master.38, 7.0.3-master.34\r\nDaemon Ver: 1.1.1. 1.0.1\r\nTi CLI Ver: 5.1.0\r\nAlloy Ver: 1.12.0\r\nNode Ver: 8.9.1\r\nNPM Ver: 5.5.1\r\nJava Ver: 9.0.4\r\nGenymotion : 2.12.0", "closedSprints": [ { "id": 1058, "state": "closed", "name": "2018 Sprint 16 SDK", "startDate": "2018-07-29T22:26:06.486Z", "endDate": "2018-08-12T22:26:00.000Z", "completeDate": "2018-08-13T17:38:16.757Z", "originBoardId": 114 }, { "id": 1124, "state": "closed", "name": "2019 Sprint 8", "startDate": "2019-03-31T18:03:00.000Z", "endDate": "2019-04-12T18:03:00.000Z", "completeDate": "2019-04-12T19:04:50.175Z", "originBoardId": 114 }, { "id": 1022, "state": "closed", "name": "2018 Sprint 08 Tooling", "startDate": "2018-04-08T20:59:49.603Z", "endDate": "2018-04-22T20:59:00.000Z", "completeDate": "2018-04-22T22:51:45.780Z", "originBoardId": 219 } ], "comment": { "comments": [ { "id": "436866", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "This is maybe a dupe of DAEMON-249, reviewing the code of the plugin the changes never got published due to a linting issue (fixed in https://github.com/appcelerator/appcd-plugin-android/pull/12) I will publish 1.1.1 soon", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2018-04-13T13:11:59.000+0000", "updated": "2018-04-13T13:13:29.000+0000" }, { "id": "436886", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "I believe the root of the problem is a race condition. Whenever the VM's config is changed (about 9 times), the code would constantly watch and unwatch the same paths over and over again. This mechanically worked, but I believe pending fs events were never being delivered. Changing the the code to track by path->subscription-id instead of subscription-id->path allows quicker checks to see if the path is already being watched.\r\n\r\nNote that the Android and iOS plugins will likely suffer from the same problem. I've created DAEMON-253 to investigate.\r\n\r\nhttps://github.com/appcelerator/appcd-plugin-genymotion/pull/8", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2018-04-13T22:05:00.000+0000", "updated": "2018-04-13T22:05:00.000+0000" }, { "id": "447136", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Update: I cannot reproduce this with the latest and greatest code, however there are still underlying issues to address:\r\n\r\n1. {{@appcd/plugin-android}} currently watches the {{VirtualBox.xml}} for changes, then redetects emulators.\r\n\r\nThis does not take into account whether VirtualBox or Genymotion is installed, though this isn't a huge issue as it's only a small amount of wasted resources.\r\n\r\nThe bigger problem {{@appcd/plugin-android}} only detects new VMs, deleted VMs, and renamed VMs. It does not detect property changes such as DPI changes. {{@appcd/plugin-genymotion}} does.\r\n\r\nIt seems silly to copy the logic from {{@appcd/plugin-genymotion}} to {{@appcd/plugin-android}}, but it's completely valid for {{@appcd/plugin-android}} to depend on {{@appcd/plugin-genymotion}}.\r\n\r\nThe proper fix for this ticket would be to remove the fs watching of {{VirtualBox.xml}} and subscribe to {{/genymotion/1.x/info/emulators}} and use that event to trigger re-detection, which will be cached anyways in {{androidlib}}. Note that {{@appcd/plugin-android}} needs to properly handle a 404 from {{/genymotion}} should something go wrong, which it shouldn't.\r\n\r\n2. {{@appcd/plugin-android}} does unnecessary unsubscribe/resubscribe causing events to slip through the cracks. This is what DAEMON-253 aims to fix.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2019-03-25T22:46:13.000+0000", "updated": "2019-03-25T22:46:13.000+0000" }, { "id": "447386", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Fixed by https://github.com/appcelerator/appc-daemon-plugins/pull/4.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2019-04-01T06:19:33.000+0000", "updated": "2019-04-01T06:19:33.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }