In Android 4.2 and 4.2.2, my Webview isn't loading

Hi!

I’m currently trying to debug this; in Android 4.2 and 4.2.2, after my splashscreen dissapears I’m left with a whitescreen.

It doesn’t show up in the chrome inspector, so I piped into logcat and don’t see any errors. This is all I get from the time I open the app to the time I forcefully close it (ignore the Genymotion stuff, as this occurs in Genymotion and on real devices):

I/ActivityManager(  375): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.ionicframework.enhatch146189/.MainActivity} from pid 627
W/genymotion_audio(  420): out_write() limiting sleep time 69659 to 23219
W/genymotion_audio(  420): out_write() limiting sleep time 46439 to 23219
D/dalvikvm( 7131): Late-enabling CheckJNI
D/dalvikvm(  131): GC_EXPLICIT freed 40K, 1% free 8563K/8628K, paused 1ms+0ms, total 4ms
D/dalvikvm(  131): GC_EXPLICIT freed <1K, 1% free 8563K/8628K, paused 1ms+0ms, total 3ms
I/ActivityManager(  375): Start proc com.ionicframework.enhatch146189 for activity com.ionicframework.enhatch146189/.MainActivity: pid=7131 uid=10051 gids={50051, 3003, 1028, 1015}
D/dalvikvm(  131): GC_EXPLICIT freed <1K, 1% free 8563K/8628K, paused 0ms+1ms, total 3ms
D/SurfaceFlinger(  419): setOrientation, mFbdev=0xb7f69658, mFbDev->setOrientation=0xb6725e20, orientation=1
I/gralloc_vbox86(  419): setOrientation: orientation=1
I/ActivityManager(  375): Config changes=1480 {1.0 310mcc260mnc en_US ldltr sw384dp w598dp h359dp 320dpi nrml land finger qwerty/v/v dpad/v s.40}
D/dalvikvm(  545): GC_CONCURRENT freed 393K, 5% free 8859K/9292K, paused 1ms+0ms, total 2ms
I/InputReader(  375): Reconfiguring input devices.  changes=0x00000004
I/InputReader(  375): Device reconfigured: id=1, name='Genymotion Virtual Input', size 768x1280, orientation 1, mode 1, display id 0
I/InputReader(  375): Device reconfigured: id=2, name='Genymotion via VirtualBox seamless mouse', size 768x1280, orientation 0, mode 3, display id 0
I/qtaguid (  375): Failed write_ctrl(s 1 10051) res=-1 errno=1
W/NetworkManagementSocketTagger(  375): setKernelCountSet(10051, 1) failed with errno -1
W/ActivityThread( 7131): Application com.ionicframework.enhatch146189 can be debugged on port 8100...
D/dalvikvm(  496): GC_FOR_ALLOC freed 13063K, 53% free 12471K/26496K, paused 13ms, total 13ms
I/dalvikvm-heap(  496): Grow heap (frag case) to 18.311MB for 6410572-byte allocation
I/dalvikvm( 7131): Could not find method android.webkit.WebView.setWebContentsDebuggingEnabled, referenced from method org.apache.cordova.engine.SystemWebViewEngine.enableRemoteDebugging
W/dalvikvm( 7131): VFY: unable to resolve static method 290: Landroid/webkit/WebView;.setWebContentsDebuggingEnabled (Z)V
D/dalvikvm( 7131): VFY: replacing opcode 0x71 at 0x0001
D/dalvikvm(  496): GC_FOR_ALLOC freed 522K, 32% free 18208K/26496K, paused 4ms, total 4ms
D/dalvikvm(  496): GC_CONCURRENT freed <1K, 32% free 18209K/26496K, paused 0ms+1ms, total 2ms
D/dalvikvm(  496): GC_FOR_ALLOC freed <1K, 32% free 18209K/26496K, paused 2ms, total 2ms
I/dalvikvm( 7131): Could not find method android.webkit.CookieManager.setAcceptThirdPartyCookies, referenced from method org.apache.cordova.engine.SystemCookieManager.<init>
W/dalvikvm( 7131): VFY: unable to resolve virtual method 231: Landroid/webkit/CookieManager;.setAcceptThirdPartyCookies (Landroid/webkit/WebView;Z)V
D/dalvikvm( 7131): VFY: replacing opcode 0x6e at 0x0016
I/dalvikvm( 7131): Could not find method android.webkit.CookieManager.flush, referenced from method org.apache.cordova.engine.SystemCookieManager.flush
W/dalvikvm( 7131): VFY: unable to resolve virtual method 225: Landroid/webkit/CookieManager;.flush ()V
D/dalvikvm( 7131): VFY: replacing opcode 0x6e at 0x0008
W/dalvikvm( 7131): VFY: unable to find class referenced in signature (Landroid/webkit/ClientCertRequest;)
W/dalvikvm( 7131): VFY: unable to find class referenced in signature (Landroid/webkit/ClientCertRequest;)
I/dalvikvm( 7131): Could not find method android.webkit.WebViewClient.onReceivedClientCertRequest, referenced from method org.apache.cordova.engine.SystemWebViewClient.onReceivedClientCertRequest
W/dalvikvm( 7131): VFY: unable to resolve virtual method 295: Landroid/webkit/WebViewClient;.onReceivedClientCertRequest (Landroid/webkit/WebView;Landroid/webkit/ClientCertRequest;)V
D/dalvikvm( 7131): VFY: replacing opcode 0x6f at 0x001a
I/dalvikvm( 7131): Could not find method android.webkit.WebChromeClient$FileChooserParams.createIntent, referenced from method org.apache.cordova.engine.SystemWebChromeClient.onShowFileChooser
W/dalvikvm( 7131): VFY: unable to resolve virtual method 245: Landroid/webkit/WebChromeClient$FileChooserParams;.createIntent ()Landroid/content/Intent;
D/dalvikvm( 7131): VFY: replacing opcode 0x6e at 0x0000
D/SystemWebViewEngine( 7131): CordovaWebView is running on device made by: Genymotion
I/dalvikvm-heap(  496): Grow heap (frag case) to 24.353MB for 6869836-byte allocation
D/dalvikvm(  496): GC_CONCURRENT freed 0K, 6% free 24918K/26496K, paused 2ms+1ms, total 4ms
D/dalvikvm( 7131): GC_FOR_ALLOC freed 157K, 3% free 8695K/8880K, paused 2ms, total 7ms
I/dalvikvm-heap( 7131): Grow heap (frag case) to 12.029MB for 3686412-byte allocation
D/dalvikvm( 7131): GC_FOR_ALLOC freed 2K, 2% free 12293K/12484K, paused 3ms, total 3ms
D/dalvikvm( 7131): GC_CONCURRENT freed <1K, 2% free 12293K/12484K, paused 1ms+0ms, total 2ms
W/WhitelistPlugin( 7131): Found <access launch-external> within config.xml. Please use <allow-intent> instead.
W/WhitelistPlugin( 7131): Found <access launch-external> within config.xml. Please use <allow-intent> instead.
W/WhitelistPlugin( 7131): Found <access launch-external> within config.xml. Please use <allow-intent> instead.
W/WhitelistPlugin( 7131): Found <access launch-external> within config.xml. Please use <allow-intent> instead.
W/WhitelistPlugin( 7131): Found <access launch-external> within config.xml. Please use <allow-intent> instead.
D/libEGL  ( 7131): loaded /system/lib/egl/libEGL_genymotion.so
D/        ( 7131): HostConnection::get() New Host Connection established 0xb7ea8328, tid 7131
D/dalvikvm(  375): GC_CONCURRENT freed 682K, 21% free 11942K/15092K, paused 0ms+0ms, total 10ms
D/libEGL  ( 7131): loaded /system/lib/egl/libGLESv1_CM_genymotion.so
D/libEGL  ( 7131): loaded /system/lib/egl/libGLESv2_genymotion.so
W/EGL_genymotion(  496): eglSurfaceAttrib not implemented
W/EGL_genymotion( 7131): eglSurfaceAttrib not implemented
W/EGL_genymotion(  496): eglSurfaceAttrib not implemented
D/OpenGLRenderer( 7131): Enabling debug mode 0
W/EGL_genymotion( 7131): eglSurfaceAttrib not implemented
W/IInputConnectionWrapper(  627): showStatusIcon on inactive InputConnection
D/JsMessageQueue( 7131): Set native->JS mode to OnlineEventsBridgeMode
I/ActivityManager(  375): Displayed com.ionicframework.enhatch146189/.MainActivity: +467ms
I/qtaguid (  375): Failed write_ctrl(s 0 10023) res=-1 errno=1
W/NetworkManagementSocketTagger(  375): setKernelCountSet(10023, 0) failed with errno -1
D/dalvikvm( 7131): GC_CONCURRENT freed 322K, 4% free 13121K/13528K, paused 0ms+0ms, total 2ms
D/CordovaNetworkManager( 7131): Connection Type: wifi
D/CordovaNetworkManager( 7131): Connection Extra Info: "WiredSSID"
D/TilesManager( 7131): Starting TG #0, 0xb82bae28
D/TilesManager( 7131): new EGLContext from framework: b822f0a8
D/GLWebViewState( 7131): Reinit shader
D/GLWebViewState( 7131): Reinit transferQueue
D/CordovaNetworkManager( 7131): Connection Type: wifi
D/CordovaNetworkManager( 7131): Connection Extra Info: "WiredSSID"
D/dalvikvm(  375): GC_EXPLICIT freed 106K, 21% free 11937K/15092K, paused 0ms+1ms, total 6ms
W/EGL_genymotion(  496): eglSurfaceAttrib not implemented
D/Genyd   (   56): Received Set Clipboard
D/Genymotion(   56): Received Set Clipboard
W/EGL_genymotion(  496): eglSurfaceAttrib not implemented
D/dalvikvm(  375): GC_FOR_ALLOC freed 491K, 22% free 11915K/15092K, paused 5ms, total 5ms
I/ActivityManager(  375): START u0 {act=com.android.systemui.recent.action.TOGGLE_RECENTS flg=0x10800000 cmp=com.android.systemui/.recent.RecentsActivity (has extras)} from pid 496
D/dalvikvm(  375): GC_FOR_ALLOC freed 383K, 22% free 11915K/15092K, paused 5ms, total 6ms
W/genymotion_audio(  420): out_write() limiting sleep time 69659 to 23219
W/genymotion_audio(  420): out_write() limiting sleep time 69659 to 23219
D/dalvikvm(  375): GC_FOR_ALLOC freed 40K, 19% free 12287K/15092K, paused 5ms, total 5ms
I/dalvikvm-heap(  375): Grow heap (frag case) to 12.389MB for 380492-byte allocation
D/dalvikvm(  375): GC_FOR_ALLOC freed <1K, 19% free 12658K/15464K, paused 5ms, total 5ms
D/SurfaceFlinger(  419): setOrientation, mFbdev=0xb7f69658, mFbDev->setOrientation=0xb6725e20, orientation=0
I/gralloc_vbox86(  419): setOrientation: orientation=0
I/ActivityManager(  375): Config changes=1480 {1.0 310mcc260mnc en_US ldltr sw384dp w384dp h567dp 320dpi nrml port finger qwerty/v/v dpad/v s.41}
W/genymotion_audio(  420): out_write() limiting sleep time 34829 to 23219
I/InputReader(  375): Reconfiguring input devices.  changes=0x00000004
I/InputReader(  375): Device reconfigured: id=1, name='Genymotion Virtual Input', size 768x1280, orientation 0, mode 1, display id 0
I/InputReader(  375): Device reconfigured: id=2, name='Genymotion via VirtualBox seamless mouse', size 768x1280, orientation 0, mode 3, display id 0
D/dalvikvm(  496): GC_FOR_ALLOC freed 13472K, 52% free 12746K/26496K, paused 3ms, total 3ms
I/dalvikvm-heap(  496): Grow heap (frag case) to 18.580MB for 6410572-byte allocation
D/dalvikvm(  496): GC_CONCURRENT freed 417K, 30% free 18588K/26496K, paused 1ms+1ms, total 5ms
D/dalvikvm(  496): GC_FOR_ALLOC freed <1K, 30% free 18588K/26496K, paused 2ms, total 2ms
I/dalvikvm-heap(  496): Grow heap (frag case) to 24.723MB for 6869836-byte allocation
D/dalvikvm(  496): GC_CONCURRENT freed 0K, 5% free 25297K/26496K, paused 1ms+0ms, total 3ms
W/EGL_genymotion(  496): eglSurfaceAttrib not implemented
W/EGL_genymotion(  496): eglSurfaceAttrib not implemented
W/EGL_genymotion(  496): eglSurfaceAttrib not implemented
W/EGL_genymotion(  496): eglSurfaceAttrib not implemented
I/ActivityManager(  375): Displayed com.android.systemui/.recent.RecentsActivity: +167ms
W/IInputConnectionWrapper( 7131): showStatusIcon on inactive InputConnection
I/qtaguid (  375): Failed write_ctrl(s 0 10051) res=-1 errno=1
W/NetworkManagementSocketTagger(  375): setKernelCountSet(10051, 0) failed with errno -1
D/dalvikvm(  375): GC_FOR_ALLOC freed 1020K, 23% free 11932K/15464K, paused 5ms, total 5ms
I/ActivityManager(  375): Killing 7131:com.ionicframework.enhatch146189/u0a10051: remove task
I/WindowState(  375): WIN DEATH: Window{5367e78c u0 com.ionicframework.enhatch146189/com.ionicframework.enhatch146189.MainActivity}
I/qtaguid (  375): Failed write_ctrl(s 1 10023) res=-1 errno=1
W/NetworkManagementSocketTagger(  375): setKernelCountSet(10023, 1) failed with errno -1
W/EGL_genymotion(  627): eglSurfaceAttrib not implemented
W/ResourceType(  375): Skipping entry 0x7f05000e in package table 0 because it is not complex!
W/ResourceType(  375): Skipping entry 0x7f05000f in package table 0 because it is not complex!
D/dalvikvm(  375): GC_EXPLICIT freed 442K, 23% free 11916K/15464K, paused 1ms+0ms, total 11ms

I’ve tried adding logs, but I’m not natively a Java Developer and don’t know my way around Android’s environment too well. My document never hits the page, as if it did I’d see an alert, so I don’t think the webview is even loading.

Has anyone encountered this? It works fine on Android 4.4 and higher. My target version is set to 15, as I don’t use any pre-4.0 features.

Have you tried adding Crosswalk to your build? Might be a good place to start although there’s no inherent reason your app shouldn’t work on 4.2.

Crosswalk caused a memory leak in our app that caused it to crash constantly, making it unusable.