3
votes

I am having an issue in Visual Studio 2015 when try to debug my app throw Xamarin Mac Agent(MacInCloud).

This is the log from output in VS2015:

Launch failed. The app 'TodoREST.iOS' could not be launched on 'iPhone 5s iOS 10.1'. Error: An error occured on client IDB420719 while executing a reply for topic xvs/idb/4.2.0.719/launch-app.

Also this is the log who Xamarin provides via VS:

Xamarin.VisualStudio.IOS.IdbClient Error: 0 : [2016-11-07 20:41:48.4612] Launch failed. The app 'TodoREST.iOS' could not be launched on 'iPhone 5s iOS 10.1'. Error: An error occured on client IDB420719 while executing a reply for topic xvs/idb/4.2.0.719/launch-app. Please check the logs for more details. System.ArgumentOutOfRangeException: StartIndex cannot be less than zero. Parameter name: startIndex at System.String.Substring (System.Int32 startIndex, System.Int32 length) [0x0009c] in /private/tmp/source-mono-4.6.0-c8sr0/bockbuild-mono-4.6.0-branch-c8sr0/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/string.cs:1266 at System.String.Substring (System.Int32 startIndex) [0x00000] in /private/tmp/source-mono-4.6.0-c8sr0/bockbuild-mono-4.6.0-branch-c8sr0/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/string.cs:1232 at Xamarin.Messaging.IDB.MTouch.GetMTouchError (System.String message) [0x0003c] in :0 at Xamarin.Messaging.IDB.MTouch+d__8.MoveNext () [0x00233] in :0 --- End of stack trace from previous location where exception was thrown ---

image of vs after crash

One more detail: Immediately after the app opens in simulator it automatically close.

Thanks!

1
@SushiHangover it doesnt work, but thanks anyway - Marcosicp
Did you check the build log on the Mac to see if the root cause of the error is in there.... - SushiHangover
I have the same issue. It works fine with the simulator but the app closes immediatly on device. - Daniel
@Daniel let me know if you get the solution! - Marcosicp

1 Answers

0
votes

I've just had this error too. From past experience, deployment issues with iOS often relate to Xamarin versions being out of sync between Visual Studio/Windows and your Mac build host.

Make sure you have installed the latest updates from the stable channel on both your Windows machine and your Mac.

In Visual Studio, select Tools > Options > Xamarin > Other and Select Check now

In Xamarin Studio on the Mac, select Xamarin Studio Community from the menu bar, and Check for Updates...

I had some updates pending and this worked for me.