Bug 58490 - SocketRocket sends an incorrect HTTP request when an app comes out of hibernation and tries to rejuvenate itself
Summary: SocketRocket sends an incorrect HTTP request when an app comes out of hiberna...
Status: RESOLVED NORESPONSE
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll (show other bugs)
Version: XI 10.99 (xcode9)
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-07-30 04:32 UTC by me
Modified: 2017-10-19 15:12 UTC (History)
3 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 me 2017-07-30 04:32:23 UTC
I'm using SocketRocket with the Xamarin wrapper you have provided. I'm filing this bug with you because I think it's more likely that the bug is with your code than theirs.

I new up an instance of the SocketRocket client per the documentation. It works fine, submits a GET request to the server, and things proceed nicely.

Then I command-home the app, wait till things time out, and bring the app up out of the background. In that case I've coded the app to reconstruct the SR client from scratch (per documentation and various examples I've found).

When I do this, it submits the same GET request to the server, but the first line of the handshake data is corrupted. It should come through as "GET HTTP 1.1" or similar. Instead, it's coming through as "<garbage>GET HTTP 1.1", where <garbage> == an ASCII rendering of some obviously unintended stuff.

If I kill the app and restart it, the request is correct. That's why I'm blaming the client and not the server.

I really don't know the problem is in the Xamarin wrapper, but frankly I can't believe this use case hasn't been hammered on by the community that's using SocketRocket. 


Here's version my version info. I'm using the latest versions of all of the libraries involved.

Version info:

=== Visual Studio Professional 2017 for Mac ===

Version 7.0.1 (build 24)
Installation UUID: 80bdf4df-6962-44ea-9d7f-e27c65860cbf
Runtime:
	Mono 5.0.1.1 (2017-02/5077205) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 500010001

=== NuGet ===

Version: 4.0.0.2323

=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet
SDK: /usr/local/share/dotnet/sdk/1.0.3/Sdks
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Sdks

=== Xamarin.Profiler ===

Version: 1.5.4
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Xamarin.Android ===

Version: 7.3.1.2 (Visual Studio Professional)
Android SDK: /Users/jblackburn/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		6.0 (API level 23)

SDK Tools Version: 25.2.5
SDK Platform Tools Version: 25.0.5
SDK Build Tools Version: 25.0.3

Java SDK: /usr
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Apple Developer Tools ===

Xcode 8.3.3 (12175.1)
Build 8E3004b

=== Xamarin.iOS ===

Version: 10.10.0.36 (Visual Studio Professional)
Hash: d2270eec
Branch: d15-2
Build date: 2017-05-22 16:30:53-0400

=== Xamarin Inspector ===

Version: 1.2.2
Hash: b71b035
Branch: d15-1
Build date: Fri, 21 Apr 2017 17:57:12 GMT

=== Xamarin.Mac ===

Version: 3.4.0.36 (Visual Studio Professional)

=== Build Information ===

Release ID: 700010024
Git revision: 7ab1ca2ced6f584e56b7a0d4d321d00775cd95c9
Build date: 2017-05-19 05:44:51-04
Xamarin addins: 08d17158f3365beee5e60f67999e607cce4b3f93
Build lane: monodevelop-lion-d15-2

=== Operating System ===

Mac OS X 10.12.6
Darwin 16.7.0 Darwin Kernel Version 16.7.0
    Thu Jun 15 17:36:27 PDT 2017
    root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64
Comment 1 Timothy Risi 2017-07-31 17:23:11 UTC
Hi,

Would you be able to provide a simple repro project that demonstrates the issue?
Comment 2 Manuel de la Peña [MSFT] 2017-09-11 11:13:50 UTC
As @Tim requested, would be nice to have a project that can be used for testing. If you have found a workaround or the reason for the bug we would also appreciate the info.
Comment 3 Manuel de la Peña [MSFT] 2017-10-19 15:12:18 UTC
Hello,

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!