the codingmerc llc

application programming expert for hire

Unable to start CalabashHostStrategyProxy

If you are running Xamarin UI tests and receive the following error message:

SetUp : System.Exception : Unable to start CalabashHostStrategyProxy

You can fix the error by making sure that you do not run unit tests in the Xamarin IDE and for example Xamarin Test Recorder at the same time. There can be only one Calabash host instance the UI test runner can connect to and if it is already started by another instance, starting the second instance will fail. Wait for the first instance to finish testing and shut down before you start a new one.

The detailed stack trace reads:

SetUp : System.Exception : Unable to start CalabashHostStrategyProxy
  at Xamarin.UITest.iOS.CalabashHostStrategyProxy.Start () <0x4245250 + 0x0008f> in :0 
  at Xamarin.UITest.iOS.iOSAppLauncher.StartOrRestartProxy (System.String fifo, Xamarin.UITest.Shared.Processes.RunningProcess instrumentsProcess, Xamarin.UITest.Shared.Http.HttpClient httpClient, System.Uri os8ProxyUri) <0x4244e40 + 0x00077> in :0 
  at Xamarin.UITest.iOS.iOSAppLauncher.StartUsingHostStrategy (System.String targetApplication, Xamarin.UITest.iOS.Instruments instruments, iOSRunType runType, System.String deviceIdentifier, Xamarin.UITest.Shared.Http.HttpClient httpClient, System.Uri deviceUri, Xamarin.UITest.Shared.Artifacts.ArtifactFolder artifactFolder, AppDataMode appDataMode) <0x423e170 + 0x000e7> in :0 
  at Xamarin.UITest.iOS.iOSAppLauncher.RunAppInEmulatorInternal (System.String application, Xamarin.UITest.iOS.Instruments instruments, Xamarin.UITest.Shared.Http.HttpClient httpClient, System.Uri deviceUri, Xamarin.UITest.Shared.Artifacts.ArtifactFolder artifactFolder, AppDataMode appDataMode, System.String deviceIdentifier) <0x423ca50 + 0x001cb> in :0 
  at Xamarin.UITest.iOS.iOSAppLauncher.RunAppInEmulator (Xamarin.UITest.Shared.iOS.AppBundle appBundle, Xamarin.UITest.iOS.Instruments instruments, Xamarin.UITest.Shared.Http.HttpClient httpClient, System.Uri deviceUri, Xamarin.UITest.Shared.Artifacts.ArtifactFolder artifactFolder, AppDataMode appDataMode, System.String deviceIdentifier) <0x423b708 + 0x00127> in :0 
  at Xamarin.UITest.iOS.iOSAppLauncher.LaunchApp (IiOSAppConfiguration appConfiguration, Xamarin.UITest.Shared.Http.HttpClient httpClient, Xamarin.UITest.TestCloud.TestCloudiOSAppConfiguration testCloudAppConfiguration, Xamarin.UITest.Shared.Http.HttpClient testCloudWsClient) <0x40d2d08 + 0x00283> in :0 
  at Xamarin.UITest.iOS.iOSApp..ctor (IiOSAppConfiguration appConfiguration) <0x3fff050 + 0x00b53> in :0 
  at Xamarin.UITest.Configuration.iOSAppConfigurator.StartApp (AppDataMode appDataMode) <0x3ffc108 + 0x00063> in :0 
  at SUPERSECRET.Touch.Tests.UI.Tests.BeforeEachTest () [0x00017] in /Users/SUPERSECRET/Xamarin/1.3.1/SUPERSECRET/SUPERSECRET.Touch.Tests.UI/Tests.cs:22 
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in /private/tmp/source-mono-4.3.1/bockbuild-xamarin/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.Reflection/MonoMethod.cs:295 

This is a known issue as outline in the release notes 

© 2017 the codingmerc llc