{ "id": "173644", "key": "TIMOB-27091", "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": [], "resolution": { "id": "11", "description": "Is not a bug in our product", "name": "Not Our Bug" }, "resolutiondate": "2019-06-22T12:53:52.000+0000", "created": "2019-05-19T15:51:41.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [], "versions": [ { "id": "20412", "name": "Release 8.1.0", "archived": false, "released": true, "releaseDate": "2019-08-13" } ], "issuelinks": [], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-08-11T01:34:32.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "We recently updated to latest master and noticed that our Android app (tested inside Simulator) sometimes randomly crashes with the following error:\r\n{code}\r\n[INFO] Project built successfully in 47s 475ms\r\n\r\n[INFO] TiApplication: (main) [164,164] Analytics have been disabled\r\n[INFO] TiApplication: (main) [175,339] Titanium Javascript runtime: v8\r\n[DEBUG] TiAnimationModule: (main) [29,368] inside onAppCreate\r\n[INFO] TiRootActivity: (main) [0,0] checkpoint, on root activity create, savedInstanceState: null\r\n[INFO] TiRootActivity: (main) [0,0] checkpoint, on root activity resume. activity = io.lambus.app.LambusActivity@e50663d\r\n[ERROR] TiAssetHelper: Error while reading asset \"Resources/ti.main.js\":\r\n[ERROR] TiAssetHelper: java.io.FileNotFoundException: Resources/ti.main.js\r\n[ERROR] TiAssetHelper: \tat android.content.res.AssetManager.nativeOpenAsset(Native Method)\r\n[ERROR] TiAssetHelper: \tat android.content.res.AssetManager.open(AssetManager.java:744)\r\n[ERROR] TiAssetHelper: \tat android.content.res.AssetManager.open(AssetManager.java:721)\r\n[ERROR] TiAssetHelper: \tat org.appcelerator.kroll.util.KrollAssetHelper.readAsset(KrollAssetHelper.java:165)\r\n[ERROR] TiAssetHelper: \tat org.appcelerator.titanium.TiLaunchActivity.loadScript(TiLaunchActivity.java:99)\r\n[ERROR] TiAssetHelper: \tat org.appcelerator.titanium.TiRootActivity.loadScript(TiRootActivity.java:466)\r\n[ERROR] TiAssetHelper: \tat org.appcelerator.titanium.TiLaunchActivity.onResume(TiLaunchActivity.java:183)\r\n[ERROR] TiAssetHelper: \tat org.appcelerator.titanium.TiRootActivity.onResume(TiRootActivity.java:485)\r\n[ERROR] TiAssetHelper: \tat android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1412)\r\n[ERROR] TiAssetHelper: \tat android.app.Activity.performResume(Activity.java:7292)\r\n[ERROR] TiAssetHelper: \tat android.app.ActivityThread.performResumeActivity(ActivityThread.java:3776)\r\n[ERROR] TiAssetHelper: \tat android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3816)\r\n[ERROR] TiAssetHelper: \tat android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:51)\r\n[ERROR] TiAssetHelper: \tat android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:145)\r\n[ERROR] TiAssetHelper: \tat android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)\r\n[ERROR] TiAssetHelper: \tat android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)\r\n[ERROR] TiAssetHelper: \tat android.os.Handler.dispatchMessage(Handler.java:106)\r\n[ERROR] TiAssetHelper: \tat android.os.Looper.loop(Looper.java:193)\r\n[ERROR] TiAssetHelper: \tat android.app.ActivityThread.main(ActivityThread.java:6669)\r\n[ERROR] TiAssetHelper: \tat java.lang.reflect.Method.invoke(Native Method)\r\n[ERROR] TiAssetHelper: \tat com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)\r\n[ERROR] TiAssetHelper: \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)\r\n[ERROR] TiAssetHelper: Error while reading asset \"Resources/ti.main.js\":\r\n[ERROR] TiAssetHelper: java.io.FileNotFoundException: Resources/ti.main.js\r\n[ERROR] TiAssetHelper: \tat android.content.res.AssetManager.nativeOpenAsset(Native Method)\r\n[ERROR] TiAssetHelper: \tat android.content.res.AssetManager.open(AssetManager.java:744)\r\n[ERROR] TiAssetHelper: \tat android.content.res.AssetManager.open(AssetManager.java:721)\r\n[ERROR] TiAssetHelper: \tat org.appcelerator.kroll.util.KrollAssetHelper.readAsset(KrollAssetHelper.java:165)\r\n[ERROR] TiAssetHelper: \tat org.appcelerator.kroll.runtime.v8.V8Runtime.nativeRunModule(Native Method)\r\n[ERROR] TiAssetHelper: \tat org.appcelerator.kroll.runtime.v8.V8Runtime.doRunModule(V8Runtime.java:162)\r\n[ERROR] TiAssetHelper: \tat org.appcelerator.kroll.KrollRuntime.runModule(KrollRuntime.java:207)\r\n[ERROR] TiAssetHelper: \tat org.appcelerator.titanium.TiLaunchActivity.loadScript(TiLaunchActivity.java:99)\r\n[ERROR] TiAssetHelper: \tat org.appcelerator.titanium.TiRootActivity.loadScript(TiRootActivity.java:466)\r\n[ERROR] TiAssetHelper: \tat org.appcelerator.titanium.TiLaunchActivity.onResume(TiLaunchActivity.java:183)\r\n[ERROR] TiAssetHelper: \tat org.appcelerator.titanium.TiRootActivity.onResume(TiRootActivity.java:485)\r\n[ERROR] TiAssetHelper: \tat android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1412)\r\n[ERROR] TiAssetHelper: \tat android.app.Activity.performResume(Activity.java:7292)\r\n[ERROR] TiAssetHelper: \tat android.app.ActivityThread.performResumeActivity(ActivityThread.java:3776)\r\n[ERROR] TiAssetHelper: \tat android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3816)\r\n[ERROR] TiAssetHelper: \tat android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:51)\r\n[ERROR] TiAssetHelper: \tat android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:145)\r\n[ERROR] TiAssetHelper: \tat android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)\r\n[ERROR] TiAssetHelper: \tat android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)\r\n[ERROR] TiAssetHelper: \tat android.os.Handler.dispatchMessage(Handler.java:106)\r\n[ERROR] TiAssetHelper: \tat android.os.Looper.loop(Looper.java:193)\r\n[ERROR] TiAssetHelper: \tat android.app.ActivityThread.main(ActivityThread.java:6669)\r\n[ERROR] TiAssetHelper: \tat java.lang.reflect.Method.invoke(Native Method)\r\n[ERROR] TiAssetHelper: \tat com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)\r\n[ERROR] TiAssetHelper: \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)\r\n[ERROR] v8:\r\n[ERROR] v8:\r\n[ERROR] v8: #\r\n[ERROR] v8: # Fatal error in , line 0\r\n[ERROR] v8: #\r\n[ERROR] v8: unreachable code\r\n[ERROR] v8:\r\n[ERROR] v8: #\r\n[ERROR] v8: #\r\n[ERROR] v8: #\r\n[ERROR] v8: #FailureMessage Object: 0xffd60bb0\r\n{code}\r\nWe have no idea how to workaround this right now.", "attachment": [], "flagged": false, "summary": "Android: App crashes on incremental build in SDK 8.1.0+", "creator": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "closedSprints": [ { "id": 1146, "state": "closed", "name": "2019 Sprint 13", "startDate": "2019-06-18T06:36:49.723Z", "endDate": "2019-07-01T06:36:00.000Z", "completeDate": "2019-07-01T16:45:24.126Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "448614", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~jquick] [~gmathews] Quick ping so this does not slip into 8.1.0.GA", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-05-23T12:02:50.000+0000", "updated": "2019-05-23T12:02:50.000+0000" }, { "id": "448626", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This may be due to javascript assets not being copied correctly during build. I have a suspicion that VSCode's file watcher may be causing this issue?", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-05-23T20:07:06.000+0000", "updated": "2019-05-23T20:07:06.000+0000" }, { "id": "448628", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "I suspect it being a regression from the V8 snapshot API we applied to our fork. The whole build works fine but then crashes on the launch, even if no file changed if i recall that correctly", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-05-23T20:23:47.000+0000", "updated": "2019-05-23T20:23:47.000+0000" }, { "id": "448839", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I'm unable to reproduce this issue.\r\n\r\nI've tried building your Lambus app to the Android emulator multiple times via command line...\r\n{{appc run -p android}}\r\n\r\nAs well as via LiveView via the below...\r\n{{appc run -p android --liveview}}\r\n\r\nI'm curious if a VS Code plugin you are using (perhaps ours?) might be wrongly locking files randomly under the project's \"build\" directory. If you close VS Code and build via the command line, then does the issue go away?\r\n\r\nI've built your Lambus app while VS Code had the whole app project folder opened. I even selected the \"ti.main.js\" file under the \"build\" directory and did a build via the command line. The incremental build was working fine for me. Although the only plugin I have installed is ESLint at the moment.\r\n", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-06-05T02:19:41.000+0000", "updated": "2019-06-05T02:19:41.000+0000" }, { "id": "448840", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I've also tried incremental builds to the Android emulator with VS Code and our Titanium plugin installed. I still can't reproduce this issue. Hmm...", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-06-05T02:54:20.000+0000", "updated": "2019-06-05T02:54:20.000+0000" }, { "id": "448869", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~hknoechel], try quitting out of VS Code and then do multiple builds. This is to prove that VS Code is locking files and is the root cause of the build issues.\r\n\r\nIf closing VS Code *does* solve the issue, then it sounds like the solution is to tell VS Code to ignore your project's \"build\" and \"Resources\" directory. You can do that by creating the following directory and file under your project...\r\n\r\n_/.vscode/settings.json_\r\n{code:json}\r\n{\r\n\t\"files.exclude\": {\r\n\t\t\"**/build\": true,\r\n\t\t\"**/Resources\": true\r\n\t},\r\n\t\"search.exclude\": {\r\n\t\t\"**/build\": true,\r\n\t\t\"**/Resources\": true\r\n\t},\r\n\t\"files.watcherExclude\": {\r\n\t\t\"**/build\": true,\r\n\t\t\"**/Resources\": true\r\n\t},\r\n}\r\n{code}\r\n\r\nWhen you re-open your project in VS Code, the \"build\" and \"Resources\" directory will no longer appear under the VS Code's \"Explorer\" panel. This means it'll no longer monitor for file changes there, which might be locking files.\r\n\r\n*Side Note:* For everyone else reading this, ignoring the \"Resources\" directory only makes sense for Alloy projects. You would never want to do this for a Classic app project.\r\n", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-06-05T18:43:29.000+0000", "updated": "2019-06-05T18:45:31.000+0000" }, { "id": "449282", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "This is not an issue anymore.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-06-22T12:53:52.000+0000", "updated": "2019-06-22T12:53:52.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }