{ "id": "169711", "key": "TIMOB-25242", "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": "17609", "description": "", "name": "Release 7.0.0", "archived": false, "released": true, "releaseDate": "2017-12-07" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-11-15T22:27:12.000+0000", "created": "2017-09-07T01:19:35.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [], "issuelinks": [ { "id": "55966", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "169778", "key": "TIMOB-25290", "fields": { "summary": "Error on running application in Android O", "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" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "56022", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "169434", "key": "TIMOB-25081", "fields": { "summary": "Android: Uncaught TypeError: Cannot use 'in' operator to search for 'Resources/alloy' in null.", "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" } }, "priority": { "name": "None", "id": "6" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "56120", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "170221", "key": "AC-5345", "fields": { "summary": "Android: When Main Window closed by exitOnClose=true, if try to relaunch,`AssetManager is null`error is shown.", "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" } }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-11-16T00:10:41.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": "Customer is facing to the following problem.\r\n\r\nSometimes our app hangs when launched on android. It doesn't happen every time, but sometimes it will happen fairly frequently on a given device (as much as 30-40% of the time).\r\n\r\nIt appears that this exception is to blame\r\n{code}\r\n09-01 14:29:06.650 5042 5042 E TiExceptionHandler: (main) [21,21] ----- Titanium Javascript Runtime Error -----\r\n09-01 14:29:06.650 5042 5042 E TiExceptionHandler: (main) [0,21] - In ti:/module.js:622,21\r\n09-01 14:29:06.650 5042 5042 E TiExceptionHandler: (main) [0,21] - Message: Uncaught TypeError: Cannot use 'in' operator to search for 'Resources/TitanUp/TitanUp' in null\r\n09-01 14:29:06.650 5042 5042 E TiExceptionHandler: (main) [0,21] - Source: return filename in fileIndex;\r\n09-01 14:29:06.651 5042 5063 E V8Exception: Exception occurred at ti:/module.js:622: Uncaught TypeError: Cannot use 'in' operator to search for 'Resources/TitanUp/TitanUp' in null\r\n09-01 14:29:06.675 2366 2377 D InputDispatcher: Focus entered window: 5042\r\n{code}\r\n\r\n(TitanUp is a commonjs module belong to customer)\r\n\r\nAttached is the full adb log for the process in question.\r\nAnd customer believe that is probably a bug inside the Titanium runtime.\r\n\r\nCustomer also complain that \"How could our Javascript trigger an exception like this so early in the application's life cycle? It looks like a problem *resolving* the path to our library, which suggests that it is inside the Titanium runtime.\"\r\n\r\nPlease advise.", "attachment": [ { "id": "63214", "filename": "log-bad-proc.txt", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2017-09-07T01:18:40.000+0000", "size": 9035, "mimeType": "text/plain" } ], "flagged": false, "summary": "Android: V8Exception on launch", "creator": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "subtasks": [], "reporter": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "environment": "SDK 6.1.2.GA\r\nAndroid 7.0, phone: Samsung Galaxy S7 edge", "comment": { "comments": [ { "id": "427801", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile/pull/9422", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-09-12T15:18:53.000+0000", "updated": "2017-09-12T15:18:53.000+0000" }, { "id": "428138", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "body": "Any update on this? I see there is PR. Will this fix the problem, Which version will be expected about this fix.", "updateAuthor": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2017-09-20T01:10:27.000+0000", "updated": "2017-09-20T01:10:27.000+0000" }, { "id": "428637", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "[~gmathews]\r\nSo the full log shows the real root cause. That failure to load the JS file via require is actually a symptom here, not the root cause of the issue.\r\nLook at lines 2 and 5 here:\r\n{code}\r\n09-01 14:29:06.409 5042 5042 I TiRootActivity: (main) [0,0] checkpoint, on root activity create, savedInstanceState: null\r\n09-01 14:29:06.553 5042 5063 E TiAssetHelper: AssetManager is null, can't read asset: app.json\r\n09-01 14:29:06.577 5042 5063 W TiApplication: (KrollRuntimeThread) [168,168] Registering module with name already in use.\r\n09-01 14:29:06.607 5042 5063 I TiAPI : [app] startup; requiring minimal modules to get window open\r\n09-01 14:29:06.612 5042 5063 E TiAssetHelper: AssetManager is null, can't read asset: index.json\r\n09-01 14:29:06.626 5042 5042 D SensorManager: registerListener :: 1, LSM6DS3 Accelerometer, 200000, 0, \r\n09-01 14:29:06.629 5042 5042 I TiRootActivity: (main) [0,0] checkpoint, on root activity resume. activity = com.mylocaltv.wral.WralNewsActivity@ed5c8a3\r\n09-01 14:29:06.649 5042 5042 D InputTransport: Input channel constructed: fd=106\r\n09-01 14:29:06.649 5042 5042 D ViewRootImpl@dedd4cf[WralNewsActivity]: setView = DecorView@c34de5c[WralNewsActivity] touchMode=true\r\n09-01 14:29:06.650 5042 5042 E TiExceptionHandler: (main) [21,21] ----- Titanium Javascript Runtime Error -----\r\n09-01 14:29:06.650 5042 5042 E TiExceptionHandler: (main) [0,21] - In ti:/module.js:622,21\r\n09-01 14:29:06.650 5042 5042 E TiExceptionHandler: (main) [0,21] - Message: Uncaught TypeError: Cannot use 'in' operator to search for 'Resources/TitanUp/TitanUp' in null\r\n09-01 14:29:06.650 5042 5042 E TiExceptionHandler: (main) [0,21] - Source: \treturn filename in fileIndex;\r\n09-01 14:29:06.651 5042 5063 E V8Exception: Exception occurred at ti:/module.js:622: Uncaught TypeError: Cannot use 'in' operator to search for 'Resources/TitanUp/TitanUp' in null\r\n{code}\r\n\r\nSo the real issue here is that we're hitting this: https://github.com/appcelerator/titanium_mobile/blob/master/android/runtime/common/src/java/org/appcelerator/kroll/util/KrollAssetHelper.java#L57\r\n\r\nIt looks like {{KrollAssetHelper.init()}} is getting called too late, which is called via {{KrollRuntime.init()}}, which is called during the app's {{onCreate()}} lifecycle callback. My best guess here is that we should be moving that init call up higher in that method: https://github.com/appcelerator/titanium_mobile/blob/master/android/templates/build/App.java#L48\r\n", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2017-10-02T15:05:09.000+0000", "updated": "2017-10-02T15:05:09.000+0000" }, { "id": "429266", "author": { "name": "davidbenko", "key": "davidbenko", "displayName": "David Benko", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I'm experiencing this issue as well, SDK 6.2.2 Android 7.0 and 8.0", "updateAuthor": { "name": "davidbenko", "key": "davidbenko", "displayName": "David Benko", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-10-18T23:36:51.000+0000", "updated": "2017-10-18T23:36:51.000+0000" }, { "id": "429823", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "body": "Any update on this?\r\n", "updateAuthor": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2017-10-30T13:04:08.000+0000", "updated": "2017-10-30T13:04:08.000+0000" }, { "id": "430060", "author": { "name": "engross", "key": "engross", "displayName": "Dongwoo Gim", "active": true, "timeZone": "Asia/Seoul" }, "body": "Any update?", "updateAuthor": { "name": "engross", "key": "engross", "displayName": "Dongwoo Gim", "active": true, "timeZone": "Asia/Seoul" }, "created": "2017-11-03T12:21:10.000+0000", "updated": "2017-11-03T12:21:10.000+0000" }, { "id": "430061", "author": { "name": "engross", "key": "engross", "displayName": "Dongwoo Gim", "active": true, "timeZone": "Asia/Seoul" }, "body": "Then exitOnClose set true, after close main window on Oreo.\r\n\r\n\r\n{code:java}\r\n[DEBUG] Window: Window is closed normally.\r\n\r\n[INFO] TiRootActivity: (main) [0,0] checkpoint, on root activity create, savedInstanceState: null\r\n[ERROR] TiAssetHelper: AssetManager is null, can't read asset: app.json\r\n[WARN] TiApplication: (main) [225,225] Registering module with name already in use.\r\n[ERROR] TiAssetHelper: AssetManager is null, can't read asset: Resources/app.js\r\n[ERROR] TiAssetHelper: AssetManager is null, can't read asset: Resources/app.js\r\n{code}\r\n", "updateAuthor": { "name": "engross", "key": "engross", "displayName": "Dongwoo Gim", "active": true, "timeZone": "Asia/Seoul" }, "created": "2017-11-03T12:24:11.000+0000", "updated": "2017-11-03T12:35:39.000+0000" }, { "id": "430062", "author": { "name": "engross", "key": "engross", "displayName": "Dongwoo Gim", "active": true, "timeZone": "Asia/Seoul" }, "body": "And other situation on Oreo.\r\n{code:java}\r\n[ERROR] TiAssetHelper: AssetManager is null, can't read asset: Resources/alloy/controllers/imageList.js\r\n{code}\r\n", "updateAuthor": { "name": "engross", "key": "engross", "displayName": "Dongwoo Gim", "active": true, "timeZone": "Asia/Seoul" }, "created": "2017-11-03T12:26:39.000+0000", "updated": "2017-11-03T12:35:27.000+0000" }, { "id": "430063", "author": { "name": "engross", "key": "engross", "displayName": "Dongwoo Gim", "active": true, "timeZone": "Asia/Seoul" }, "body": "And this error on Nougat.\r\n\r\n{code:java}\r\n[INFO] TiRootActivity: (main) [0,0] checkpoint, on root activity create, savedInstanceState: null\r\n[ERROR] TiAssetHelper: AssetManager is null, can't read asset: app.json\r\n[WARN] TiApplication: (main) [147,147] Registering module with name already in use.\r\n[ERROR] TiAssetHelper: AssetManager is null, can't read asset: index.json\r\n[ERROR] TiExceptionHandler: (main) [24,171] ----- Titanium Javascript Runtime Error -----\r\n[ERROR] TiExceptionHandler: (main) [0,171] - In ti:/module.js:622,21\r\n[ERROR] TiExceptionHandler: (main) [0,171] - Message: Uncaught TypeError: Cannot use 'in' operator to search for 'Resources/alloy' in null\r\n[ERROR] TiExceptionHandler: (main) [0,171] - Source: \treturn filename in fileIndex;\r\n[ERROR] V8Exception: Exception occurred at ti:/module.js:622: Uncaught TypeError: Cannot use 'in' operator to search for 'Resources/alloy' in null\r\n[INFO] TiRootActivity: (main) [0,0] checkpoint, on root activity resume. activity = com.puruni.app.PuruniActivity@d558338\r\n{code}\r\n", "updateAuthor": { "name": "engross", "key": "engross", "displayName": "Dongwoo Gim", "active": true, "timeZone": "Asia/Seoul" }, "created": "2017-11-03T12:39:18.000+0000", "updated": "2017-11-03T12:39:18.000+0000" }, { "id": "430074", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~engross] Thanks for the feedback, the {{AssetManager}} issue is solved by TIMOB-25324.", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-11-03T16:24:37.000+0000", "updated": "2017-11-03T16:24:37.000+0000" }, { "id": "430075", "author": { "name": "engross", "key": "engross", "displayName": "Dongwoo Gim", "active": true, "timeZone": "Asia/Seoul" }, "updateAuthor": { "name": "engross", "key": "engross", "displayName": "Dongwoo Gim", "active": true, "timeZone": "Asia/Seoul" }, "created": "2017-11-03T16:39:10.000+0000", "updated": "2017-11-03T17:01:43.000+0000" }, { "id": "430635", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed.\r\nWaiting for merge to get enabled.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-11-15T00:26:42.000+0000", "updated": "2017-11-15T00:26:42.000+0000" }, { "id": "430747", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR Merged.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-11-15T22:27:07.000+0000", "updated": "2017-11-15T22:27:07.000+0000" }, { "id": "430757", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix in SDK 7.0.0.v20171115153702.\r\nClosing.\r\n\r\n", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-11-16T00:10:08.000+0000", "updated": "2017-11-16T00:10:08.000+0000" } ], "maxResults": 23, "total": 23, "startAt": 0 } } }