{ "id": "172846", "key": "TIMOB-26716", "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": "19882", "name": "Release 8.0.0", "archived": false, "released": true, "releaseDate": "2019-03-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2019-01-18T19:30:46.000+0000", "created": "2019-01-11T17:14:58.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [], "versions": [ { "id": "19882", "name": "Release 8.0.0", "archived": false, "released": true, "releaseDate": "2019-03-14" } ], "issuelinks": [ { "id": "57119", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "172866", "key": "TIMOB-26729", "fields": { "summary": "TiAPI: Ship baseline polyfills in built SDK", "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": "Medium", "id": "3" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2019-01-18T19:30:46.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": "The following error can be seen intermittently when running certain Android applications on the latest SDK in 8_0_x. The application seems to work without any issues but the error is logged in the console.\r\n{code:java}\r\n[ERROR] : TiAssetHelper: Error while reading asset \"Resources/node_modules/core-js/modules/web.dom.iterable.js\":\r\n[ERROR] : TiAssetHelper: java.io.FileNotFoundException: Resources/node_modules/core-js/modules/web.dom.iterable.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:97)\r\n[ERROR] : TiAssetHelper: \tat org.appcelerator.titanium.TiRootActivity.loadScript(TiRootActivity.java:414)\r\n[ERROR] : TiAssetHelper: \tat org.appcelerator.titanium.TiLaunchActivity.windowCreated(TiLaunchActivity.java:174)\r\n[ERROR] : TiAssetHelper: \tat org.appcelerator.titanium.TiRootActivity.windowCreated(TiRootActivity.java:283)\r\n[ERROR] : TiAssetHelper: \tat org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:767)\r\n[ERROR] : TiAssetHelper: \tat org.appcelerator.titanium.TiLaunchActivity.onCreate(TiLaunchActivity.java:167)\r\n[ERROR] : TiAssetHelper: \tat org.appcelerator.titanium.TiRootActivity.onCreate(TiRootActivity.java:260)\r\n[ERROR] : TiAssetHelper: \tat android.app.Activity.performCreate(Activity.java:7136)\r\n[ERROR] : TiAssetHelper: \tat android.app.Activity.performCreate(Activity.java:7127)\r\n[ERROR] : TiAssetHelper: \tat android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)\r\n[ERROR] : TiAssetHelper: \tat android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893)\r\n[ERROR] : TiAssetHelper: \tat android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)\r\n[ERROR] : TiAssetHelper: \tat android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)\r\n[ERROR] : TiAssetHelper: \tat android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)\r\n[ERROR] : TiAssetHelper: \tat android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)\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{code}\r\n\r\n*A test scenario:* *Note* The error can also be shown using the kitchenSink-V2 application \r\n# Clone the repo https://github.com/appcelerator-modules/titanium-web-dialog\r\n# Build the module for android (CD in to the android directory of the module and run {{appc run --build-only}})\r\n# Add the module into the Titanium modules directory \r\n# Create a new Titanium application \r\n# Add the following in to the {{app.js}}\r\n{code:java}\r\nvar WebDialog = require('ti.webdialog');\r\n\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: '#fff'\r\n});\r\n\r\nvar btnOpenDialog = Ti.UI.createButton({\r\n title: 'Open Web Dialog'\r\n});\r\n\r\nwin.add(btnOpenDialog);\r\n\r\nbtnOpenDialog.addEventListener('click', function () {\r\n WebDialog.open({\r\n url: 'https://appcelerator.com',\r\n title: 'Hello World',\r\n\r\n // iOS 10+\r\n tintColor: 'red',\r\n barColor: 'green',\r\n\r\n // iOS 11+\r\n barCollapsingEnabled: false,\r\n dismissButtonStyle: WebDialog.DISMISS_BUTTON_STYLE_CLOSE\r\n });\r\n});\r\n\r\nWebDialog.addEventListener('open', function (event) {\r\n console.log('open: ' + JSON.stringify(event));\r\n});\r\n\r\nWebDialog.addEventListener('close', function (event) {\r\n console.log('close: ' + JSON.stringify(event));\r\n});\r\n\r\nwin.open();\r\n{code}\r\n# Run the program using the latest SDK from 8_0_x\r\n# Theirs a chance the above error will be shown in the console \r\n\r\n*Actual result*\r\nSometimes the application logs the above error but application still works as expected. \r\n\r\n*Expected result*\r\nApplication should run without any issues and console should not log any errors. \r\n", "attachment": [], "flagged": false, "summary": "Android: 'Error while reading asset' Can be seen intermittently when running certain Android applications", "creator": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "APPC SDK: 8.0.0.v20190111035358\r\nGoogle pixel xl 7.1.1 sim\r\nAPPC CLI: 7.0.9\r\nOperating System Name: Mac OS Mojave\r\nOperating System Version: 10.14.2\r\nNode.js Version: 8.9.1\r\nXcode 10.1", "comment": { "comments": [ { "id": "445328", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "I'd treat this as a blocker, as the app will fail to load altogether when this does happen.\r\n\r\nThere's a couple PRs that could possibly \"fix\" this:\r\n- https://github.com/appcelerator/titanium_mobile/pull/10613 - This updates our fs-extra dependency to the latest release. Maybe that'll fix the issue it has in not always copying everything over during app builds?\r\n- https://github.com/appcelerator/titanium_mobile/pull/10567 - This is where we'd \"pre-ship\" the polyfills when we built the SDK. I didn't intend to ship this in 8.0.0 originally, but it could \"fix\" the issue by doing the copy of the polyfills in our SDK build and we can then do some sort of enforced sanity check that the expected files exist or fail our own build. The \"con\" here is that there's potentially an app startup performance hit since the polyfills would be loaded during startup (rather than as they're used within the app).", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2019-01-15T16:38:57.000+0000", "updated": "2019-01-15T16:38:57.000+0000" }, { "id": "445329", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "[~jvennemann] just noted in our standup that this seems to work fine on first clean build, but subsequent builds exhibit this bug.", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2019-01-15T16:39:41.000+0000", "updated": "2019-01-15T16:39:41.000+0000" }, { "id": "445399", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "Assigning to Jan since he can fairly reliably reproduce on Android simulator. I'll also be trying to reproduce/fix, but hopefully Jan can nail this one.", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2019-01-16T16:44:02.000+0000", "updated": "2019-01-16T16:44:02.000+0000" }, { "id": "445406", "author": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/10622\r\nPR (8_0_X): https://github.com/appcelerator/titanium_mobile/pull/10623", "updateAuthor": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-01-16T18:46:21.000+0000", "updated": "2019-01-16T18:46:21.000+0000" }, { "id": "445453", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed.\r\nPR's merged.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-01-17T23:16:48.000+0000", "updated": "2019-01-17T23:16:48.000+0000" }, { "id": "445474", "author": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix on SDK 8.1.0.v20190117115327 and 8.0.0.v20190117115226.No error displayed.works fine. Closing\r\n{code}\r\n Name = Mac OS X\r\n Version = 10.13.6\r\n Memory = 17179869184\r\nNode.js\r\n Node.js Version = 8.12.0\r\n npm Version = 6.4.1\r\nTitanium CLI\r\n CLI Version = 5.1.1\r\nTitanium SDK\r\n SDK Version = 8.1.0.v20190117115327 and 8.0.0.v20190117115226\r\nApp CLI =7.0.10.master 5\r\nDevice =Samsung s5 android 6\r\nEmulator =Pixel 3 xl android 9\r\n{code}", "updateAuthor": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-01-18T19:30:39.000+0000", "updated": "2019-01-18T19:30:39.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }