{ "id": "112149", "key": "TIMOB-13346", "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": "15493", "description": "2013 Sprint 11 Core", "name": "2013 Sprint 11 Core", "archived": true, "released": true, "releaseDate": "2013-06-03" }, { "id": "15109", "description": "2013 Sprint 11", "name": "2013 Sprint 11", "archived": true, "released": true, "releaseDate": "2013-06-03" } ], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2013-05-21T06:32:41.000+0000", "created": "2013-04-03T18:49:43.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "supportTeam" ], "versions": [ { "id": "14613", "description": "Release 2.1.4", "name": "Release 2.1.4", "archived": true, "released": true, "releaseDate": "2012-11-12" }, { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" }, { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" } ], "issuelinks": [], "assignee": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-03T22:11:50.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": "h6.Issue\r\nWhen an app is installed on certain Android OS versions, that may create couple of instances by instance I mean an app icon. Meanwhile one of them is able to run, the other just fails. We couldn't get customer's source but that can be replicated using the Kitchen Sink demo which is available below.\r\n\r\nh6.Steps to reproduce\r\n1. Get Kitchen Sink app from http://dl.dropbox.com/u/34061091/KitchenSInk1.zip\r\n2. Use \"Install to Android Device\" option from Studio IDE\r\n3. At device goto \"All apps\" and launch KitchenSink. From there, couple icons can be seen (at the top left on my device's screen shoot).\r\n\r\nh4.Console outputs\r\nh6.Console output: Clicking on 1st app icon\r\nThe app is unable to run, fails throwing the following runtime error:\r\n{code}\r\n04-03 11:00:03.531: I/ActivityManager(500): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.appcelerator.kitchensink/.KitchensinkActivity } from pid 863\r\n04-03 11:00:03.625: D/ActivityRenderTarget(863): onPause\r\n04-03 11:00:03.648: I/gralloc(500): Allocated 0x73756170 size 1715299429\r\n04-03 11:00:03.726: E/dalvikvm(27928): could not disable core file generation for pid 27928: Operation not permitted\r\n04-03 11:00:03.726: I/ActivityManager(500): Start proc com.appcelerator.kitchensink for activity com.appcelerator.kitchensink/.KitchensinkActivity: pid=27928 uid=10058 gids={1015, 1006, 3003}\r\n04-03 11:00:03.765: D/dalvikvm(27928): Debugger has detached; object registry had 1 entries\r\n04-03 11:00:03.859: I/TiApplication(27928): (main) [0,0] checkpoint, app created.\r\n04-03 11:00:04.070: D/dalvikvm(27928): GC_CONCURRENT freed 950K, 43% free 4103K/7175K, external 2357K/2773K, paused 1ms+2ms\r\n04-03 11:00:04.085: I/TiApplication(27928): (main) [227,227] Titanium 3.0.0 (2012/12/12 18:49 a5894b3)\r\n04-03 11:00:04.132: D/dalvikvm(27928): Trying to load lib /data/data/com.appcelerator.kitchensink/lib/libstlport_shared.so 0x4051b9c8\r\n04-03 11:00:04.132: I/TiApplication(27928): (main) [47,274] Titanium Javascript runtime: v8\r\n04-03 11:00:04.140: D/dalvikvm(27928): Added shared lib /data/data/com.appcelerator.kitchensink/lib/libstlport_shared.so 0x4051b9c8\r\n04-03 11:00:04.140: D/dalvikvm(27928): No JNI_OnLoad found in /data/data/com.appcelerator.kitchensink/lib/libstlport_shared.so 0x4051b9c8, skipping init\r\n04-03 11:00:04.140: D/dalvikvm(27928): Trying to load lib /data/data/com.appcelerator.kitchensink/lib/libkroll-v8.so 0x4051b9c8\r\n04-03 11:00:04.140: D/AndroidRuntime(27928): Shutting down VM\r\n04-03 11:00:04.140: W/dalvikvm(27928): threadid=1: thread exiting with uncaught exception (group=0x4001e560)\r\n04-03 11:00:04.140: D/dalvikvm(27928): Added shared lib /data/data/com.appcelerator.kitchensink/lib/libkroll-v8.so 0x4051b9c8\r\n04-03 11:00:04.148: E/TiApplication(27928): (main) [8,282] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.appcelerator.kitchensink/com.appcelerator.kitchensink.KitchensinkActivity}: java.lang.ClassNotFoundException: com.appcelerator.kitchensink.KitchensinkActivity in loader dalvik.system.PathClassLoader[/system/framework/com.google.android.maps.jar:/data/app/com.appcelerator.kitchensink-1.apk]; Titanium 3.0.0,2012/12/12 18:49,a5894b3\r\n04-03 11:00:04.148: E/TiApplication(27928): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.appcelerator.kitchensink/com.appcelerator.kitchensink.KitchensinkActivity}: java.lang.ClassNotFoundException: com.appcelerator.kitchensink.KitchensinkActivity in loader dalvik.system.PathClassLoader[/system/framework/com.google.android.maps.jar:/data/app/com.appcelerator.kitchensink-1.apk]\r\n04-03 11:00:04.148: E/TiApplication(27928): \tat android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1624)\r\n04-03 11:00:04.148: E/TiApplication(27928): \tat android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1727)\r\n04-03 11:00:04.148: E/TiApplication(27928): \tat android.app.ActivityThread.access$1500(ActivityThread.java:124)\r\n04-03 11:00:04.148: E/TiApplication(27928): \tat android.app.ActivityThread$H.handleMessage(ActivityThread.java:974)\r\n04-03 11:00:04.148: E/TiApplication(27928): \tat android.os.Handler.dispatchMessage(Handler.java:99)\r\n04-03 11:00:04.148: E/TiApplication(27928): \tat android.os.Looper.loop(Looper.java:130)\r\n04-03 11:00:04.148: E/TiApplication(27928): \tat android.app.ActivityThread.main(ActivityThread.java:3859)\r\n04-03 11:00:04.148: E/TiApplication(27928): \tat java.lang.reflect.Method.invokeNative(Native Method)\r\n04-03 11:00:04.148: E/TiApplication(27928): \tat java.lang.reflect.Method.invoke(Method.java:507)\r\n04-03 11:00:04.148: E/TiApplication(27928): \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:840)\r\n04-03 11:00:04.148: E/TiApplication(27928): \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:598)\r\n04-03 11:00:04.148: E/TiApplication(27928): \tat dalvik.system.NativeStart.main(Native Method)\r\n04-03 11:00:04.148: E/TiApplication(27928): Caused by: java.lang.ClassNotFoundException: com.appcelerator.kitchensink.KitchensinkActivity in loader dalvik.system.PathClassLoader[/system/framework/com.google.android.maps.jar:/data/app/com.appcelerator.kitchensink-1.apk]\r\n04-03 11:00:04.148: E/TiApplication(27928): \tat dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)\r\n04-03 11:00:04.148: E/TiApplication(27928): \tat java.lang.ClassLoader.loadClass(ClassLoader.java:551)\r\n04-03 11:00:04.148: E/TiApplication(27928): \tat java.lang.ClassLoader.loadClass(ClassLoader.java:511)\r\n04-03 11:00:04.148: E/TiApplication(27928): \tat android.app.Instrumentation.newActivity(Instrumentation.java:1021)\r\n04-03 11:00:04.148: E/TiApplication(27928): \tat android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1616)\r\n04-03 11:00:04.148: E/TiApplication(27928): \t... 11 more\r\n04-03 11:00:04.289: E/TiApplication(27928): (KrollRuntimeThread) [146,428] APP PROXY: ti.modules.titanium.app.AppModule@405bc468\r\n04-03 11:00:04.304: W/V8Object(27928): Runtime disposed, cannot set property 'userAgent'\r\n04-03 11:00:12.085: E/TiHttpClient(26375): (TiHttpClient-3) [19634,23397] HTTP Error (org.apache.http.conn.ConnectTimeoutException): Connect to /10.60.201.166:8080 timed out\r\n04-03 11:00:12.085: E/TiHttpClient(26375): org.apache.http.conn.ConnectTimeoutException: Connect to /10.60.201.166:8080 timed out\r\n04-03 11:00:12.085: E/TiHttpClient(26375): \tat org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:121)\r\n04-03 11:00:12.085: E/TiHttpClient(26375): \tat org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:147)\r\n04-03 11:00:12.085: E/TiHttpClient(26375): \tat org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)\r\n04-03 11:00:12.085: E/TiHttpClient(26375): \tat org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)\r\n04-03 11:00:12.085: E/TiHttpClient(26375): \tat org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:363)\r\n04-03 11:00:12.085: E/TiHttpClient(26375): \tat org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)\r\n04-03 11:00:12.085: E/TiHttpClient(26375): \tat org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:653)\r\n04-03 11:00:12.085: E/TiHttpClient(26375): \tat org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:637)\r\n04-03 11:00:12.085: E/TiHttpClient(26375): \tat ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run(TiHTTPClient.java:1186)\r\n04-03 11:00:12.085: E/TiHttpClient(26375): \tat java.lang.Thread.run(Thread.java:1019)\r\n04-03 11:00:12.085: I/TiHttpClient(26375): (TiHttpClient-3) [3,23400] Sending error Connect to /10.60.201.166:8080 timed out\r\n04-03 11:00:12.085: W/V8Function(26375): Runtime disposed, cannot call function.\r\n{code}\r\n\r\nh6.Console output: Clicking on 2nd app icon\r\nThe app launches as expected\r\n{code}\r\n04-03 11:45:49.992: I/ActivityManager(500): Starting: Intent { cmp=com.appcelerator.kitchensink/org.appcelerator.titanium.TiActivity (has extras) } from pid 30051\r\n04-03 11:45:50.000: D/Module(30051): Loading module: ui/common/MessageWindow -> Resources/ui/common/MessageWindow.js\r\n04-03 11:45:50.039: I/TiAPI(30051): Welcome to Kitchen Sink for Titanium/3.0.0\r\n04-03 11:45:50.039: D/TiAPI(30051): user agent set to Dalvik/1.4.0 (Linux; U; Android 2.3.5; DROID RAZR Build/6.5.1-73_DHD-11_M1-2) Titanium/3.0.0\r\n04-03 11:45:50.039: D/TiAPI(30051): locale specific date is 4/3/13\r\n04-03 11:45:50.046: D/TiAPI(30051): locale specific date (medium) is Apr 3, 2013\r\n04-03 11:45:50.046: D/TiAPI(30051): locale specific date (long) is April 3, 2013\r\n04-03 11:45:50.046: D/TiAPI(30051): locale specific time is 11:45 AM\r\n04-03 11:45:50.054: D/TiAPI(30051): locale specific currency is $12.99\r\n04-03 11:45:50.062: D/TiAPI(30051): locale specific decimal is 12.99\r\n04-03 11:45:50.062: I/TiAPI(30051): should be en, was = en\r\n04-03 11:45:50.062: I/TiAPI(30051): welcome_message = Welcome to Kitchen Sink for Titanium/\r\n04-03 11:45:50.070: I/TiAPI(30051): should be def, was = def\r\n{code}\r\n\r\nh6.Additional details\r\nCustomer have found an issue in the appname they were providing via tiapp.xml. If this name starts with a digit [0-9], there is logic in the Ti android.py script to prepend the appname with an underscore '_' character. This results in multiple intents begin added to the manifest file and potentially the cause of this issue.\r\n\r\n{code}\r\n @classmethod\r\n def strip_classname(cls, name):\r\n classname = ''.join([str.capitalize() for str in re.split('[^A-Za-z0-9_]', name)])\r\n if re.search(\"^[0-9]\", classname) != None:\r\n classname = \"_\" + classname\r\n return classname\r\n{code}\r\n\r\n", "attachment": [ { "id": "36980", "filename": "device-2013-04-03-124131.png", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-04-03T18:49:43.000+0000", "size": 169496, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: A couple of app icons gets created, the first one fails and the second launches", "creator": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "TiSDK 2.x, 3.x, 3.1 CI\r\nAndroid 2.3, 2.3.6, 4.2", "comment": { "comments": [ { "id": "253058", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This isn't really a bug, it's expected behavior.\r\n\r\nInside the tiapp.xml, you specify an activity called KitchensinkActivity, a label called KitchenSink and added the category launcher to it. That's basically telling android to create a new icon in the launcher drawer named KitchenSink, and have it load an activity called KitchensinkActivity, which will not exist.\r\n\r\nI'm not really sure what the app is trying to do here, but if you want to create a secondary icon that launches KitchenSink correctly, you just need to specify the activity name to be the same as the one that titanium generates, which is Kitchensink214gaActivity.", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-21T06:32:41.000+0000", "updated": "2013-05-21T06:32:41.000+0000" }, { "id": "253106", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "body": "I've tried out suggestions above but I'm still seeing couple app icons.\r\n\r\nAfter removing application created an icon only that launches correctly.\r\n\r\n{code}\r\n \r\n \r\n \r\n{code}\r\n\r\nSimilar discussion: http://stackoverflow.com/questions/8697943/android-application-creating-two-launcher-icons", "updateAuthor": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-05-21T16:05:41.000+0000", "updated": "2013-05-21T16:05:41.000+0000" }, { "id": "408961", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing as invalid.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-03T22:11:50.000+0000", "updated": "2017-03-03T22:11:50.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }