Cynosure.X International LLC

: :

Add Comment | Related Links | TrackBack
Related Content

Android 4 has a "file:///android_asset/webkit/" bug?

Ever since we upgraded to Android 4 (Ice Cream Sandwich), we've been experiencing a strange behavior with WebView. We noticed that on some web pages, after it has completed loading, the WebView redirects its content to a new page that says the following:

Webpage not available

The webpage at file:///android_asset/webkit/ might be temporarily down or it may have moved permanently to a new web address.

Suggestions:

  • Make sure you have a data connection
  • Reload this webpage later
  • Check the address you entered

Funny thing, we saw the web page load in the WebView component. The page didn't get redirected until it almost completed loading. The URL was correct because we saw the correct page render. We are now running on Android 4.1.2, but we've seen this behavior on Android 4.0.3 as well.

We tested the same app on Android 2.2 and the WebView content didn't get redirected to this strange webkit page. We can't put our finger on what's causing it. But all symptoms points to a bug in Ice Cream Sandwich.

Mel
Thu, 08 Nov 2012 03:30:36 +0300

Just ran into the same thing. I have a custom WebViewClient class that is set in the WebView. A simple override to shouldOverrideUrlLoading was the fix for me.

@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
// Found a bug on some page where there is an incorrect
// auto-redirect to file:///android_asset/webkit/.
if ( !url.equals("file:///android_asset/webkit/") ) {
view.loadUrl(url);
}
return true;
}

Sven
Sat, 09 Feb 2013 02:30:38 +0300

Thanks, Sven. That did the trick. We believe this bug occurs when WebView goes to a page that contains Adobe Flash.

Jack
Mon, 11 Feb 2013 11:59:12 +0300

Add Comment | Related Links | TrackBack
Related Content

Did your message disappear? Read the Forums FAQ.

Add Comment

Spam Control | * indicates required field
Your Name: *
E-mail:
Remember Me!
Comment: *
File attachment is optional. Please do not attach a file to your submission unless it is relevent.
Attach File:
(20 MB Max)
Spam Protection: * Answer of 4 + 3?
Click button only once, please!

TrackBack

TrackBack only accepted from WebSite-X Suite web sites. Do not submit TrackBacks from other sites.

Send Ping | TrackBack URL | Spam Control

No TrackBacks yet. TrackBack can be used to link this thread to your weblog, or link your weblog to this thread. In addition, TrackBack can be used as a form of remote commenting. Rather than posting the comment directly on this thread, you can posts it on your own weblog. Then have your weblog sends a TrackBack ping to the TrackBack URL, so that your post would show up here.

Messages, files, and images copyright by respective owners.

Products | Services
Forums | Latest | RSS
Library | Search | Wiki
Help | Licenses

Login | Register

48 Users Online

Hacking Digital Cameras
Fun for Photographers


Get Our

Memecoins!



Amazon Associate

Copyright © 1996 - 2024. All Rights Reserved.