Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intermittent app crash SocketException No such host is known #30

Open
garie opened this issue Aug 22, 2020 · 2 comments
Open

Intermittent app crash SocketException No such host is known #30

garie opened this issue Aug 22, 2020 · 2 comments

Comments

@garie
Copy link

garie commented Aug 22, 2020

Bug

Plugin Version: 1.1.2
Platform: iOS 13.6.1
Device/Hardware: iPad 6th Gen, WiFi

This was reported by Apple and my app was rejected because of it. I wasn't able to reproduce the issue locally so I'm not sure if it is dependent upon a server being down or anything like that. I looked at your code and it's got a catch (Exception) so I don't understand why this caused a crash. I'm suspicious of the RedirectHandler in there - maybe itunes.apple.com returned a 3xx response? In any case, I have no idea what the issue is or how to fix it.

Stack trace SIGABRT: SocketException No such host is known

ConnectHelper.ConnectAsync (System.String host, System.Int32 port, System.Threading.CancellationToken cancellationToken)
HttpConnectionPool.CreateConnectionAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken)
HttpConnectionPool.WaitForCreatedConnectionAsync (System.Threading.Tasks.ValueTask`1[TResult] creationTask)
HttpConnectionPool.SendWithRetryAsync (System.Net.Http.HttpRequestMessage request, System.Boolean doRequestAuth, System.Threading.CancellationToken cancellationToken)
RedirectHandler.SendAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken)
HttpClient.FinishSendAsyncBuffered (System.Threading.Tasks.Task`1[TResult] sendTask, System.Net.Http.HttpRequestMessage request, System.Threading.CancellationTokenSource cts, System.Boolean disposeCts)
LatestVersionImplementation.GetLatestVersionNumber (System.String appName)
LatestVersionImplementation.GetLatestVersionNumber ()
LatestVersionImplementation.IsUsingLatestVersion ()
@garie
Copy link
Author

garie commented Aug 22, 2020

Looking through some App Center diagnostics from a few days ago, I actually see a similar (not identical) crash on Android 10 on a Pixel. I didn't investigate the crash at the time it happened but this was a real device which was connected to my home WiFi which didn't have any hiccups as far as I'm aware.

System.IO.IOException: Remote prematurely closed connection.
AsyncProtocolRequest.ProcessOperation (System.Threading.CancellationToken cancellationToken) /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/System/Mono.Net.Security/AsyncProtocolRequest.cs:211
AsyncProtocolRequest.StartOperation (System.Threading.CancellationToken cancellationToken) /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/System/Mono.Net.Security/AsyncProtocolRequest.cs:187
MobileAuthenticatedStream.ProcessAuthentication (System.Boolean runSynchronously, Mono.Net.Security.MonoSslAuthenticationOptions options, System.Threading.CancellationToken cancellationToken) /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs:310
ConnectHelper.EstablishSslConnectionAsyncCore (System.IO.Stream stream, System.Net.Security.SslClientAuthenticationOptions sslOptions, System.Threading.CancellationToken cancellationToken) /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectHelper.cs:165
ConnectHelper.EstablishSslConnectionAsyncCore (System.IO.Stream stream, System.Net.Security.SslClientAuthenticationOptions sslOptions, System.Threading.CancellationToken cancellationToken) /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectHelper.cs:176
ValueTask`1[TResult].get_Result () /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/corefx/src/Common/src/CoreLib/System/Threading/Tasks/ValueTask.cs:813
HttpConnectionPool.CreateConnectionAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs:408
ValueTask`1[TResult].get_Result () /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/corefx/src/Common/src/CoreLib/System/Threading/Tasks/ValueTask.cs:813
HttpConnectionPool.WaitForCreatedConnectionAsync (System.Threading.Tasks.ValueTask`1[TResult] creationTask) /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs:543
ValueTask`1[TResult].get_Result () /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/corefx/src/Common/src/CoreLib/System/Threading/Tasks/ValueTask.cs:813
HttpConnectionPool.SendWithRetryAsync (System.Net.Http.HttpRequestMessage request, System.Boolean doRequestAuth, System.Threading.CancellationToken cancellationToken) /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs:284
RedirectHandler.SendAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/RedirectHandler.cs:32
HttpClient.FinishSendAsyncBuffered (System.Threading.Tasks.Task`1[TResult] sendTask, System.Net.Http.HttpRequestMessage request, System.Threading.CancellationTokenSource cts, System.Boolean disposeCts) /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/corefx/src/System.Net.Http/src/System/Net/Http/HttpClient.cs:506
LatestVersionImplementation.GetLatestVersionNumber (System.String appName) C:\projects\latestversionplugin\src\Plugin.LatestVersion.Android\LatestVersionImplementation.cs:69
LatestVersionImplementation.GetLatestVersionNumber () C:\projects\latestversionplugin\src\Plugin.LatestVersion.Android\LatestVersionImplementation.cs:49
LatestVersionImplementation.IsUsingLatestVersion () C:\projects\latestversionplugin\src\Plugin.LatestVersion.Android\LatestVersionImplementation.cs:36

@garie
Copy link
Author

garie commented Aug 22, 2020

I wrapped the call to IsUsingLatestVersion in a try-catch and added error tracking in the catch so I'll see if this happens again and report back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant