{ "id": "174514", "key": "AC-6453", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": null, "resolutiondate": null, "created": "2019-12-06T12:41:08.000+0000", "labels": [ "android", "ios" ], "versions": [], "issuelinks": [], "assignee": { "name": "aislam", "key": "aislam", "displayName": "Aminul Islam", "active": false, "timeZone": "Etc/GMT-6" }, "updated": "2019-12-20T16:04:49.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": "14552", "name": "Appcelerator CLI", "description": "Please enter tickets related to Tooling and the CLI here" }, { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "Compilation is broken resulting in an \"app.js not found error\" for iOS and Android:\r\n\r\n[ERROR] \"app.js\" not found\r\n[ERROR] Ensure the \"app.js\" file exists in your project's \"Resources\" directory.\r\n\r\nThis is when running for example:\r\n$appc ti build -p ios --target simulator --device-id 8691784A-146E-4125-9CC4-255885FF9195\r\nOr\r\n$appc ti build -p android --target emulator --device-id 'Samsung Galaxy S9 - 8.0'\r\n\r\n(The same thing happens using just $ti build....)\r\n\r\nappc version = 7.1.2\r\nTi SDK = 8.3.0\r\nXcode = 10.2.1\r\nOS X 10.14.6\r\n\r\nIt seems to be related to some weird caching that is going on during compilation. I don't know what is cached or how it works exactly. It started to happen randomly, probably between switching between git branches. One minute working fine then next not. So some odd things. Quitting the terminal window and opening a new one it started working once and then stopped working again. Another weird thing I discovered is that creating a new project in a completely different directory - with just the default template app created with $appc new - but with the same project name and id - the compile was still broken with the same \"app.js not found error\". So even though this was a completely fresh app in a completely different directory, as it had the same id as the previously broken app, it still thought it was compiling the old app. Obviously some caching going on here. Long story short I created a completely new fresh project and then copied over the stuff I needed into that project and this worked. But the \"ti build\" process is broken somehow and this is an impractical solution for something which keeps happening regularly now.\r\n\r\nI spoke to @ewanharris Ewan Harris on Ti Slack and he suggested it might be a caching problem with XCode and to try to clear out ~/Library/Developer/Xcode/DerivedData but obviously this is only for iOS and not Android (this did not solve the problem).\r\n\r\nEach time I compile I ensure that the build folder and Resources folder are cleared.\r\n\r\nI have seen this \"app.js not found error\" been reported previously with people who are trying to compile directly with XCode, but I am not doing that and am only using appc ti build and as I said same problem with Android.", "attachment": [], "flagged": false, "summary": "Compilation broken with \"app.js not found\" error", "creator": { "name": "icecandyent", "key": "icecandyent", "displayName": "Simon Buckingham", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "icecandyent", "key": "icecandyent", "displayName": "Simon Buckingham", "active": true, "timeZone": "Europe/London" }, "environment": "appc version = 7.1.2\r\nTi SDK = 8.3.0\r\nXcode = 10.2.1\r\nOS X 10.14.6", "comment": { "comments": [ { "id": "453059", "author": { "name": "icecandyent", "key": "icecandyent", "displayName": "Simon Buckingham", "active": true, "timeZone": "Europe/London" }, "body": "I think this may be due to the disappearance of alloy.js in plugins > ti.alloy > hooks.\r\nNo idea why this file disppears (I have taken over a 5 year old project so no idea how it was built).", "updateAuthor": { "name": "icecandyent", "key": "icecandyent", "displayName": "Simon Buckingham", "active": true, "timeZone": "Europe/London" }, "created": "2019-12-06T15:38:20.000+0000", "updated": "2019-12-06T15:38:20.000+0000" }, { "id": "453260", "author": { "name": "aislam", "key": "aislam", "displayName": "Aminul Islam", "active": false, "timeZone": "Etc/GMT-6" }, "body": "Hello!\r\nThanks for reaching out! What does *appc ti setup check* tell you about setup? Please share full setup check log with with us. \r\nAlso try following steps:\r\n1. Create a new project (appc new -t app --id -n )\r\n2. Replace only App folder with your old app folder.\r\n3. Now build your project with [CLI | http://docs.appcelerator.com/platform/latest/#!/guide/Appcelerator_CLI_Tasks-section-src-43306725_AppceleratorCLITasks-AndroidEmulator ]\r\n\r\nIf this won't help set console log level to trace and share full error log.\r\n\r\nRegards,\r\nAminul Islam", "updateAuthor": { "name": "aislam", "key": "aislam", "displayName": "Aminul Islam", "active": false, "timeZone": "Etc/GMT-6" }, "created": "2019-12-20T16:04:18.000+0000", "updated": "2019-12-20T16:04:18.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }