Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2130] Ti.App is undifiend on webview at android 2.2 device

GitHub Issuen/a
TypeBug
PriorityTrivial
StatusClosed
ResolutionDuplicate
Resolution Date2011-04-15T03:11:21.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsandroid
ReporterFarsad
AssigneeDon Thorp
Created2011-04-15T03:11:18.000+0000
Updated2017-03-10T18:19:37.000+0000

Description

Hi
I found a huge issue on Titanium!
I have an app with a webview and some javascript for loading pages on main page. I have used Ti.App.addEventListener for initialize a variable for Os name on my app. but, the app get error on Ti.App.addEventListener line and then my app couldn't run next javascripts and it stopped on main white page.
This problem exist only on Android 2.2 device on each run expect first run!!! The app works correctly on emulator at all times!

Errors for this issue on Dalvic debug monitor are:
10-20 09:18:09.364: ERROR/Web Console(3954): Uncaught TypeError: Cannot read property 'App' of undefined at file:///android_asset/Resources/scripts/main.js:1
10-20 09:18:09.371: ERROR/Web Console(3954): Uncaught TypeError: Cannot read property 'osname' of undefined at file:///android_asset/Resources/views/main.html:10

But! on all runs include first run I get another errors before this error:
ERROR/TiApplication(3954): (kroll$1) [19,84] APP PROXY: ti.modules.titanium.app.AppModule@48039a48
ERROR/TiApplication(3954): (main) [350,865] APP PROXY: ti.modules.titanium.app.AppModule@48003c80
10-20 09:18:00.121: ERROR/Web Console(3954): Uncaught ReferenceError: TiAPI is not defined at :3

I tested it by Titanium SDK 1.4.1.1 and the last version of source code(1.5) on a Galaxy S mobile with I9000JXJPB(Android 2.2 for middle est) and I9000XXJPM(Android 2.2 for Europe).

I attached a sample project and Dalvic debug Logs and emulator trace log.

I need a fast fix for this issue. our App is ready for publish but don't work on Android 2.2 :(
Thanks.

Attachments

FileDateSize
emulatortrace.rtf2011-04-15T03:11:20.000+000027671
first-run-log.txt2011-04-15T03:11:20.000+00008583
resources.zip2011-04-15T03:11:19.000+0000195285
second-and-next-run-log.txt2011-04-15T03:11:19.000+000012827

Comments

  1. Brion Vibber 2011-04-15

    Dupe of https://appcelerator.lighthouseapp.com/projects/32238/tickets/1374-android-events-are-not-working-on-android-22-device-but-working-on-simulator"> https://appcelerator.lighthouseapp.com/projects/32238/tickets/1374-... ? I have a workaround posted on that bug.

  2. Farsad 2011-04-15

    Very Thanks Brion! :)

  3. Stephen Tramer 2011-04-15

    Dupe #1374.

  4. Lee Morris 2017-03-10

    Closing ticket as duplicate.

JSON Source