Bug 50204 - Why javascript XMLHttpRequest.send() method is throwing 'Network Error' if it is ran from WebView in Xamarin app. It works fine if it is ran in web browser
Summary: Why javascript XMLHttpRequest.send() method is throwing 'Network Error' if it...
Status: RESOLVED INVALID
Alias: None
Product: Forms
Classification: Xamarin
Component: Windows ()
Version: 2.3.3
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-12-16 03:34 UTC by chris hu
Modified: 2016-12-17 04:25 UTC (History)
1 user (show)

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


Attachments
javascript executed in Xamarin's WebView (38.64 KB, text/javascript)
2016-12-16 03:34 UTC, chris hu
Details


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 INVALID

Description chris hu 2016-12-16 03:34:58 UTC
Created attachment 18906 [details]
javascript executed in Xamarin's WebView

Why Synchronous XMLHttpRequest.send() javascript method is throwing 'Network Error' if it ran from WebView in Xamarin app. It works fine if it ran in default browser outside of Xamarin app. The Javascript file in attached.
Is this caused by cross-origin/domain access? If so, why is the same javascript ran fine in web browser but not in WebView. Is there any settings we need to configure in order to allow WebView execute Javacript with cross-origin access?
We are testing this on Windows UWP flatform.
Thanks