Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16296] Android: Uncaught errors on TiWebChromeClient

GitHub Issuen/a
TypeBug
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsparity, supportTeam
ReporterEduardo Gomez
AssigneeUnknown
Created2014-01-23T17:40:49.000+0000
Updated2018-02-28T20:03:54.000+0000

Description

Use case

Need Bing maps to display in an app and had it doing so in Android OS 4.3 on most Android devices. However, it doesn't seem to work anymore on Android OS 4.4 KitKat. Attached stripped down version works on iPhone and on 4.3, however not on 4.4 and few Android versions like 4.0.x.

Steps to reproduce

1) Get and run sample attached 2) Watch monitor console

Test results

iOS 7.0 - Maps fully loaded and event logged. {quote} Jan 22 13:00:16 lAlO BingMapsKitKat[284] : [WARN] In Maps WebView Jan 22 13:00:16 lAlO BingMapsKitKat[284] : [DEBUG] Firing app event: app:updateWebView Jan 22 13:00:16 lAlO BingMapsKitKat[284] : [WARN] [ latitude = "76.2361273"; longitude = "36.8527915"; } {quote} Android 4.0.4 (Xperia) & 4.4 (nexus 7) SDK 3.2.0.GA & 3.3.0.v20140121162449 does not render Map and eventually throw "Uncaught ReferenceErrors": {quote} 01-22 14:59:31.826: W/TiAPI(18562): In Maps WebView 01-22 14:59:32.256: I/ActivityManager(224): Process com.android.defcontainer (pid 18452) has died. 01-22 14:59:32.276: I/ActivityManager(224): Process com.android.keychain (pid 18526) has died. 01-22 14:59:32.366: W/TiAPI(18562): undefined 01-22 14:59:32.426: I/ActivityManager(224): Process com.google.android.partnersetup (pid 18587) has died. 01-22 14:59:32.456: I/TiWebChromeClient.console(18562): (main) [6082,6082] Uncaught TypeError: Cannot call method 'appendChild' of null (1:http://ecn.dev.virtualearth.net/mapcontrol/v7.0/7.0.20131202145924.46/js/en-us/veapicore.js) 01-22 14:59:32.476: I/ActivityManager(224): Process com.android.voicedialer (pid 18473) has died. 01-22 14:59:32.566: I/ActivityManager(224): Process com.noshufou.android.su (pid 18507) has died. 01-22 14:59:32.676: W/V8Object(18695): Runtime disposed, cannot set property 'userAgent' {quote} {quote} 01-22 14:43:44.196: W/TiAPI(12171): In Maps WebView 01-22 14:43:45.286: I/TiWebChromeClient.console(12171): (main) [41984,82089] Uncaught ReferenceError: Microsoft is not defined (63:file:///android_asset/Resources/web/index.html) {quote}

Attachments

FileDateSize
BingMapsKitKat_Corrected.zip2014-10-06T18:54:54.000+00006758548
BingMapsKitKat.zip2014-01-23T17:40:49.000+00006656762

Comments

  1. Michael DeGiovanni 2014-01-25

    Probably related: I am running the Disqus comments in a webview. Short pages which do not require scrolling don't have this problem, but if it is a page full of comments as soon as I start scrolling the app crashes. Url is : http://webitstudios.com/staging/tom/comments.html?shortname=timesofmalta&title=MEP%20Joseph%20Cuschieri%20calls%20for%20removal%20of%20vehicle%20registration%20tax&url=http%3A%2F%2Fwww.timesofmalta.com%2Farticles%2Fview%2F20140125%2Flocal%2Fmep-joseph-cuschieri-calls-for-removal-of-vehicle-registration-tax.504037&identifier=article_504037 The error given is : 01-25 17:43:50.019: D/OpenGLRenderer(2501): GL error from OpenGLRenderer: 0x502 log shows as follows: 01-25 17:43:50.429: I/DEBUG(1238): signal 7 (SIGBUS), code 1 (BUS_ADRALN), fault addr 00000005 01-25 17:43:51.079: I/DEBUG(1238): r0 00000005 r1 62b216a0 r2 ffffffff r3 00000005 01-25 17:43:51.089: I/DEBUG(1238): r4 62b216e8 r5 660fcb98 r6 660fcb50 r7 62b216a0 01-25 17:43:51.089: I/DEBUG(1238): r8 403c9fb1 r9 660fcdd0 sl be802ecc fp 00000000 01-25 17:43:51.099: I/DEBUG(1238): ip 407c1bec sp 660fcb30 lr 406bdd65 pc 40396614 cpsr 00020010 01-25 17:43:51.099: I/DEBUG(1238): d0 40077a080b000501 d1 0000000500000000 01-25 17:43:51.099: I/DEBUG(1238): d2 00000019ffffffff d3 64bfdcb8403681c0 01-25 17:43:51.109: I/DEBUG(1238): d4 0000000200000000 d5 4000000000000000 01-25 17:43:51.109: I/DEBUG(1238): d6 4000000040000000 d7 00000000448c4000 01-25 17:43:51.109: I/DEBUG(1238): d8 0000000040000000 d9 4024000000000000 01-25 17:43:51.109: I/DEBUG(1238): d10 4014000000000000 d11 4024000000000000 01-25 17:43:51.109: I/DEBUG(1238): d12 0000000000000000 d13 0000000000000000 01-25 17:43:51.119: I/DEBUG(1238): d14 0000000000000000 d15 0000000000000000 01-25 17:43:51.119: I/DEBUG(1238): d16 3ff0000000000000 d17 0000000000000000 01-25 17:43:51.119: I/DEBUG(1238): d18 0000000000000000 d19 4086800000000000 01-25 17:43:51.119: I/DEBUG(1238): d20 4000000000000000 d21 4010000000000000 01-25 17:43:51.119: I/DEBUG(1238): d22 4086a00000000000 d23 4091880000000000 01-25 17:43:51.129: I/DEBUG(1238): d24 4000000000000000 d25 4010000000000000 01-25 17:43:51.129: I/DEBUG(1238): d26 3ff0000000000000 d27 0000000000000000 01-25 17:43:51.129: I/DEBUG(1238): d28 3ff0000000000000 d29 0000000000000000 01-25 17:43:51.129: I/DEBUG(1238): d30 0000000000000000 d31 0000000000000000 01-25 17:43:51.129: I/DEBUG(1238): scr 88000017 01-25 17:43:51.139: I/DEBUG(1238): backtrace: 01-25 17:43:51.149: I/DEBUG(1238): #00 pc 00003614 /system/lib/libcutils.so (android_atomic_inc+8) 01-25 17:43:51.149: I/DEBUG(1238): #01 pc 000b2d61 /system/lib/libskia.so (SkPaint::SkPaint(SkPaint const&)+46) 01-25 17:43:51.149: I/DEBUG(1238): #02 pc 000257eb /system/lib/libhwui.so 01-25 17:43:51.149: I/DEBUG(1238): #03 pc 00025fe9 /system/lib/libhwui.so 01-25 17:43:51.159: I/DEBUG(1238): #04 pc 00025da7 /system/lib/libhwui.so 01-25 17:43:51.159: I/DEBUG(1238): #05 pc 0000ed73 /system/lib/libhwui.so 01-25 17:43:51.159: I/DEBUG(1238): #06 pc 0000f445 /system/lib/libutils.so (android::Thread::_threadLoop(void*)+104) 01-25 17:43:51.159: I/DEBUG(1238): #07 pc 000525a9 /system/lib/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+68) 01-25 17:43:51.159: I/DEBUG(1238): #08 pc 0000efe7 /system/lib/libutils.so 01-25 17:43:51.169: I/DEBUG(1238): #09 pc 0000d228 /system/lib/libc.so (__thread_entry+72) 01-25 17:43:51.169: I/DEBUG(1238): #10 pc 0000d3c0 /system/lib/libc.so (pthread_create+240) 01-25 17:43:51.169: W/NFC-LLC(878): LLC length mis-match 01-25 17:43:51.169: I/DEBUG(1238): stack: 01-25 17:43:51.169: I/DEBUG(1238): 660fcaf0 00000001 01-25 17:43:51.179: I/DEBUG(1238): 660fcaf4 652fe0f0 01-25 17:43:51.179: I/DEBUG(1238): 660fcaf8 00000000 01-25 17:43:51.179: I/DEBUG(1238): 660fcafc 00000000 01-25 17:43:51.189: I/DEBUG(1238): 660fcb00 00000000 01-25 17:43:51.189: I/DEBUG(1238): 660fcb04 403c9fb1 /system/lib/libutils.so 01-25 17:43:51.189: I/DEBUG(1238): 660fcb08 660fcdd0 [stack:3220] 01-25 17:43:51.189: I/DEBUG(1238): 660fcb0c be802ecc [stack] 01-25 17:43:51.189: I/DEBUG(1238): 660fcb10 00000000 01-25 17:43:51.189: I/DEBUG(1238): 660fcb14 4069bfe1 /system/lib/libskia.so (SkBitmap::eraseARGB(unsigned int, unsigned int, unsigned int, unsigned int) const+56) 01-25 17:43:51.189: I/DEBUG(1238): 660fcb18 00000000 01-25 17:43:51.199: I/DEBUG(1238): 660fcb1c 00000000 01-25 17:43:51.199: I/DEBUG(1238): 660fcb20 00000000 01-25 17:43:51.199: I/DEBUG(1238): 660fcb24 00000000 01-25 17:43:51.199: I/DEBUG(1238): 660fcb28 000002d4 01-25 17:43:51.199: I/DEBUG(1238): 660fcb2c 00000466 01-25 17:43:51.199: I/DEBUG(1238): #00 660fcb30 652fe0fc 01-25 17:43:51.209: I/DEBUG(1238): ........ ........ 01-25 17:43:51.209: I/DEBUG(1238): #01 660fcb30 652fe0fc 01-25 17:43:51.209: I/DEBUG(1238): 660fcb34 00000000 01-25 17:43:51.209: I/DEBUG(1238): 660fcb38 652fe0f0 01-25 17:43:51.209: I/DEBUG(1238): 660fcb3c 62b21270 01-25 17:43:51.209: I/DEBUG(1238): 660fcb40 62b216a0 01-25 17:43:51.219: I/DEBUG(1238): 660fcb44 40cd87ef /system/lib/libhwui.so 01-25 17:43:51.219: I/DEBUG(1238): #02 660fcb48 00000000 01-25 17:43:51.219: I/DEBUG(1238): 660fcb4c 00000000 01-25 17:43:51.219: I/DEBUG(1238): 660fcb50 00000001 01-25 17:43:51.219: I/DEBUG(1238): 660fcb54 00000020 01-25 17:43:51.229: I/DEBUG(1238): 660fcb58 00000000 01-25 17:43:51.229: I/DEBUG(1238): 660fcb5c 00000000 01-25 17:43:51.229: I/DEBUG(1238): 660fcb60 652fd014 01-25 17:43:51.229: I/DEBUG(1238): 660fcb64 655d41ec 01-25 17:43:51.229: I/DEBUG(1238): 660fcb68 00000000 01-25 17:43:51.229: I/DEBUG(1238): 660fcb6c 431e0000 /dev/ashmem/dalvik-heap (deleted) 01-25 17:43:51.239: I/DEBUG(1238): 660fcb70 44340000 /dev/ashmem/dalvik-heap (deleted) 01-25 17:43:51.239: I/DEBUG(1238): 660fcb74 44a00000 /dev/ashmem/dalvik-heap (deleted) 01-25 17:43:51.239: I/DEBUG(1238): 660fcb78 00000000 01-25 17:43:51.239: I/DEBUG(1238): 660fcb7c 00000005 01-25 17:43:51.239: I/DEBUG(1238): 660fcb80 ffffffff 01-25 17:43:51.249: I/DEBUG(1238): 660fcb84 00000019 01-25 17:43:51.249: I/DEBUG(1238): ........ ........ If it is nor related, let me know so I'll create a separate issue
  2. Eduardo Gomez 2014-02-03

    After some more research and testing uncaught errors came out from that 3rd party library and prevents Bing Maps to work (modifications below address the issue).

    Stack trace

       01-28 11:45:41.443: W/TiAPI(6484):  #### [Location 76.2361273,36.8527915]
       01-28 11:45:41.443: W/TiAPI(6484): $$$$ birdseye 76.2361273 36.8527915
       01-28 11:45:41.493: I/TiWebChromeClient.console(6484): (main) [2121,2121] Uncaught TypeError: Cannot call method 'appendChild' of null (1:http://ecn.dev.virtualearth.net/mapcontrol/v7.0/7.0.20140121124250.64/js/en-us/veapicore.js)
       
    Microsoft docs suggest adding script type and charset: - http://msdn.microsoft.com/en-us/library/gg427624.aspx To Prevent appendChild error: - http://stackoverflow.com/questions/14946428/how-to-fix-uncaught-typeerror-cannot-call-method-appendchild-of-null **On Xperia 4.0 maps were black. We got no errors or warnings in the monitor though. Michael DeGiovanni, your logs seems to evidence a different issue. Please raise a Jira ticket and include a [test case](http://docs.appcelerator.com/titanium/latest/#!/guide/JIRA_Ticket_Template) to investigate more.
  3. jithinpv 2014-09-26

    Issue reproduces Titanium SDK version 3.4.0 master, 3.2.0.GA Titanium Studio, build: 3.3.0.201407100905 Titanium Command-Line Interface CLI version 3.3.0, Android device : Motorola Moto G, Android version : 4.4.4 iOS simulator : iPhone Retina (3.5-inch), iOS 7.0.3 iOS shows latitude and longitude in console, but Android shows undefined.
  4. Eduardo Gomez 2014-10-06

    Issue is Not our Bug. Attaching working code (correction made to assets/web/index.html). Tested 3.4.0.GA / 3.4.0 CLI. Device Android Xperia OS: 4.0.4. Thanks for the guidance, [~ingo]

JSON Source