{ "id": "174956", "key": "TIMOB-27866", "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": "21142", "name": "titanium 5.3.0", "archived": false, "released": true, "releaseDate": "2020-10-22" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2021-02-11T12:09:53.000+0000", "created": "2020-04-27T17:16:28.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [ { "id": "20033", "name": "Release 9.0.0", "archived": false, "released": true, "releaseDate": "2020-03-18" } ], "issuelinks": [], "assignee": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "updated": "2021-02-11T12:10:00.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": "13103", "name": "CLI", "description": "Node-based command line interface" } ], "description": "*I'm still trying to figure this one out, but I think the title is the main bits at play*\r\n\r\nh5.Description\r\n\r\nWhen calling clean like so {{ti clean --project-dir }} and the tiapp SDK version and selected SDK version do not match I'm seeing the CLI log an uncaughtError exception that appears to be due to the {{throw new cli.GracefulShutdown();}} (I believe).\r\n\r\nMy current theories are as follows (update: both of these are wrong) :\r\n\r\n* Some form of dependency update causing the {{instanceof}} check [here|https://github.com/appcelerator/titanium/blob/6a41ba410e51a7a3388e4d71c76508d89cac9836/lib/cli.js#L513] to fail because of how JS works with that kinda thing\r\n* Possibly the async.js upgrade borking? Maybe it changed how throw works?\r\n\r\nh5.Steps to reproduce\r\n\r\n1. Change your selected SDK (ti sdk select) and your tiapp SDK\r\n2. Run {{ti clean --project-dir }}\r\n\r\nh5.Actual\r\n\r\nCLI errors after attempting to fork\r\n\r\nh5.Expected\r\n\r\nFork should occur successfully and CLI should not error out", "attachment": [], "flagged": false, "summary": "CLI: ti clean with a forked SDK and --project-dir option exits with GracefulShutdown error", "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": "SDK: 8.X 9.X\r\nTi CLI: 5.X", "comment": { "comments": [ { "id": "455257", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "logs\r\n\r\n{code}\r\n$titanium clean --project-dir /Users/awam/git/testing_apps/kitchensink-v2\r\n [INFO] tiapp.xml set to 8.3.0.GA , but current Titanium SDK set to 8.3.2\r\n [INFO] Forking correct SDK command: \"/Users/awam/.nvm/versions/node/v12.16.2/bin/node\" \"/Users/awam/git/titanium/bin/titanium\" \"clean\" \"--sdk\" \"8.3.0.GA\" \"--project-dir\" \"/Users/awam/git/testing_apps/kitchensink-v2\"\r\n\r\n [LiveView] [GracefulShutdown [Error]]\r\n [DEBUG] Detecting plugins in /Users/awam/git/testing_apps/kitchensink-v2/plugins\r\n [DEBUG] Detected plugin: ti.alloy @ /Users/awam/git/testing_apps/kitchensink-v2/plugins/ti.alloy\r\n [DEBUG] Looking for Titanium plugin id= ti.alloy version= 1.0\r\n [INFO] Found Titanium plugin id= ti.alloy version= 1.0\r\n [DEBUG] Deleting all platform build directories\r\n[DEBUG] Resources directory of /Users/awam/git/testing_apps/kitchensink-v2/app has been emptied\r\n[INFO] Project cleaned successfully in 45ms\r\n{code}", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2020-04-27T17:19:31.000+0000", "updated": "2020-04-27T17:30:03.000+0000" }, { "id": "455297", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "This one was bugging me today so I took a look. I believe it's due to TIMOB-23247 (forking in ti clean never existed before this) and needs to be fixed by copying the {{build.config}} hook in tisdk3fixes in titanium to a {{clean.config}} hook", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2020-04-29T11:32:48.000+0000", "updated": "2020-04-29T11:32:48.000+0000" }, { "id": "457278", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "PR: https://github.com/appcelerator/titanium/pull/402", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2020-10-19T13:04:21.000+0000", "updated": "2020-10-19T13:04:21.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }