Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10120] Android: 'Uncaught RangeError' when you download & open app from Google Play directly

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionWon't Fix
Resolution Date2012-10-04T23:23:21.000+0000
Affected Version/sRelease 2.1.0
Fix Version/sSprint 2012-20 Core, 2012 Sprint 20
ComponentsAndroid
LabelsSupportTeam, core
ReporterJunaid Younus
AssigneeBill Dawson
Created2012-07-24T13:57:00.000+0000
Updated2013-03-13T15:05:23.000+0000

Description

*Expected behavior* When you download a Titanium app from Google Play on the device, it should launch just fine, without any errors. *Actual behavior* When you download the app, it throws the following error: https://img.skitch.com/20120724-8jwhabpui82hbr965qj1y44qm1.png *Steps to reproduce* -Download a Titanium app from Google Play. -Open the app from within Google Play, it should force restart the app. -Here you might get the error, if not, uninstall and try again until you get the same error. *Notes* -This only happens sometimes, this isn't consistently reproducible. You will need to give it a few tries (keep installing/opening/uninstalling) until you manage to reproduce it. -Only tested on a Samsung Galaxy S2 running 2.3.6 with TiSDK 2.1.0GA. -HD ticket: http://support-admin.appcelerator.com/display/APP-243998

Comments

  1. Michael Belkin 2012-08-29

    I also keep experiencing this one. One guess is that it may have to do with an error when parsing a JSON string from httpClient.
  2. Bill Dawson 2012-10-04

    I think whatever is happening must clearly be related to the "restart" that is forced after installing from the Play store. We improved the messy restart stuff in 2.1.2, so I would recommend the following:

    Put this in your tiapp.xml (cf. [docs](http://docs.appcelerator.com/titanium/2.1/index.html#!/guide/tiapp.xml_and_timodule.xml_Reference-section-29004921_tiapp.xmlandtimodule.xmlReference-PropertiestoworkaroundAndroidbugs2373and5277)):

       <property name="ti.android.bug2373.finishfalseroot" type="bool">true</property>
       

    Compile against 2.1.3.GA.

    Note that you can always test what is going to happen when the app is downloaded from Play Store without needing to actually use the Play Store. The trick is that when the installer app on the phone runs, and -- as its final step -- gives you the option to open the app it just installed, and go ahead and click Open, that is actually different than what happens when you start an app from the normal application menu/screen. To emulate the behavior that occurs when installing and opening from Play Store, you need to get the installer app to run on the phone (i.e., using adb install is not enough). You can do this as follows:

    Make sure no version of the app is on the device (uninstall it if needed.)

    Copy the .apk file to the sdcard like this: adb -d push myapp.apk /sdcard/myapp.apk.

    Then, on the device, use a file manager app like [Astro](https://play.google.com/store/apps/details?id=com.metago.astro&feature=search_result#?t=W251bGwsMSwxLDEsImNvbS5tZXRhZ28uYXN0cm8iXQ..) to browse your sdcard, find the .apk and open it.

    You'll be asked if you want to install the app. Do so, and the Installer app will run, just like if you downloaded from Play Store.

  3. Natalie Huynh 2012-12-04

    Closing as won't fix

JSON Source