Bug 27808 - [Android] WebView loads with incorrect parameter
Summary: [Android] WebView loads with incorrect parameter
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.4.1
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-03-09 23:45 UTC by Cody Beyer (MSFT)
Modified: 2015-03-27 15:41 UTC (History)
5 users (show)

Tags:
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 FIXED

Description Cody Beyer (MSFT) 2015-03-09 23:45:59 UTC
### Description

The following test project has three buttons which load three different web sites in a webview. When you cycle the network connection off and then back on, followed by an attempt to load the web pages, the result is always a failure, even though the page loads. Given the following check

			if (e.Result == 0 || e.Result == WebNavigationResult.Success)
			{
				// Everything is OK, return (But why result == 0 for the first time?)
				return;
			}

### Test Project

https://www.dropbox.com/s/kcbonhmh7gkg8qe/WebViewTest.zip?dl=0

### Steps to Reproduce

1. Download and open test project
2. Run on a device
3. click the buttons to load web pages
4. cycle airplane mode on
5. try to load pages
6. turn airplane mode back off
7. Place breakpoint on line 28 of MainPage.xaml.cx
7. try to load pages again

### Expected Results

The result should show as success = true (e.result = 1)

### Actual Results

It shows as 0

### Version 

=== Xamarin Studio ===

Version 5.8 (build 431)
Installation UUID: fe050df7-44bb-4337-87ab-a8e27643bb7d
Runtime:
	Mono 3.12.1 ((detached/b7764aa)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 312010000

=== Apple Developer Tools ===

Xcode 6.1.1 (6611)
Build 6A2008a

=== Xamarin.iOS ===

Version: 8.6.2.26 (Business Edition)
Hash: 9905782
Branch: 
Build date: 2015-02-26 11:05:07-0500

=== Xamarin.Android ===

Version: 4.20.0.28 (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.2   (API level 17)
		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

=== Xamarin.Mac ===

Version: 1.10.0.18 (Business Edition)

=== Build Information ===

Release ID: 508000431
Git revision: 5415bcba0b0e3085ccc932aca663e546538b01c9
Build date: 2015-03-01 20:17:45-05
Xamarin addins: f0aa1df37165aaed8c223aa74fba372008f302a7

=== Operating System ===

Mac OS X 10.10.2
Darwin byrc-mbp.local 14.1.0 Darwin Kernel Version 14.1.0
    Mon Dec 22 23:10:38 PST 2014
    root:xnu-2782.10.72~2/RELEASE_X86_64 x86_64
Comment 1 Ram Chandra 2015-03-16 07:35:38 UTC
I have checked this issue and with the help of steps mentioned in bug description and I am able to reproduce this issue.

Observation: When I tap on the button when "airplane" mode is off "e.result " result shows 0 and when I enable the "airplane mode" it show "failure" and again disable the "airplane" mode it shows the "Failure". However when I follow the same steps when "airplane mode" is enable first time when we deploy app on device "e.result " shows the "0".

Application Output: https://gist.github.com/saurabh360/3b91d1631a4826adaef2
IDE logs: https://gist.github.com/saurabh360/e797a25330f97011e2a7
Device logs: https://gist.github.com/saurabh360/d32fd0fa5f36e633c6df

Enviornment Info:

Xamarin.Forms: 1.4.1.342-pre1

=== Xamarin Studio ===

Version 5.9 (build 218)
Installation UUID: 6ea47b0d-1852-4aaf-808d-373ff0a5002b
Runtime:
	Mono 4.0.0 ((detached/565c18b)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400000068

=== Apple Developer Tools ===

Xcode 6.0.1 (6528)
Build 6A317

=== Xamarin.iOS ===

Version: 8.10.0.110 (Enterprise Edition)
Hash: 1a6d7a6
Branch: master
Build date: 2015-03-14 05:56:21-0400

=== Xamarin.Android ===

Version: 4.20.1.0 (Enterprise Edition)
Android SDK: /Users/jatin66/Desktop/Backup/android-sdk-macosx
	Supported Android versions:
		1.6    (API level 4)
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		4.0    (API level 14)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Xamarin Android Player ===

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

=== Xamarin.Mac ===

Version: 2.0.0.84 (Enterprise Edition)

=== Build Information ===

Release ID: 509000218
Git revision: 908c39cbafdaf712059565e80591c06830fdf590
Build date: 2015-03-13 15:05:04-04
Xamarin addins: a87d89e3612e207fe3ccc142b1c2a2eb0deff730

=== Operating System ===

Mac OS X 10.10.0
Darwin Jatin66s-iMac.local 14.0.0 Darwin Kernel Version 14.0.0
    Fri Sep 19 00:26:44 PDT 2014
    root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64
Comment 2 Eric Maupin 2015-03-27 15:41:37 UTC
This should be fixed in 1.4.2-pre1