Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-2391

colons in URIs crash WebView

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • 2.3.0
    • 3.6.0
    • cordova-android
    • Seen on Nexus 4, Android 4.2.1

    Description

      With useBrowserHistory (true) the application crashes when returning from WebView (using the android back button).

      Reproduce:
      1) So from the Cordova App page (file:///android_asset/www/app.html#BackPlace:null) the user clicks on a link (e.g. www.google.com) which opens the WebView.
      2) When clicking the back button to return to the app, the app crashes with the exception below.

      Guess:
      I wonder if the hash in the originating cordova app page could be the core of this problem (e.g. file:///android_asset/www/app.html#BackPlace:null).

      Note:
      The app does not crash when setting useBrowserHistory to false!

      >>
      02-07 01:09:45.979: E/dalvikvm(8542): Class lookup Landroid/webkit/WebResourceResponse; attempted with exception pending
      02-07 01:09:45.979: W/dalvikvm(8542): Pending exception is:
      02-07 01:09:45.979: I/dalvikvm(8542): java.lang.NullPointerException:
      02-07 01:09:45.979: I/dalvikvm(8542): at android.content.res.AssetManager.openAsset(Native Method)
      02-07 01:09:45.979: I/dalvikvm(8542): at android.content.res.AssetManager.open(AssetManager.java:315)
      02-07 01:09:45.979: I/dalvikvm(8542): at android.webkit.BrowserFrame.inputStreamForAndroidResource(BrowserFrame.java:765)
      02-07 01:09:45.979: I/dalvikvm(8542): at android.webkit.BrowserFrame.shouldInterceptRequest(BrowserFrame.java:852)
      02-07 01:09:45.979: I/dalvikvm(8542): at android.webkit.BrowserFrame.nativeGoBackOrForward(Native Method)
      02-07 01:09:45.979: I/dalvikvm(8542): at android.webkit.BrowserFrame.goBackOrForward(BrowserFrame.java:346)
      02-07 01:09:45.979: I/dalvikvm(8542): at android.webkit.WebViewCore$EventHub$1.handleMessage(WebViewCore.java:1400)
      02-07 01:09:45.979: I/dalvikvm(8542): at android.os.Handler.dispatchMessage(Handler.java:99)
      02-07 01:09:45.979: I/dalvikvm(8542): at android.os.Looper.loop(Looper.java:137)
      02-07 01:09:45.979: I/dalvikvm(8542): at android.webkit.WebViewCore$WebCoreThread.run(WebViewCore.java:812)
      02-07 01:09:45.979: I/dalvikvm(8542): at java.lang.Thread.run(Thread.java:856)
      02-07 01:09:45.979: I/dalvikvm(8542): DALVIK THREADS:
      02-07 01:09:45.979: I/dalvikvm(8542): (mutexes: tll=0 tsl=0 tscl=0 ghl=0)
      02-07 01:09:45.979: D/DroidGap(8542): onMessage(onPageStarted,file:///android_asset/www/app.html#BackPlace:null)
      02-07 01:09:45.979: I/dalvikvm(8542): "main" prio=5 tid=1 NATIVE
      02-07 01:09:45.989: I/dalvikvm(8542): | group="main" sCount=0 dsCount=0 obj=0x40cfc9a0 self=0x40701bf8
      02-07 01:09:45.989: I/dalvikvm(8542): | sysTid=8542 nice=0 sched=0/0 cgrp=apps handle=1074258908
      02-07 01:09:45.989: I/dalvikvm(8542): | state=S schedstat=( 0 0 0 ) utm=97 stm=76 core=0
      02-07 01:09:45.999: I/dalvikvm(8542): #00 pc 00017ee4 /system/lib/libc.so (epoll_wait+12)
      <<

      Attachments

        Activity

          People

            bowserj Joey Robert Bowser
            roberth Robert Hoffmann
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: