Bug 42153 - RestSharp not working after Xamarin Studio Update 6.0.1
Summary: RestSharp not working after Xamarin Studio Update 6.0.1
Status: RESOLVED NORESPONSE
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: XI 9.8 (tvOS / C7)
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-06-24 14:59 UTC by Tushar Modi
Modified: 2016-08-02 16:14 UTC (History)
6 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 NORESPONSE

Description Tushar Modi 2016-06-24 14:59:46 UTC
I updated Xamarin Studio to version 6.0.1. I am using RestSharp class to consume rest service.
Comment 1 Vincent Dondain [MSFT] 2016-06-24 15:16:09 UTC
Please include your full build logs, crash reports (if any), 
test case (to reproduce) and all version informations.

The easiest way to get exact version information is to use the 
"Xamarin Studio" menu, "About Xamarin Studio" item, "Show Details" 
button and copy/paste the version informations (you can use the 
"Copy Information" button).
Comment 2 Tushar Modi 2016-06-24 15:37:23 UTC
Error log:

2016-06-24 13:52:19.015 [36490:1655745] Response.ContentSystem.Net.WebException: Error: SecureChannelFailure (Unable to read data from the transport connection: Connection reset by peer.) ---> System.IO.IOException: Unable to read data from the transport connection: Connection reset by peer. ---> System.Net.Sockets.SocketException: Connection reset by peer
  at System.Net.Sockets.Socket.Receive (System.Byte[] buffer, Int32 offset, Int32 size, SocketFlags flags) [0x0004c] in /Users/builder/data/lanes/3339/39ebb778/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System/System.Net.Sockets/Socket.cs:1798 
  at System.Net.Sockets.NetworkStream.Read (System.Byte[] buffer, Int32 offset, Int32 size) [0x000b4] in /Users/builder/data/lanes/3339/39ebb778/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System/net/System/Net/Sockets/NetworkStream.cs:513 
  --- End of inner exception stack trace ---
  at Security.Tls.MobileAuthenticatedStream.ProcessAuthentication (System.Net.LazyAsyncResult lazyResult) [0x00077] in /Users/builder/data/lanes/3339/39ebb778/source/maccore/src/Security/Tls/MobileAuthenticatedStream.cs:206 
  at Security.Tls.MobileAuthenticatedStream.AuthenticateAsClient (System.String targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation) [0x0000c] in /Users/builder/data/lanes/3339/39ebb778/source/maccore/src/Security/Tls/MobileAuthenticatedStream.cs:114 
  at Mono.Net.Security.Private.MonoSslStreamWrapper.AuthenticateAsClient (System.String targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation) [0x00000] in /Users/builder/data/lanes/3339/39ebb778/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System/Mono.Net.Security/MonoSslStreamWrapper.cs:89 
  at Mono.Net.Security.MonoTlsStream.CreateStream (System.Byte[] buffer) [0x0001e] in /Users/builder/data/lanes/3339/39ebb778/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System/Mono.Net.Security/MonoTlsStream.cs:106 
  --- End of inner exception stack trace ---
  at System.Net.HttpWebRequest.EndGetResponse (IAsyncResult asyncResult) [0x0005e] in /Users/builder/data/lanes/3339/39ebb778/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System/System.Net/HttpWebRequest.cs:1005 
  at System.Net.HttpWebRequest.GetResponse () [0x0000e] in /Users/builder/data/lanes/3339/39ebb778/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System/System.Net/HttpWebRequest.cs:1019 
  at RestSharp.Http.GetRawResponse (System.Net.HttpWebRequest request) [0x00000] in <filename unknown>:0 
 

Xamarin Studio Enterprise
Version 6.0.1 (build 8)
Installation UUID: 342207b4-4c7a-4a84-82a0-836f33cb4bfc
Runtime:
Mono 4.4.1 (mono-4.4.0-branch-c7sr0/4747417) (64-bit)
GTK+ 2.24.23 (Raleigh theme)

Package version: 404010000

Xamarin.Profiler
Version: 0.0.0.0
Location: /Applications/XamarinProfiler.Mac.app/Contents/MacOS/XamarinProfiler.Mac

Xamarin.Android
Version: 6.1.1.1 (Xamarin Enterprise)
Android SDK: Not found

Xamarin Android Player
Not Installed

Apple Developer Tools
Xcode 7.3.1 (10188.1)
Build 7D1014

Xamarin.iOS
Version: 9.8.1.4 (Xamarin Enterprise)
Hash: 3cf8aae
Branch: c7sr0
Build date: 2016-06-20 16:09:58-0400

Xamarin.Mac
Version: 2.8.1.4 (Xamarin Enterprise)

Build Information
Release ID: 600010008
Git revision: 0ecc3639cde21616d675e4fdef1b858d166dd065
Build date: 2016-06-20 13:16:51-04
Xamarin addins: a9252e6df4851fbbed1f9c6228e7b6dd1b475ac5
Build lane: monodevelop-lion-cycle7-sr0

Operating System
Mac OS X 10.11.5
Darwin ISM-346s-Mac-mini.local 15.5.0 Darwin Kernel Version 15.5.0
    Tue Apr 19 18:36:36 PDT 2016
    root:xnu-3248.50.21~8/RELEASE_X86_64 x86_64
Comment 3 Tushar Modi 2016-06-27 08:23:08 UTC
I found that after Xamarin update the default SSL\TLS implementation in options is set to Apple TLS. It is causing the issue. You can switch back to the old default by setting Project Options > iOS Build > SSL/TLS implementation back to Mono (TLS v1.0).
Comment 4 Sebastien Pouliot 2016-06-27 18:28:44 UTC
@Tushar this might be a duplicate of bug #41653. However there is not enough information in this bug report to be 100% sure of it.

In case it's not (a dupe) can you attach a self-contained test case that shows the issue ? Thanks!
Comment 5 Manuel de la Peña [MSFT] 2016-08-02 16:14:14 UTC
We have not received the requested information. If you are still 
experiencing this issue please provide all the requested information 
and re-open the bug report. Thanks!