Xamarin on Visual Studio for Mac - Cannot load storyboards - visual-studio

I have been learning Xamarin and am now starting with Xamarin Classic. I'm using a late 2014 Mac mini that is pretty slow. I've installed Xcode and Visual Studio, but when I try and open any .storyboard file, the wheel spins for a while and then a MonoTouch.Design.Client.InvalidSessionException is thrown. It is responding to a CoreSimulator.SimError code 165: Unable to erase contents and settings in current state: Booted
I have the most recent version of Visual Studio installed, and Xcode 11.4. I have tried running sudo xcrun simctl shutdown all both before loading the Main.storyboard file and also while the file is loading (which was a recommended fix on StackOverflow), but neither of these worked.
I'm baffled as to what is causing this error. While I've managed to find information about the MonoTouch.Design.Client.InvalidSessionException error and the CoreSimulator.SimError, I have not been able to find both of them together.
I have absolutely no idea what is causing this to happen. I've tried downgrading to Mojave but that didn't work as Xcode 11.4 was needed for VS and that requires Catalina.
Here is the (truncated) error message from Visual Studio.
System.AggregateException: One or more errors occurred. (One or more errors occurred. (Exception of type 'MonoTouch.Design.Client.InvalidSessionException' was thrown.)) ---> System.AggregateException: One or more errors occurred. (Exception of type 'MonoTouch.Design.Client.InvalidSessionException' was thrown.) ---> MonoTouch.Design.Client.InvalidSessionException: Exception of type 'MonoTouch.Design.Client.InvalidSessionException' was thrown. ---> Foundation.NSErrorException: Error Domain=com.apple.CoreSimulator.SimError Code=165 "Unable to erase contents and settings in current state: Booted" UserInfo={NSLocalizedDescription=Unable to erase contents and settings in current state: Booted}
at MonoTouch.Hosting.Device.ResetContentAndSettings () [0x00024] in <34aca1c84ddb47319197d8fcd6d9539e>:0
at MonoTouch.Design.Client.Mac.MacServerProcessConnection.EnsureServerRunning (System.Boolean throwIfNotRunning) [0x000ff] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client.Mac/MacServerProcessConnection.cs:312
--- End of inner exception stack trace ---
at MonoTouch.Design.Client.Mac.MacServerProcessConnection.EnsureServerRunning (System.Boolean throwIfNotRunning) [0x001e8] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client.Mac/MacServerProcessConnection.cs:337
at MonoTouch.Design.Client.ServerProcessConnection.SendRequestCore (MonoTouch.Design.CommandRequest request, System.Boolean throwIfNotRunning) [0x00057] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client/Connection/ServerProcessConnection.cs:282
at MonoTouch.Design.Client.ServerProcessConnection.SendRequest (MonoTouch.Design.CommandRequest req, System.Boolean throwIfNotRunning) [0x00001] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client/Connection/ServerProcessConnection.cs:230
at MonoTouch.Design.Client.ServerProcessConnection.SendRequest[TResponse] (MonoTouch.Design.CommandRequest req, System.Boolean throwIfNotRunning) [0x00001] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client/Connection/ServerProcessConnection.cs:252
at MonoTouch.Design.Client.ServerProcessConnection.CreateSession () [0x00001] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client/Connection/ServerProcessConnection.cs:111
at MonoTouch.Design.Client.ServerProcessConnection.<CreateSessionAsync>b__28_0 () [0x00000] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client/Connection/ServerProcessConnection.cs:116
at System.Threading.Tasks.Task`1[TResult].InnerInvoke () [0x0000f] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-10/external/bockbuild/builds/mono-x64/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Future.cs:534
at System.Threading.Tasks.Task.Execute () [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-10/external/bockbuild/builds/mono-x64/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:2319
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional (System.Boolean includeTaskCanceledExceptions) [0x00013] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-10/external/bockbuild/builds/mono-x64/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:2029
at System.Threading.Tasks.Task`1[TResult].GetResultCore (System.Boolean waitCompletionNotification) [0x0002b] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-10/external/bockbuild/builds/mono-x64/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Future.cs:496
at System.Threading.Tasks.Task`1[TResult].get_Result () [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-10/external/bockbuild/builds/mono-x64/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Future.cs:466
at MonoTouch.Design.Client.IPhoneDesignerSession+<>c__DisplayClass289_1`1[TResult].<EnsureSession>b__1 (System.Threading.Tasks.Task`1[TResult] t) [0x00012] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client/IPhoneDesignerSession.cs:2072
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2[TAntecedentResult,TResult].InnerInvoke () [0x00024] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-10/external/bockbuild/builds/mono-x64/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/TaskContinuation.cs:202
at System.Threading.Tasks.Task.Execute () [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-10/external/bockbuild/builds/mono-x64/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:2319
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional (System.Boolean includeTaskCanceledExceptions) [0x00013] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-10/external/bockbuild/builds/mono-x64/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:2029
at System.Threading.Tasks.Task.Wait (System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken) [0x00043] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-10/external/bockbuild/builds/mono-x64/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:2759
at System.Threading.Tasks.Task.Wait () [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-10/external/bockbuild/builds/mono-x64/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:2625
at MonoTouch.Design.Client.IPhoneDesignerSession+<>c__DisplayClass289_0`1[TResult].<EnsureSession>b__0 () [0x003b7] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client/IPhoneDesignerSession.cs:2146
at System.Threading.Tasks.Task`1[TResult].InnerInvoke () [0x0000f] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-10/external/bockbuild/builds/mono-x64/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Future.cs:534
at System.Threading.Tasks.Task.Execute () [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-10/external/bockbuild/builds/mono-x64/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:2319
--- End of stack trace from previous location where exception was thrown ---
at MonoTouch.Design.Client.IPhoneDesignerSession.RenderXmlWithPartialReloadRetry (System.Xml.Linq.XElement storyboardClone, System.Xml.Linq.XElement[] optimisedReloadClones, System.Threading.CancellationToken token) [0x00091] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client/IPhoneDesignerSession.cs:750
at MonoTouch.Design.Client.IPhoneDesignerSession.RenderXmlWithPartialReloadRetry (System.Xml.Linq.XElement storyboardClone, System.Xml.Linq.XElement[] optimisedReloadClones, System.Threading.CancellationToken token) [0x0022b] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client/IPhoneDesignerSession.cs:757
at MonoTouch.Design.Client.IPhoneDesignerSession.RenderXml (System.Xml.Linq.XElement storyboardClone, System.Xml.Linq.XElement[] optimisedReloadClones, System.Threading.CancellationToken token) [0x0004d] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client/IPhoneDesignerSession.cs:735
at MonoTouch.Design.Client.IPhoneDesignerSession.RenderXml (System.Xml.Linq.XElement storyboardClone, System.Xml.Linq.XElement[] optimisedReloadClones, System.Threading.CancellationToken token) [0x001a6] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client/IPhoneDesignerSession.cs:743
at MonoTouch.Design.Client.IPhoneDesignerSession.ReloadItemsAsync (System.Collections.Generic.IList`1[T] elements, System.Threading.CancellationToken token) [0x002b4] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client/IPhoneDesignerSession.cs:624
at MonoTouch.Design.Tasks.Cancellable (System.Threading.Tasks.Task task) [0x00024] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Shared/TaskExtensions.cs:28
at MonoTouch.Design.Client.IPhoneDesignerSession.ReloadItems (System.Collections.Generic.IList`1[T] elements) [0x00082] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client/IPhoneDesignerSession.cs:576
---> (Inner Exception #0) System.AggregateException: One or more errors occurred. (Exception of type 'MonoTouch.Design.Client.InvalidSessionException' was thrown.) ---> MonoTouch.Design.Client.InvalidSessionException: Exception of type 'MonoTouch.Design.Client.InvalidSessionException' was thrown. ---> Foundation.NSErrorException: Error Domain=com.apple.CoreSimulator.SimError Code=165 "Unable to erase contents and settings in current state: Booted" UserInfo={NSLocalizedDescription=Unable to erase contents and settings in current state: Booted}
at MonoTouch.Hosting.Device.ResetContentAndSettings () [0x00024] in <34aca1c84ddb47319197d8fcd6d9539e>:0
at MonoTouch.Design.Client.Mac.MacServerProcessConnection.EnsureServerRunning (System.Boolean throwIfNotRunning) [0x000ff] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client.Mac/MacServerProcessConnection.cs:312
--- End of inner exception stack trace ---
at MonoTouch.Design.Client.Mac.MacServerProcessConnection.EnsureServerRunning (System.Boolean throwIfNotRunning) [0x001e8] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client.Mac/MacServerProcessConnection.cs:337
at MonoTouch.Design.Client.ServerProcessConnection.SendRequestCore (MonoTouch.Design.CommandRequest request, System.Boolean throwIfNotRunning) [0x00057] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client/Connection/ServerProcessConnection.cs:282
at MonoTouch.Design.Client.ServerProcessConnection.SendRequest (MonoTouch.Design.CommandRequest req, System.Boolean throwIfNotRunning) [0x00001] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client/Connection/ServerProcessConnection.cs:230
at MonoTouch.Design.Client.ServerProcessConnection.SendRequest[TResponse] (MonoTouch.Design.CommandRequest req, System.Boolean throwIfNotRunning) [0x00001] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client/Connection/ServerProcessConnection.cs:252
at MonoTouch.Design.Client.ServerProcessConnection.CreateSession () [0x00001] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client/Connection/ServerProcessConnection.cs:111
at MonoTouch.Design.Client.ServerProcessConnection.<CreateSessionAsync>b__28_0 () [0x00000] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client/Connection/ServerProcessConnection.cs:116
at System.Threading.Tasks.Task`1[TResult].InnerInvoke () [0x0000f] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-10/external/bockbuild/builds/mono-x64/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Future.cs:534
at System.Threading.Tasks.Task.Execute () [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-10/external/bockbuild/builds/mono-x64/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:2319
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional (System.Boolean includeTaskCanceledExceptions) [0x00013] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-10/external/bockbuild/builds/mono-x64/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:2029
at System.Threading.Tasks.Task`1[TResult].GetResultCore (System.Boolean waitCompletionNotification) [0x0002b] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-10/external/bockbuild/builds/mono-x64/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Future.cs:496
at System.Threading.Tasks.Task`1[TResult].get_Result () [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-10/external/bockbuild/builds/mono-x64/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Future.cs:466
at MonoTouch.Design.Client.IPhoneDesignerSession+<>c__DisplayClass289_1`1[TResult].<EnsureSession>b__1 (System.Threading.Tasks.Task`1[TResult] t) [0x00012] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client/IPhoneDesignerSession.cs:2072
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2[TAntecedentResult,TResult].InnerInvoke () [0x00024] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-10/external/bockbuild/builds/mono-x64/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/TaskContinuation.cs:202
at System.Threading.Tasks.Task.Execute () [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-10/external/bockbuild/builds/mono-x64/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:2319
---> (Inner Exception #0) MonoTouch.Design.Client.InvalidSessionException: Exception of type 'MonoTouch.Design.Client.InvalidSessionException' was thrown. ---> Foundation.NSErrorException: Error Domain=com.apple.CoreSimulator.SimError Code=165 "Unable to erase contents and settings in current state: Booted" UserInfo={NSLocalizedDescription=Unable to erase contents and settings in current state: Booted}
at MonoTouch.Hosting.Device.ResetContentAndSettings () [0x00024] in <34aca1c84ddb47319197d8fcd6d9539e>:0
at MonoTouch.Design.Client.Mac.MacServerProcessConnection.EnsureServerRunning (System.Boolean throwIfNotRunning) [0x000ff] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client.Mac/MacServerProcessConnection.cs:312
--- End of inner exception stack trace ---
at MonoTouch.Design.Client.Mac.MacServerProcessConnection.EnsureServerRunning (System.Boolean throwIfNotRunning) [0x001e8] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client.Mac/MacServerProcessConnection.cs:337
at MonoTouch.Design.Client.ServerProcessConnection.SendRequestCore (MonoTouch.Design.CommandRequest request, System.Boolean throwIfNotRunning) [0x00057] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client/Connection/ServerProcessConnection.cs:282
at MonoTouch.Design.Client.ServerProcessConnection.SendRequest (MonoTouch.Design.CommandRequest req, System.Boolean throwIfNotRunning) [0x00001] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client/Connection/ServerProcessConnection.cs:230
at MonoTouch.Design.Client.ServerProcessConnection.SendRequest[TResponse] (MonoTouch.Design.CommandRequest req, System.Boolean throwIfNotRunning) [0x00001] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client/Connection/ServerProcessConnection.cs:252
at MonoTouch.Design.Client.ServerProcessConnection.CreateSession () [0x00001] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client/Connection/ServerProcessConnection.cs:111
at MonoTouch.Design.Client.ServerProcessConnection.<CreateSessionAsync>b__28_0 () [0x00000] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client/Connection/ServerProcessConnection.cs:116
at System.Threading.Tasks.Task`1[TResult].InnerInvoke () [0x0000f] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-10/external/bockbuild/builds/mono-x64/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Future.cs:534
at System.Threading.Tasks.Task.Execute () [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-10/external/bockbuild/builds/mono-x64/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:2319 <---
<---
Contents of /Users/michael/Library/Logs/VisualStudio/8.0/iOSDesigner.2020-04-26__18-16-31.log:
Commit: 35aa4889dab48fb3471f20131d6f68dae41bc11c
[2020-04-26 18:18:32.6] INFO: IPhoneDesignerSdkManager: Initializing the designer service
[2020-04-26 18:18:33.1] INFO: ENTERING sandbox: AndroidDesignerMac
[2020-04-26 18:18:33.2] INFO: LEAVING sandbox: AndroidDesignerMac
[2020-04-26 18:19:26.0] INFO: Starting full reload...
[2020-04-26 18:20:07.0] INFO: Beginning the boostrap process for 843A9789-4EBB-4BAD-81FA-E6F24A2DFAE3 (iPad mini 4, iOS SDK 13.4 at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot)
[2020-04-26 18:20:07.1] PERF: - Waited 29ms to clean up
[2020-04-26 18:20:07.1] PERF: - Waited 2ms for device to finish creating
[2020-04-26 18:20:20.3] PERF: - Booting time: 13192ms
[2020-04-26 18:20:29.4] WARN: Framebuffer unavailable; Xcode 10+ requires Library.Disposition.Local
[2020-04-26 18:20:29.5] PERF: - Registering services: 9143ms
[2020-04-26 18:20:46.0] ERROR: Could not find SimulatorBridge after spawning it... bailing out.
[2020-04-26 18:20:46.3] ERROR: Service port lookup had failed with: Error Domain=com.apple.CoreSimulator.SimError Code=165 "Unable to lookup service com.apple.iphonesimulator.bridge.1857: 0x3" UserInfo={NSLocalizedDescription=Unable to lookup service com.apple.iphonesimulator.bridge.1857: 0x3, NSUnderlyingError=0x7ff40186b550 {Error Domain=NSPOSIXErrorDomain Code=3 "No such process"}}
[2020-04-26 18:20:47.4] INFO: An unexpected error happened trying to start the designer. Attempting to erase our device.
System.InvalidOperationException: Simulator services were not available after booting the simulator. Perhaps it has crashed.
at MonoTouch.Hosting.FullSession.LookupServices () [0x000bb] in <34aca1c84ddb47319197d8fcd6d9539e>:0
at MonoTouch.Hosting.FullSession.Start () [0x003c8] in <34aca1c84ddb47319197d8fcd6d9539e>:0
at MonoTouch.Design.Client.Mac.MacServerProcessConnection.EnsureServerRunning (System.Boolean throwIfNotRunning) [0x000c7] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client.Mac/MacServerProcessConnection.cs:303
[2020-04-26 18:20:47.4] ERROR: An exception occurred while launching, forcibly restarting the session.
[2020-04-26 18:20:50.7] PERF: Total time for shutting down: 3284ms
[2020-04-26 18:21:39.7] INFO: Successfully killed the entire session
[2020-04-26 18:25:07.2] INFO: Starting full reload...
[2020-04-26 18:25:07.3] INFO: Beginning the boostrap process for 843A9789-4EBB-4BAD-81FA-E6F24A2DFAE3 (iPad mini 4, iOS SDK 13.4 at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot)
[2020-04-26 18:25:07.3] PERF: - Waited 1ms to clean up
[2020-04-26 18:25:07.3] PERF: - Waited 2ms for device to finish creating
[2020-04-26 18:25:08.2] PERF: - Booting time: 856ms
[2020-04-26 18:25:08.2] WARN: Framebuffer unavailable; Xcode 10+ requires Library.Disposition.Local
[2020-04-26 18:25:08.2] PERF: - Registering services: 10ms
[2020-04-26 18:25:20.2] ERROR: Could not find SimulatorBridge after spawning it... bailing out.
[2020-04-26 18:25:20.2] ERROR: Service port lookup had failed with: Error Domain=com.apple.CoreSimulator.SimError Code=165 "Unable to lookup service com.apple.iphonesimulator.bridge.1857: 0x3" UserInfo={NSLocalizedDescription=Unable to lookup service com.apple.iphonesimulator.bridge.1857: 0x3, NSUnderlyingError=0x7ff40186d280 {Error Domain=NSPOSIXErrorDomain Code=3 "No such process"}}
[2020-04-26 18:25:20.2] INFO: An unexpected error happened trying to start the designer. Attempting to erase our device.
System.InvalidOperationException: Simulator services were not available after booting the simulator. Perhaps it has crashed.
at MonoTouch.Hosting.FullSession.LookupServices () [0x000bb] in <34aca1c84ddb47319197d8fcd6d9539e>:0
at MonoTouch.Hosting.FullSession.Start () [0x003c8] in <34aca1c84ddb47319197d8fcd6d9539e>:0
at MonoTouch.Design.Client.Mac.MacServerProcessConnection.EnsureServerRunning (System.Boolean throwIfNotRunning) [0x000c7] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client.Mac/MacServerProcessConnection.cs:303
[2020-04-26 18:25:20.2] ERROR: An exception occurred while launching, forcibly restarting the session.
[2020-04-26 18:25:24.2] PERF: Total time for shutting down: 3943ms
[2020-04-26 18:25:26.3] INFO: Successfully killed the entire session
[2020-04-26 18:25:26.4] ERROR: EnsureSession (counter 1): System.AggregateException: One or more errors occurred. (One or more errors occurred. (Exception of type 'MonoTouch.Design.Client.InvalidSessionException' was thrown.)) (Exception of type 'MonoTouch.Design.Client.InvalidSessionException' was thrown.) ---> MonoTouch.Design.Client.InvalidSessionException: Exception of type 'MonoTouch.Design.Client.InvalidSessionException' was thrown. ---> Foundation.NSErrorException: Error Domain=com.apple.CoreSimulator.SimError Code=165 "Unable to erase contents and settings in current state: Booted" UserInfo={NSLocalizedDescription=Unable to erase contents and settings in current state: Booted}
at MonoTouch.Hosting.Device.ResetContentAndSettings () [0x00024] in <34aca1c84ddb47319197d8fcd6d9539e>:0
at MonoTouch.Design.Client.Mac.MacServerProcessConnection.EnsureServerRunning (System.Boolean throwIfNotRunning) [0x000ff] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client.Mac/MacServerProcessConnection.cs:312
--- End of inner exception stack trace ---
at MonoTouch.Design.Client.Mac.MacServerProcessConnection.EnsureServerRunning (System.Boolean throwIfNotRunning) [0x001e8] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client.Mac/MacServerProcessConnection.cs:337
at MonoTouch.Design.Client.ServerProcessConnection.SendRequestCore (MonoTouch.Design.CommandRequest request, System.Boolean throwIfNotRunning) [0x00057] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client/Connection/ServerProcessConnection.cs:282
at MonoTouch.Design.Client.ServerProcessConnection.SendRequest (MonoTouch.Design.CommandRequest req, System.Boolean throwIfNotRunning) [0x00001] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client/Connection/ServerProcessConnection.cs:230
at MonoTouch.Design.Client.ServerProcessConnection.SendRequest[TResponse] (MonoTouch.Design.CommandRequest req, System.Boolean throwIfNotRunning) [0x00001] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client/Connection/ServerProcessConnection.cs:252
at MonoTouch.Design.Client.ServerProcessConnection.CreateSession () [0x00001] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client/Connection/ServerProcessConnection.cs:111
at MonoTouch.Design.Client.ServerProcessConnection.<CreateSessionAsync>b__28_0 () [0x00000] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client/Connection/ServerProcessConnection.cs:116
at System.Threading.Tasks.Task`1[TResult].InnerInvoke () [0x0000f] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-10/external/bockbuild/builds/mono-x64/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Future.cs:534
at System.Threading.Tasks.Task.Execute () [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-10/external/bockbuild/builds/mono-x64/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:2319
--- End of inner exception stack trace ---
---> (Inner Exception #0) MonoTouch.Design.Client.InvalidSessionException: Exception of type 'MonoTouch.Design.Client.InvalidSessionException' was thrown. ---> Foundation.NSErrorException: Error Domain=com.apple.CoreSimulator.SimError Code=165 "Unable to erase contents and settings in current state: Booted" UserInfo={NSLocalizedDescription=Unable to erase contents and settings in current state: Booted}
at MonoTouch.Hosting.Device.ResetContentAndSettings () [0x00024] in <34aca1c84ddb47319197d8fcd6d9539e>:0
at MonoTouch.Design.Client.Mac.MacServerProcessConnection.EnsureServerRunning (System.Boolean throwIfNotRunning) [0x000ff] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client.Mac/MacServerProcessConnection.cs:312
--- End of inner exception stack trace ---
at MonoTouch.Design.Client.Mac.MacServerProcessConnection.EnsureServerRunning (System.Boolean throwIfNotRunning) [0x001e8] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client.Mac/MacServerProcessConnection.cs:337
at MonoTouch.Design.Client.ServerProcessConnection.SendRequestCore (MonoTouch.Design.CommandRequest request, System.Boolean throwIfNotRunning) [0x00057] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client/Connection/ServerProcessConnection.cs:282
at MonoTouch.Design.Client.ServerProcessConnection.SendRequest (MonoTouch.Design.CommandRequest req, System.Boolean throwIfNotRunning) [0x00001] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client/Connection/ServerProcessConnection.cs:230
at MonoTouch.Design.Client.ServerProcessConnection.SendRequest[TResponse] (MonoTouch.Design.CommandRequest req, System.Boolean throwIfNotRunning) [0x00001] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client/Connection/ServerProcessConnection.cs:252
at MonoTouch.Design.Client.ServerProcessConnection.CreateSession () [0x00001] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client/Connection/ServerProcessConnection.cs:111
at MonoTouch.Design.Client.ServerProcessConnection.<CreateSessionAsync>b__28_0 () [0x00000] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client/Connection/ServerProcessConnection.cs:116
at System.Threading.Tasks.Task`1[TResult].InnerInvoke () [0x0000f] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-10/external/bockbuild/builds/mono-x64/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Future.cs:534
at System.Threading.Tasks.Task.Execute () [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-10/external/bockbuild/builds/mono-x64/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:2319 <---
[2020-04-26 18:25:26.5] INFO: Beginning the boostrap process for 843A9789-4EBB-4BAD-81FA-E6F24A2DFAE3 (iPad mini 4, iOS SDK 13.4 at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot)
[2020-04-26 18:25:27.0] WARN: Framebuffer unavailable; Xcode 10+ requires Library.Disposition.Local
[2020-04-26 18:25:38.1] ERROR: Could not find SimulatorBridge after spawning it... bailing out.
[2020-04-26 18:25:38.1] ERROR: Service port lookup had failed with: Error Domain=com.apple.CoreSimulator.SimError Code=165 "Unable to lookup service com.apple.iphonesimulator.bridge.1857: 0x3" UserInfo={NSLocalizedDescription=Unable to lookup service com.apple.iphonesimulator.bridge.1857: 0x3, NSUnderlyingError=0x7ff401acaad0 {Error Domain=NSPOSIXErrorDomain Code=3 "No such process"}}
[2020-04-26 18:25:38.1] INFO: An unexpected error happened trying to start the designer. Attempting to erase our device.
System.InvalidOperationException: Simulator services were not available after booting the simulator. Perhaps it has crashed.
at MonoTouch.Hosting.FullSession.LookupServices () [0x000bb] in <34aca1c84ddb47319197d8fcd6d9539e>:0
at MonoTouch.Hosting.FullSession.Start () [0x003c8] in <34aca1c84ddb47319197d8fcd6d9539e>:0
at MonoTouch.Design.Client.Mac.MacServerProcessConnection.EnsureServerRunning (System.Boolean throwIfNotRunning) [0x000c7] in /Users/runner/runners/2.165.0/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client.Mac/MacServerProcessConnection.cs:303

Related

Failed to resolve System.Int32 Xamarin.Essentials.Resource/Id::accessibility_action_clickable_span

When I compile the app in release mode I get the following error, I've already tried to reinstall and update all packages, but I still having problems with android in release mode. Any ideas? Thanks for any help :)
at Mono.Linker.Steps.MarkStep.HandleUnresolvedField (Mono.Cecil.FieldReference reference) [0x00013] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at Mono.Linker.Steps.MarkStep.MarkField (Mono.Cecil.FieldReference reference) [0x00024] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at Mono.Linker.Steps.MarkStep.MarkInstruction (Mono.Cecil.Cil.Instruction instruction) [0x0002e] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at Mono.Linker.Steps.MarkStep.MarkMethodBody (Mono.Cecil.Cil.MethodBody body) [0x000c2] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at Mono.Linker.Steps.MarkStep.ProcessMethod (Mono.Cecil.MethodDefinition method) [0x001b1] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x0001b] in <3e53085892e04b628169d0ea2d9ff8b6>:0
--- End of inner exception stack trace ---
at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x00047] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue () [0x0000a] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at Mono.Linker.Steps.MarkStep.Process () [0x000f6] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at Mono.Linker.Steps.MarkStep.Process (Mono.Linker.LinkContext context) [0x0000d] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at MonoDroid.Tuner.MonoDroidMarkStep.Process (Mono.Linker.LinkContext context) [0x0000b] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at Mono.Linker.Pipeline.ProcessStep (Mono.Linker.LinkContext context, Mono.Linker.Steps.IStep step) [0x0000d] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x0000f] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at MonoDroid.Tuner.Linker.Run (Mono.Linker.Pipeline pipeline, Mono.Linker.LinkContext context) [0x00000] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at MonoDroid.Tuner.Linker.Process (MonoDroid.Tuner.LinkerOptions options, Mono.Linker.ILogger logger, Mono.Linker.LinkContext& context) [0x00071] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at Xamarin.Android.Tasks.LinkAssemblies.Execute (Java.Interop.Tools.Cecil.DirectoryAssemblyResolver res) [0x001dd] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at Xamarin.Android.Tasks.LinkAssemblies.RunTask () [0x0001b] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at Xamarin.Android.Tasks.AndroidTask.Execute () [0x00000] in <3e53085892e04b628169d0ea2d9ff8b6>:0 (XALNK7000) (vapaya.Android) ```

Xamarin Essentials Geolocation and Geocoding

i am trying to get geolocation in xamarin, current location. i am following this link https://learn.microsoft.com/en-us/xamarin/essentials/geocoding?context=xamarin%2Fandroid&tabs=android . i have followed everythinMg that is shown in there but i am getting an error at var placemarks = await Geocoding.GetPlacemarksAsync(MyLocation.Latitude, yLocation.Longitude);
i am getting latitude and longitude. when i am trying to change it to address it is showing error. i have given permission of location and internet but still i am getting error.
" Timed out waiting for response from server at java.interop.
i gave permission for internet and location
private async void btnGetAddress_Clicked(object sender, EventArgs e)
{
try
{
double lat = MyLocation.Latitude;
double lon = MyLocation.Longitude;
LabelAddress.Text = "";
var placemarks = await Geocoding.GetPlacemarksAsync(MyLocation.Latitude, MyLocation.Longitude);
var placemark = placemarks?.FirstOrDefault();
if (placemark != null)
{
var geocoding =
$"AdminArea: {placemark.AdminArea}\n" +
$"CountryCode: {placemark.CountryCode}\n" +
$"CountryName: {placemark.CountryName}\n" +
$"FeatureName: {placemark.FeatureName}\n" +
$"Locality: {placemark.Locality}\n" +
$"PostalCode: {placemark.PostalCode}\n" +
$"SubAdminArea: {placemark.SubAdminArea}\n" +
$"SubLocality: {placemark.SubLocality}\n" +
$"SubThoroughfare: {placemark.SubThoroughfare}\n" +
$"Thoroughfare: {placemark.Thoroughfare}\n";
Console.WriteLine(geocoding);
LabelAddress.Text = geocoding;
}
}
catch(Exception ex)
{
LabelAddress.Text = ex.ToString();
}
}
i want to get the current location of the user
full Error :
{Java.IO.IOException: Timed out waiting for response from server
at Java.Interop.JniEnvironment+InstanceMethods.CallObjectMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x00069] in <034d4a9852dd45bea9353cc7776c99f0>:0
at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeAbstractObjectMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00014] in <034d4a9852dd45bea9353cc7776c99f0>:0
at Android.Locations.Geocoder.GetFromLocation (System.Double latitude, System.Double longitude, System.Int32 maxResults) [0x0004b] in <a10f61e70eeb434e952fef884856c199>:0
at Android.Locations.Geocoder+<>c__DisplayClass15_0.<GetFromLocationAsync>b__0 () [0x00000] in <a10f61e70eeb434e952fef884856c199>:0
at System.Threading.Tasks.Task`1[TResult].InnerInvoke () [0x0000f] in <43dbbdc147f2482093d8409abb04c233>:0
at System.Threading.Tasks.Task.Execute () [0x00010] in <43dbbdc147f2482093d8409abb04c233>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <43dbbdc147f2482093d8409abb04c233>:0
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <43dbbdc147f2482093d8409abb04c233>:0
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <43dbbdc147f2482093d8409abb04c233>:0
at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <43dbbdc147f2482093d8409abb04c233>:0
at Xamarin.Essentials.Geocoding+<PlatformGetPlacemarksAsync>d__3.MoveNext () [0x0003d] in D:\a\1\s\Xamarin.Essentials\Geocoding\Geocoding.android.cs:15
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <43dbbdc147f2482093d8409abb04c233>:0
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <43dbbdc147f2482093d8409abb04c233>:0
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <43dbbdc147f2482093d8409abb04c233>:0
at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <43dbbdc147f2482093d8409abb04c233>:0
at GetLocation.MainPage+<btnGetAddress_Clicked>d__3.MoveNext () [0x00088] in C:\Users\Zahya\source\repos\GetLocation\GetLocation\GetLocation\MainPage.xaml.cs:60
--- End of managed Java.IO.IOException stack trace ---
java.io.IOException: Timed out waiting for response from server
at android.location.Geocoder.getFromLocation(Geocoder.java:136)
}

Xamarin Android crashing with Xamarin.Auth

I'm using Xamarin.Auth to log into Facebook. I created a separate Renderer for iOS and Android.
In the auth.Completed I call a method AfterLogin(UserInfo) in the PCL class of the custom renderer. This does some additional work and then calls
App.Current.MainPage = new NavigationPage(new MainPage());
It looks like the page is constructed correctly and all methods return correctly until an Exception Unhandled gets thrown. The only text is "An unhandled exception occured."
In iOS, everything works fine. It calls the exact same PCL code.
I have no idea what view it is referring to.
Edit
Stack trace from ADB
I/MonoDroid(11638): UNHANDLED EXCEPTION:
I/MonoDroid(11638): Java.Lang.IllegalArgumentException: No view found for id 0x4 (unknown) for fragment FragmentContainer{436fa3e8 #0 id=0x4}
I/MonoDroid(11638): at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <d18287e1d683419a8ec3216fd78947b9>:0
I/MonoDroid(11638): at Java.Interop.JniEnvironment+InstanceMethods.CallBooleanMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniMethodInfo method) [0x00068] in <5716a943049b49ca928a3a1c8d2386f4>:0
I/MonoDroid(11638): at Android.Runtime.JNIEnv.CallBooleanMethod (System.IntPtr jobject, System.IntPtr jmethod) [0x0000e] in <33e6e739ac344166b157e323586f11a1>:0
I/MonoDroid(11638): at Android.Support.V4.App.FragmentManagerInvoker.ExecutePendingTransactions () [0x00033] in <7e083afc7c9045f59e01d9c14931060d>:0
I/MonoDroid(11638): at Xamarin.Forms.Platform.Android.AppCompat.NavigationPageRenderer.Dispose (System.Boolean disposing) [0x00083] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\AppCompat\NavigationPageRenderer.cs:135
I/MonoDroid(11638): at Java.Lang.Object.Dispose () [0x00000] in <33e6e739ac344166b157e323586f11a1>:0
I/MonoDroid(11638): at Xamarin.Forms.Platform.Android.AppCompat.Platform.SetPage (Xamarin.Forms.Page newRoot) [0x0003f] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\AppCompat\Platform.cs:226
I/MonoDroid(11638): at Xamarin.Forms.Platform.Android.FormsAppCompatActivity.InternalSetPage (Xamarin.Forms.Page page) [0x0001a] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\AppCompat\FormsAppCompatActivity.cs:370
I/MonoDroid(11638): at Xamarin.Forms.Platform.Android.FormsAppCompatActivity.AppOnPropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs args) [0x00012] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\AppCompat\FormsAppCompatActivity.cs:321
I/MonoDroid(11638): at Xamarin.Forms.BindableObject.OnPropertyChanged (System.String propertyName) [0x0000a] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\BindableObject.cs:136
I/MonoDroid(11638): at Xamarin.Forms.Element.OnPropertyChanged (System.String propertyName) [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Element.cs:380
I/MonoDroid(11638): at Xamarin.Forms.Application.set_MainPage (Xamarin.Forms.Page value) [0x0008b] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Application.cs:90
I/MonoDroid(11638): at App.App.Instance_DataIsReady (System.Object sender, App.EventArguments.DataIsReadyEventArgs e) [0x0004d] in <9b95d86146df403c82b64e5a8ab6a9cf>:0
I/MonoDroid(11638): at (wrapper delegate-invoke) <Module>:invoke_void_object_DataIsReadyEventArgs (object,App.EventArguments.DataIsReadyEventArgs)
I/MonoDroid(11638): at App.DataCache.OnDataIsReady (App.EventArguments.DataIsReadyStates state) [0x0001b] in <9b95d86146df403c82b64e5a8ab6a9cf>:0
I/MonoDroid(11638): at App.DataCache.set_PlayerWinnings (System.Collections.Generic.IEnumerable`1[T] value) [0x00012] in <9b95d86146df403c82b64e5a8ab6a9cf>:0
I/MonoDroid(11638): at App.DataCache+<RefreshData>d__37.MoveNext () [0x00351] in <9b95d86146df403c82b64e5a8ab6a9cf>:0
I/MonoDroid(11638): --- End of stack trace from previous location where exception was thrown ---
Which version of Xamarin.Auth?
Why implementing Xamarin.Forms support if it is already in the library itself since version 1.5.0?
And for more help we'll need more info from your side (and your code)...
The issue turned out to be that MainPage was being assigned to twice. It wasn't related to Auth.

PushSharp APNS error

I don't know what's happening but PushSharp is not working anymore. I just updated to MacOS Sierra, but I'd like to believe it's not related to that.
This is my implementation (it was working one week ago):
var cert = new X509Certificate2(
"cio_aps_development.p12",
"",
X509KeyStorageFlags.Exportable);
var config = new ApnsConfiguration(ApnsConfiguration.ApnsServerEnvironment.Sandbox, cert);
// Create a new broker
var apnsBroker = new ApnsServiceBroker(config);
This is the error:
2016-10-06 11:53:44.AM [ERROR] APNS-CLIENT[1]: Send Batch Error: Batch ID=1, Error=System.IO.IOException: The authentication or decryption has failed. ---> System.IO.IOException: Error while sending TLS Alert (Fatal:InternalError): System.IO.IOException: The authentication or decryption has failed. ---> Mono.Security.Protocol.Tls.TlsException: The authentication or decryption has failed.
at Mono.Security.Protocol.Tls.RecordProtocol.EndReceiveRecord (System.IAsyncResult asyncResult) [0x0003a] in /private/tmp/source-mono-4.6.0/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/RecordProtocol.cs:430
at Mono.Security.Protocol.Tls.SslClientStream.SafeEndReceiveRecord (System.IAsyncResult ar, System.Boolean ignoreEmpty) [0x00000] in /private/tmp/source-mono-4.6.0/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslClientStream.cs:256
at Mono.Security.Protocol.Tls.SslClientStream.NegotiateAsyncWorker (System.IAsyncResult result) [0x002c6] in /private/tmp/source-mono-4.6.0/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslClientStream.cs:502
--- End of inner exception stack trace ---
at Mono.Security.Protocol.Tls.SslClientStream.EndNegotiateHandshake (System.IAsyncResult result) [0x00035] in /private/tmp/source-mono-4.6.0/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslClientStream.cs:396
at Mono.Security.Protocol.Tls.SslStreamBase.AsyncHandshakeCallback (System.IAsyncResult asyncResult) [0x0000c] in /private/tmp/source-mono-4.6.0/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslStreamBase.cs:101 ---> System.IO.IOException: Unable to write data to the transport connection: The socket is not connected. ---> System.Net.Sockets.SocketException: The socket is not connected
at System.Net.Sockets.Socket.BeginSend (System.Byte[] buffer, System.Int32 offset, System.Int32 size, System.Net.Sockets.SocketFlags socket_flags, System.AsyncCallback callback, System.Object state) [0x00021] in /private/tmp/source-mono-4.6.0/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/System/System.Net.Sockets/Socket.cs:2564
at System.Net.Sockets.NetworkStream.BeginWrite (System.Byte[] buffer, System.Int32 offset, System.Int32 size, System.AsyncCallback callback, System.Object state) [0x000b4] in /private/tmp/source-mono-4.6.0/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/System/net/System/Net/Sockets/NetworkStream.cs:934
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.BeginWrite (System.Byte[] buffer, System.Int32 offset, System.Int32 size, System.AsyncCallback callback, System.Object state) [0x000f2] in /private/tmp/source-mono-4.6.0/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/System/net/System/Net/Sockets/NetworkStream.cs:954
at Mono.Security.Protocol.Tls.RecordProtocol.BeginSendRecord (Mono.Security.Protocol.Tls.ContentType contentType, System.Byte[] recordData, System.AsyncCallback callback, System.Object state) [0x00026] in /private/tmp/source-mono-4.6.0/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/RecordProtocol.cs:765
at Mono.Security.Protocol.Tls.RecordProtocol.SendRecord (Mono.Security.Protocol.Tls.ContentType contentType, System.Byte[] recordData) [0x00000] in /private/tmp/source-mono-4.6.0/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/RecordProtocol.cs:786
at Mono.Security.Protocol.Tls.RecordProtocol.SendAlert (Mono.Security.Protocol.Tls.Alert alert) [0x00027] in /private/tmp/source-mono-4.6.0/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/RecordProtocol.cs:633
at Mono.Security.Protocol.Tls.RecordProtocol.SendAlert (System.Exception& ex) [0x00021] in /private/tmp/source-mono-4.6.0/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/RecordProtocol.cs:598
--- End of inner exception stack trace ---
--- End of inner exception stack trace ---
at Mono.Security.Protocol.Tls.SslStreamBase.EndRead (System.IAsyncResult asyncResult) [0x00051] in /private/tmp/source-mono-4.6.0/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslStreamBase.cs:883
at Mono.Net.Security.Private.LegacySslStream.EndAuthenticateAsClient (System.IAsyncResult asyncResult) [0x00011] in /private/tmp/source-mono-4.6.0/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/System/Mono.Net.Security/LegacySslStream.cs:475
at Mono.Net.Security.Private.LegacySslStream.AuthenticateAsClient (System.String targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, System.Security.Authentication.SslProtocols enabledSslProtocols, System.Boolean checkCertificateRevocation) [0x00000] in /private/tmp/source-mono-4.6.0/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/System/Mono.Net.Security/LegacySslStream.cs:445
at Mono.Net.Security.Private.MonoSslStreamImpl.AuthenticateAsClient (System.String targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, System.Security.Authentication.SslProtocols enabledSslProtocols, System.Boolean checkCertificateRevocation) [0x00000] in /private/tmp/source-mono-4.6.0/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/System/Mono.Net.Security/MonoSslStreamImpl.cs:77
at System.Net.Security.SslStream.AuthenticateAsClient (System.String targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, System.Security.Authentication.SslProtocols enabledSslProtocols, System.Boolean checkCertificateRevocation) [0x00000] in /private/tmp/source-mono-4.6.0/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/System/System.Net.Security/SslStream.cs:147
at PushSharp.Apple.ApnsConnection+<connect>d__25.MoveNext () [0x00211] in <1389cefdb7bb4d6c97d6126934847d24>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /private/tmp/source-mono-4.6.0/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00047] in /private/tmp/source-mono-4.6.0/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /private/tmp/source-mono-4.6.0/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /private/tmp/source-mono-4.6.0/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128
at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in /private/tmp/source-mono-4.6.0/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:113
at PushSharp.Apple.ApnsConnection+<SendBatch>d__21.MoveNext () [0x00255] in <1389cefdb7bb4d6c97d6126934847d24>:0
2016-10-06 11:53:44.AM [INFO] APNS-Client[1]: Sent Batch, waiting for possible response...
Thread finished: <Thread Pool> #11
Thread started: <Thread Pool> #14
Apple Notification Failed: ID=1, Code=ConnectionError
Any ideas?
Thanks!

Connection faliure issue when i hit the web API in Xamarin IOS

Some time i am facing issue of Connect Failure when I hit the web api in Xamarin IOS project. API is working fine and issue is in connection. If any one have an idea to solve this issue or have a link through which i can solve this issue.
please send me because i have tried many solution but couldn't solve it.
Error Log ::::::::::::::::
{System.AggregateException: One or more errors occurred. ---> System.Net.WebException: Error: ConnectFailure (Too many open files) ---> System.Net.Sockets.SocketException: Too many open files
at System.Net.Sockets.Socket..ctor (AddressFamily addressFamily, SocketType socketType, ProtocolType protocolType) [0x00060] in /Users/builder/data/lanes/3051/5f11db87/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System/System.Net.Sockets/Socket.cs:214
at System.Net.WebConnection.Connect (System.Net.HttpWebRequest request) [0x000f6] in /Users/builder/data/lanes/3051/5f11db87/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System/System.Net/WebConnection.cs:189
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetResponse (IAsyncResult asyncResult) [0x00065] in /Users/builder/data/lanes/3051/5f11db87/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System/System.Net/HttpWebRequest.cs:946
at System.Threading.Tasks.TaskFactory1[TResult].FromAsyncCoreLogic (IAsyncResult iar, System.Func2 endFunction, System.Action1 endAction, System.Threading.Tasks.Task1 promise, Boolean requiresSynchronization) <0x1002da730 + 0x0005b> in :0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/3051/5f11db87/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003b] in /Users/builder/data/lanes/3051/5f11db87/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:199
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /Users/builder/data/lanes/3051/5f11db87/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:170
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /Users/builder/data/lanes/3051/5f11db87/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:142
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1+ConfiguredTaskAwaiter[TResult].GetResult () <0x10027a4f0 + 0x0001b> in <filename unknown>:0
at System.Net.Http.HttpClientHandler+<SendAsync>c__async0.MoveNext () [0x003d6] in /Library/Frameworks/Xamarin.iOS.framework/Versions/9.6.1.9/src/mono/mcs/class/System.Net.Http/System.Net.Http/HttpClientHandler.cs:372
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/3051/5f11db87/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003b] in /Users/builder/data/lanes/3051/5f11db87/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:199
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /Users/builder/data/lanes/3051/5f11db87/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:170
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /Users/builder/data/lanes/3051/5f11db87/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:142
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1+ConfiguredTaskAwaiter[TResult].GetResult () <0x10027a4f0 + 0x0001b> in :0
at System.Net.Http.HttpClient+c__async0.MoveNext () [0x000a9] in /Library/Frameworks/Xamarin.iOS.framework/Versions/9.6.1.9/src/mono/mcs/class/System.Net.Http/System.Net.Http/HttpClient.cs:274
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional (Boolean includeTaskCanceledExceptions) [0x00014] in /Users/builder/data/lanes/3051/5f11db87/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/threading/Tasks/Task.cs:2168
at System.Threading.Tasks.Task1[TResult].GetResultCore (Boolean waitCompletionNotification) <0x1002d9dc0 + 0x0006f> in <filename unknown>:0
at System.Threading.Tasks.Task1[TResult].get_Result () <0x1002d9d50 + 0x0002b> in :0
at RSystemApp.Controller.HolidayController.GetLeaveInformation (Int64 employeeId) [0x00025] in D:\Mukesh\TFSCode\RSIMobileApp\RSystemApp\RSystemApp\Controller\HolidayController.cs:83
---> (Inner Exception #0) System.Net.WebException: Error: ConnectFailure (Too many open files) ---> System.Net.Sockets.SocketException: Too many open files
at System.Net.Sockets.Socket..ctor (AddressFamily addressFamily, SocketType socketType, ProtocolType protocolType) [0x00060] in /Users/builder/data/lanes/3051/5f11db87/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System/System.Net.Sockets/Socket.cs:214
at System.Net.WebConnection.Connect (System.Net.HttpWebRequest request) [0x000f6] in /Users/builder/data/lanes/3051/5f11db87/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System/System.Net/WebConnection.cs:189
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetResponse (IAsyncResult asyncResult) [0x00065] in /Users/builder/data/lanes/3051/5f11db87/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System/System.Net/HttpWebRequest.cs:946
at System.Threading.Tasks.TaskFactory1[TResult].FromAsyncCoreLogic (IAsyncResult iar, System.Func2 endFunction, System.Action1 endAction, System.Threading.Tasks.Task1 promise, Boolean requiresSynchronization) <0x1002da730 + 0x0005b> in :0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/3051/5f11db87/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003b] in /Users/builder/data/lanes/3051/5f11db87/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:199
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /Users/builder/data/lanes/3051/5f11db87/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:170
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /Users/builder/data/lanes/3051/5f11db87/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:142
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1+ConfiguredTaskAwaiter[TResult].GetResult () <0x10027a4f0 + 0x0001b> in <filename unknown>:0
at System.Net.Http.HttpClientHandler+<SendAsync>c__async0.MoveNext () [0x003d6] in /Library/Frameworks/Xamarin.iOS.framework/Versions/9.6.1.9/src/mono/mcs/class/System.Net.Http/System.Net.Http/HttpClientHandler.cs:372
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/3051/5f11db87/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003b] in /Users/builder/data/lanes/3051/5f11db87/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:199
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /Users/builder/data/lanes/3051/5f11db87/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:170
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /Users/builder/data/lanes/3051/5f11db87/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:142
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1+ConfiguredTaskAwaiter[TResult].GetResult () <0x10027a4f0 + 0x0001b> in :0
at System.Net.Http.HttpClient+c__async0.MoveNext () [0x000a9] in /Library/Frameworks/Xamarin.iOS.framework/Versions/9.6.1.9/src/mono/mcs/class/System.Net.Http/System.Net.Http/HttpClient.cs:274 <---
}
How often do you call web API?
I have this problem before.
My code:
HttpClient client = new HttpClient ();
...
HttpResponseMessage response = await client.PostAsync (“webapi url” , postContent);
Solution:
using(HttpClient client = new HttpClient ())
{
...
HttpResponseMessage response = await client.PostAsync("webapi url" , postContent);
...
}
It seems like you don't dispose HttpClient
You can see this page:
https://dotblogs.com.tw/rainmaker/2016/06/06/103035
Hope you can fix it

Resources