{ "id": "109797", "key": "TIMOB-12762", "fields": { "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true }, "parent": { "id": "109778", "key": "TIMOB-12758", "fields": { "summary": "CLI: using --skip-js-minify on android dist-playstore builds results in \"missing app.js\" error on device", "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 } } }, "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": "14164", "description": "Release 3.0.2", "name": "Release 3.0.2", "archived": true, "released": true, "releaseDate": "2013-02-19" }, { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "15278", "description": "2013 Sprint 04 JS", "name": "2013 Sprint 04 JS", "archived": true, "released": true, "releaseDate": "2013-02-25" }, { "id": "14814", "description": "2013 Sprint 04", "name": "2013 Sprint 04", "archived": true, "released": true, "releaseDate": "2013-02-25" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-02-15T23:39:13.000+0000", "created": "2013-02-15T22:32:07.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "qe-sdk3.0.2" ], "versions": [ { "id": "14164", "description": "Release 3.0.2", "name": "Release 3.0.2", "archived": true, "released": true, "releaseDate": "2013-02-19" } ], "issuelinks": [ { "id": "25883", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "outwardIssue": { "id": "109778", "key": "TIMOB-12758", "fields": { "summary": "CLI: using --skip-js-minify on android dist-playstore builds results in \"missing app.js\" error on device", "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 } } } } ], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2013-02-19T18:13:37.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": "When packaging, I found that android projects with an error in the code were packaging without problem, but failed on device in an unexpected way. The failure in logcat was:\r\n{code}\r\nD/dalvikvm( 6716): No JNI_OnLoad found in libcom.crittercism.ti.so 0x41aa3cc0, skipping init\r\nE/TiAssetHelper( 6716): Error while reading asset \"Resources/app.js\":\r\nE/TiAssetHelper( 6716): java.io.FileNotFoundException: Resources/app.js\r\nE/TiAssetHelper( 6716): \r\nat android.content.res.AssetManager.openAsset(Native Method)\r\nE/TiAssetHelper( 6716): \r\nat android.content.res.AssetManager.open(AssetManager.java:315)\r\nE/TiAssetHelper( 6716): \r\nat android.content.res.AssetManager.open(AssetManager.java:289)\r\nE/TiAssetHelper( 6716): \r\nat org.appcelerator.kroll.util.KrollAssetHelper.readAsset(KrollAssetHelper.java:77)\r\nE/TiAssetHelper( 6716): \r\nat org.appcelerator.titanium.TiLaunchActivity.loadActivityScript(TiLaunchActivity.java:104)\r\nE/TiAssetHelper( 6716): \r\nat org.appcelerator.titanium.TiLaunchActivity.windowCreated(TiLaunchActivity.java:152)\r\nE/TiAssetHelper( 6716): \r\nat org.appcelerator.titanium.TiRootActivity.windowCreated(TiRootActivity.java:109)\r\nE/TiAssetHelper( 6716): \r\nat org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:506)\r\nE/TiAssetHelper( 6716): \r\nat org.appcelerator.titanium.TiLaunchActivity.onCreate(TiLaunchActivity.java:145)\r\nE/TiAssetHelper( 6716): \r\nat org.appcelerator.titanium.TiRootActivity.onCreate(TiRootActivity.java:97)\r\nE/TiAssetHelper( 6716): \r\nat android.app.Activity.performCreate(Activity.java:4470)\r\nE/TiAssetHelper( 6716): \r\nat android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1053)\r\nE/TiAssetHelper( 6716): \r\nat android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1934)\r\nE/TiAssetHelper( 6716): \r\nat android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1995)\r\nE/TiAssetHelper( 6716): \r\nat android.app.ActivityThread.access$600(ActivityThread.java:128)\r\nE/TiAssetHelper( 6716): \r\nat android.app.ActivityThread$H.handleMessage(ActivityThread.java:1161)\r\nE/TiAssetHelper( 6716): \r\nat android.os.Handler.dispatchMessage(Handler.java:99)\r\nE/TiAssetHelper( 6716): \r\nat android.os.Looper.loop(Looper.java:137)\r\nE/TiAssetHelper( 6716): \r\nat android.app.ActivityThread.main(ActivityThread.java:4517)\r\nE/TiAssetHelper( 6716): \r\nat java.lang.reflect.Method.invokeNative(Native Method)\r\nE/TiAssetHelper( 6716): \r\nat java.lang.reflect.Method.invoke(Method.java:511)\r\nE/TiAssetHelper( 6716): \r\nat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:980)\r\nE/TiAssetHelper( 6716): \r\nat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:747)\r\nE/TiAssetHelper( 6716): \r\nat dalvik.system.NativeStart.main(Native Method)\r\nE/TiAssetHelper( 6716): Error while reading asset \"Resources/app.js\":\r\nE/TiAssetHelper( 6716): java.io.FileNotFoundException: Resources/app.js\r\nE/TiAssetHelper( 6716): \r\nat android.content.res.AssetManager.openAsset(Native Method)\r\nE/TiAssetHelper( 6716): \r\nat android.content.res.AssetManager.open(AssetManager.java:315)\r\nE/TiAssetHelper( 6716): \r\nat android.content.res.AssetManager.open(AssetManager.java:289)\r\nE/TiAssetHelper( 6716): \r\nat org.appcelerator.kroll.util.KrollAssetHelper.readAsset(KrollAssetHelper.java:77)\r\nE/TiAssetHelper( 6716): \r\nat org.appcelerator.kroll.runtime.v8.V8Runtime.nativeRunModule(Native Method)\r\nE/TiAssetHelper( 6716): \r\nat org.appcelerator.kroll.runtime.v8.V8Runtime.doRunModule(V8Runtime.java:140)\r\nE/TiAssetHelper( 6716): \r\nat org.appcelerator.kroll.KrollRuntime.handleMessage(KrollRuntime.java:289)\r\nE/TiAssetHelper( 6716): \r\nat org.appcelerator.kroll.runtime.v8.V8Runtime.handleMessage(V8Runtime.java:166)\r\nE/TiAssetHelper( 6716): \r\nat android.os.Handler.dispatchMessage(Handler.java:95)\r\nE/TiAssetHelper( 6716): \r\nat android.os.Looper.loop(Looper.java:137)\r\nE/TiAssetHelper( 6716): \r\nat org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:112)\r\n{code}\r\n\r\nThe same project without the --skip-js-minify flag will function as expected. The error (in my code on line 31) was showing as being on line 2 (different from iOS, showing line 1) indicating that the minify was working.\r\n\r\nSteps to reproduce\r\n1) Create a project with error in the code, such as:\r\n{code}\r\nvar a = new Array(0x100000000);\r\n{code}\r\n2) Package for target dist-playstore\r\n3) Install resulting apk onto device\r\n4) Monitor logcat\r\n5) Launch app\r\n\r\nResult:\r\nApplication failure missing app.js\r\n\r\nExpected:\r\nApplication failure caused by error in code, line number output in log cat", "attachment": [], "flagged": false, "summary": "Backport: CLI: using --skip-js-minify on android dist-playstore builds results in \"missing app.js\" error on device", "creator": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "CLI: 3.0.24-cr\r\nTitanium SDK version 3.0.2.v20130207164659\r\nTitanium Studio, build: 3.0.2.201302041757\r\nMac OS 10.8.2", "comment": { "comments": [ { "id": "238758", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "3.0.x pull request: https://github.com/appcelerator/titanium_mobile/pull/3879", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2013-02-15T22:33:33.000+0000", "updated": "2013-02-15T22:33:33.000+0000" }, { "id": "238902", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed on windows, linux and mac with:\nCLI: 3.0.24-cr\nTitanium SDK version 3.0.2.v20130215190201\nTitanium Studio, build: 3.0.2.201302041757\nMac OS 10.8.2\nWindows 7\nUbuntu 12.04", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-02-19T18:13:25.000+0000", "updated": "2013-02-19T18:13:25.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }