Bug 20848 - System.Net.HttpWebRequest failing to load data
Summary: System.Net.HttpWebRequest failing to load data
Status: RESOLVED DOWNSTREAM
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: 7.2.4
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-06-24 11:38 UTC by Allie Miller
Modified: 2014-06-26 03:57 UTC (History)
4 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 DOWNSTREAM

Description Allie Miller 2014-06-24 11:38:06 UTC
Overview
When selecting the "Sync" button in the attached test project, the data fails to load from with the following error in the Application Output:
2014-06-13 16:26:14.622 MonoErrorTest[24254:70b] at System.Net.HttpWebRequest.CheckFinalStatus (System.Net.WebAsyncResult result) [0x0033b] in /Developer/MonoTouch/Source/mono/mcs/class/System/System.Net/HttpWebRequest.cs:1747<http://System.Net/HttpWebRequest.cs:1747>;
at System.Net.HttpWebRequest.SetResponseData (System.Net.WebConnectionData data) [0x00165] in /Developer/MonoTouch/Source/mono/mcs/class/System/System.Net/HttpWebRequest.cs:1514<http://System.Net/HttpWebRequest.cs:1514>;
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs:62
at System.Runtime.CompilerServices.TaskAwaiter`1[Xamarin.Auth.Response].GetResult () [0x00034] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.CompilerServices/TaskAwaiter_T.cs:59
at Salesforce.SalesforceClientExtensions+<ReadAsync>c__async3.MoveNext () [0x00000] in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs:62
at System.Runtime.CompilerServices.TaskAwaiter`1[System.Collections.Generic.IEnumerable`1[Salesforce.SObject]].GetResult () [0x00034] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.CompilerServices/TaskAwaiter_T.cs:59
at MonoErrorTest.MonoErrorTestViewController+<LoadData>c__async1.MoveNext () [0x0008c] in /Users/admin/Desktop/Raghu/MonoErrorTest/MonoErrorTest/MonoErrorTestViewController.cs:97

To Reproduce
1) Run the attached project in an iOS simulator
2) Login using the credentials in the attachment comment
3) Select the "Sync" button 

Expected Results
The data from Salesforce will appear

Actual Results
The error message will be displayed in the Application Output pane and the simulator screen will remain blank. 

Versioning Information
=== Xamarin Studio ===
Version 5.0.1 (build 3)
Installation UUID: f6a3c61f-a7e2-4740-ba09-86314760e340
Runtime:
	Mono 3.4.0 ((no/954ed3c)
	GTK+ 2.24.23 (Raleigh theme)
	Package version: 304000214
=== Apple Developer Tools ===
Xcode 5.1.1 (5085)
Build 5B1008
=== Xamarin.Mac ===
Xamarin.Mac: 1.8.0.8
=== Xamarin.Android ===
Version: 4.12.5 (Enterprise Edition)
Android SDK: /Users/amiller/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   (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)
Java SDK: /usr
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)
=== Xamarin.iOS ===
Version: 7.2.4.4 (Enterprise Edition)
Hash: 5485ac2
Branch: 
Build date: 2014-06-11 13:44:48-0400
=== Build Information ===
Release ID: 500010003
Git revision: f94ee866936d25105704eb63728ad5a981eda0a4
Build date: 2014-06-04 12:19:12-04
Xamarin addins: 1a6044e8321ea07e03a56b5381951686c82fed8b
=== Operating System ===
Mac OS X 10.9.3
Darwin Allies-MacBook-Air.local 13.2.0 Darwin Kernel Version 13.2.0
    Thu Apr 17 23:03:13 PDT 2014
    root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64
Comment 2 Ram Chandra 2014-06-24 12:56:48 UTC
I have checked this issue but I am unable to reproduce this issue. 
After the login it ask for verification code when I write the "60479" it shows an error message i.e "Invalid or expire verification code. Try again".

Screencast:http://www.screencast.com/t/POMLd02X

Could you please provide us a new verification code so that we can reproduce this issue at our end.
Comment 3 Raghavender 2014-06-25 01:46:32 UTC
The new Verification code: 73266. It will be valid for next 24 hours only.
Comment 4 Ram Chandra 2014-06-25 04:22:20 UTC
I have checked this issue and I am able to reproduce this issue.

Steps to reproduce:

1. Open the attached project on XS.
2. Deploy the attached project on iOS simulator.
3. Enter the valid credential (as mentioned in "Comment 1").
4. Enter the valid verification code i.e. "73266".
5. Tap the "sync" button.
6. An exception will occur.

I observed that when I tap the "Sync" button there is an "System.Net.WebException".

Screencast: http://www.screencast.com/t/Jgh045nTFBy

Application output: https://gist.github.com/saurabh360/93fc8352db50a08e281d

IDE logs: https://gist.github.com/saurabh360/cffc14496435af2cfd2f

Environment Info:

Mac OS X 10.9.3
Xamarin Studio: 5.0.1 (build 3)
Xamarin.iOS: 7.2.3.39 (Enterprise Edition)

Build Information
Release ID: 500010003
Git revision: f94ee866936d25105704eb63728ad5a981eda0a4
Build date: 2014-06-04 12:19:12-04
Xamarin addins: 1a6044e8321ea07e03a56b5381951686c82fed8b
Comment 5 Rolf Bjarne Kvinge [MSFT] 2014-06-25 12:01:11 UTC
Apparently the verification codes can't be re-used, I just tried and it says "Invalid or expired verification code. Try again."