Bug 16914 - [Release]Getting exception "System.Net.WebException: Error: NameResolutionFailure" for android mobile sample 'AsyncAwait'
Summary: [Release]Getting exception "System.Net.WebException: Error: NameResolutionFai...
Alias: None
Product: Android
Classification: Xamarin
Component: Samples ()
Version: 4.12.0
Hardware: PC All
: Normal normal
Target Milestone: ---
Assignee: Peter Collins
Depends on:
Reported: 2013-12-20 06:59 UTC by Prashant manu
Modified: 2014-01-06 07:38 UTC (History)
5 users (show)

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:

Description Prashant manu 2013-12-20 06:59:43 UTC
Steps to reproduce:
1. Open Android Mobile Sample 'AsyncAwait'
2. Run the sample in Release mode.
3. Click on 'Get Async' button.

Actual Result: Application get crashed.

Expected Result: It should load image.

Supplement info:
Application Output: https://gist.github.com/saurabh360/c69c9bc333ca8194986a
Android Log: https://gist.github.com/saurabh360/67f95b938090810baee0
ADB Logcat: https://gist.github.com/saurabh360/7dda584c2b2d6d481057

Environment details:
All Mac and Windows
X.S 4.2.3(build 23)- 067989d9274b9f0fbd959336e60f8a5c1a75bc48
X.Android 4.11.0-10(windows)
X.Android 4.11.0-15(mac)

Regression Status: Same behavior happening with stable X.Android 4.10.1-68/73
Comment 1 PJ 2014-01-02 13:03:46 UTC
I can reproduce the bug with the default release configuration.

With a little bit of toying around, I found it doesn't happen in release configuration with full debug information and the 'DEBUG' symbol defined. It will require more investigation. 

Assigning to Craig (original author).
Comment 2 Peter Collins 2014-01-02 13:11:17 UTC
I think it's just missing the INTERNET permission in the manifest, I'll fix it.
Comment 3 PJ 2014-01-02 13:16:33 UTC
Ahh yes you're exactly right. I should have checked that first.  

We could definitely have a more guided error message here.
Comment 4 Peter Collins 2014-01-02 13:19:44 UTC
FIxed in https://github.com/xamarin/mobile-samples/commit/26e924d16c8cfa2751c824b9c7af1fba9b713a32

The device will also need to be properly connected to a network or this will manifest.
Comment 5 Saurabh 2014-01-06 07:38:24 UTC
We have checked this issue with latest mobile sample:


Emulator API 19(android 4.4)
LG Nexus (android 4.4.2)

Now, On RELEASE mode, on clicking on 'Get Async' button, image downloaded successfully and application does not throw any exception.

Hence, clicking on 'Get Async' button, image downloaded successfully on Debug and Release both mode.