Bug 28874 - WebView renderer fails to render HTML, works in Android
Summary: WebView renderer fails to render HTML, works in Android
Status: RESOLVED NORESPONSE
Alias: None
Product: Forms
Classification: Xamarin
Component: iOS ()
Version: 1.4.2
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-04-07 22:13 UTC by Cody Beyer (MSFT)
Modified: 2016-04-08 19:35 UTC (History)
3 users (show)

Tags: RA
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NORESPONSE

Description Cody Beyer (MSFT) 2015-04-07 22:13:39 UTC
### Description

The following test app loads simple HTML into a WebView. This works correctly on Android, but appears to fail on iOS

### Test Case

https://www.dropbox.com/s/kpsjiwfyntgv6eo/RenderMyWebView.zip?dl=0

### Steps to Reproduce

1. Deploy to iOS Simulator
2. Click on "Package 1..."
3. Click Back
4. Click on "Package 2..."

### Expected Results

The WebView should render the HTML as it does on Android (https://www.dropbox.com/s/duscptwu5ahxu78/AndroidWVWorks.mov?dl=0)

### Actual Results

The WebView fails to render the HTML (https://www.dropbox.com/s/oonf07p5ibhkx8p/iOSWVFails.mov?dl=0)

### Versions

=== Xamarin Studio ===

Version 5.8.2 (build 7)
Installation UUID: 820dcb59-a50f-4482-8f02-f08048dcf6e8
Runtime:
	Mono 3.12.1 ((detached/0849ec7)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 312010003

=== Xamarin.Android ===

Version: 4.20.1.0 (Business Edition)
Android SDK: /Users/beyerc/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		4.0.3 (API level 15)
		4.4   (API level 19)
		5.0   (API level 21)
Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

=== Xamarin Android Player ===

Version: Unknown version
Location: /Applications/Xamarin Android Player.app

=== Apple Developer Tools ===

Xcode 6.2 (6776)
Build 6C131e

=== Xamarin.iOS ===

Version: 8.8.2.4 (Business Edition)
Hash: 981acb3
Branch: 
Build date: 2015-03-25 14:21:05-0400

=== Xamarin.Mac ===

Not Installed

=== Build Information ===

Release ID: 508020007
Git revision: 067ed06873402cf780f8a0899bb332c2a1c0af22
Build date: 2015-03-27 14:17:13-04
Xamarin addins: 02510c4990dee3475c282b3182d588975a63ff07

=== Operating System ===

Mac OS X 10.10.2
Darwin Codys-MacBook-Pro.local 14.1.0 Darwin Kernel Version 14.1.0
    Thu Feb 26 19:26:47 PST 2015
    root:xnu-2782.10.73~1/RELEASE_X86_64 x86_64
Comment 1 Cody Beyer (MSFT) 2015-04-13 12:33:46 UTC
The following code acts as a workaround:


//member of the ContentPage subclass (PackagePage)
bool _webViewHasLoaded = false;

//...

//within the constructor of the ContentPage subclass (PackagePage)
browser.Navigating += (sender, e) => {
if (Device.OS == TargetPlatform.iOS && !_webViewHasLoaded) {
//first Navigating call for iOS is the actual rendering of the initial WebView
_webViewHasLoaded = true;
}
else {
e.Cancel = true;
//open the navigate request in a native web browser outside of this app
Device.OpenUri(new Uri(e.Url));
}
};
Comment 2 Chris King 2015-05-27 16:46:50 UTC
We'd be happy to help you resolve this issue. Please help us by attaching a reduced reproduction to the bug by starting with a clean Xamarin.Forms project and adding just the code necessary to demonstrate the issue. If you'd do this for us we would very much appreciate it. The dropbox link has been removed.

Warm regards,
Xamarin Forms Team
Comment 3 Jason Smith [MSFT] 2016-04-08 19:35:25 UTC
Thank you for your bug report. As we have not received the information requested, we cannot properly triage your bug and are marking it resolved.

Warm regards,
Xamarin Forms Team