5

I installed xamarin on the mac and followed the instructions here to to allow remote logins (so that I can use a simulator on my windows machine), I was able to connect via mac agent without problems, however when I run i get this error:

enter image description here

Was wondering if any of you had these problems?

When I created a solution in xamarin studio on my MAC and ran the app on the MAC it worked without giving any errors... any ideas that might help?

Updated Logs from MAC:

[2016-06-22 15:25:21.5] PERF:      - Bridge loaded in 358.017ms
[2016-06-22 15:25:21.5] PERF: Total time for bootstrapping process: 413ms
[2016-06-22 15:25:21.5] ERROR: com.xamarin.MTHosting.cb5bcd1: InstallAndLaunch (attempt 3): System.IO.DirectoryNotFoundException: /Users/Christian Agius/Library/Caches/Xamarin/mtbs/builds/DAAppiOS/6a5cceef9b57993d401c68f8154370ef/bin/iPhoneSimulator/Debug/DAAppiOS.app
 at MonoTouch.Hosting.Session.InstallApplication (System.String bundlePath) <0x87438e0 + 0x00213> in <filename unknown>:0 
 at MonoTouch.Hosting.Session.InstallAndLaunch (System.String appBundlePath, System.String[] appArgs) <0x87435e8 + 0x00047> in <filename unknown>:0 
[2016-06-22 15:25:21.5] ERROR: com.xamarin.MTHosting.cb5bcd1: InstallAndLaunch (attempt 4): System.IO.DirectoryNotFoundException: /Users/Christian Agius/Library/Caches/Xamarin/mtbs/builds/DAAppiOS/6a5cceef9b57993d401c68f8154370ef/bin/iPhoneSimulator/Debug/DAAppiOS.app
 at MonoTouch.Hosting.Session.InstallApplication (System.String bundlePath) <0x87438e0 + 0x00213> in <filename unknown>:0 
 at MonoTouch.Hosting.Session.InstallAndLaunch (System.String appBundlePath, System.String[] appArgs) <0x87435e8 + 0x00047> in <filename unknown>:0 
system: Jun 22 15:25:21 Christians-MacBook-Pro distnoted[10419]: # distnote server daemon  absolute time: 13226.136720649   civil time: Wed Jun 22 15:25:21 2016   pid: 10419 uid: 501  root: yes
Jun 22 15:25:21 Christians-MacBook-Pro locationd[10409]: BLP: Need a bundle path or a bundle identifier.
System.AggregateException: One or more errors occurred. ---> System.ArgumentNullException: Value cannot be null.
Parameter name: src
 at (wrapper managed-to-native) System.Runtime.InteropServices.Marshal:copy_from_unmanaged (intptr,int,System.Array,int)
 at System.Runtime.InteropServices.Marshal.Copy (IntPtr source, System.Byte[] destination, Int32 startIndex, Int32 length) <0x1a89fe0 + 0x00032> in <filename unknown>:0 
 at Xamarin.Simulator.Server.ScreenManager+<OnDisplayUpdated>c__AnonStorey0.<>m__0 (Int32 i) <0x8740140 + 0x000e7> in <filename unknown>:0 
 at System.Threading.Tasks.Parallel+<ForWorker>c__AnonStorey3`1[TLocal].<>m__1 () <0x1b833d0 + 0x00318> in <filename unknown>:0 
 --- End of inner exception stack trace ---
 at System.Threading.Tasks.Task.ThrowIfExceptional (Boolean includeTaskCanceledExceptions) <0x1955280 + 0x00049> in <filename unknown>:0 
 at System.Threading.Tasks.Task.Wait (Int32 millisecondsTimeout, CancellationToken cancellationToken) <0x1956a70 + 0x000c8> in <filename unknown>:0 
 at System.Threading.Tasks.Task.Wait () <0x1956890 + 0x00033> in <filename unknown>:0 
 at System.Threading.Tasks.Parallel.ForWorker[TLocal] (Int32 fromInclusive, Int32 toExclusive, System.Threading.Tasks.ParallelOptions parallelOptions, System.Action`1 body, System.Action`2 bodyWithState, System.Func`4 bodyWithLocal, System.Func`1 localInit, System.Action`1 localFinally) <0x194a680 + 0x00688> in <filename unknown>:0 
---> (Inner Exception #0) System.ArgumentNullException: Value cannot be null.
Parameter name: src
 at (wrapper managed-to-native) System.Runtime.InteropServices.Marshal:copy_from_unmanaged (intptr,int,System.Array,int)
 at System.Runtime.InteropServices.Marshal.Copy (IntPtr source, System.Byte[] destination, Int32 startIndex, Int32 length) <0x1a89fe0 + 0x00032> in <filename unknown>:0 
 at Xamarin.Simulator.Server.ScreenManager+<OnDisplayUpdated>c__AnonStorey0.<>m__0 (Int32 i) <0x8740140 + 0x000e7> in <filename unknown>:0 
 at System.Threading.Tasks.Parallel+<ForWorker>c__AnonStorey3`1[TLocal].<>m__1 () <0x1b833d0 + 0x00318> in <filename unknown>:0 <---

system: Jun 22 15:25:21 --- last message repeated 1 time ---
Jun 22 15:25:21 Christians-MacBook-Pro CoreSimulatorBridge[10414]: Request received to remove pairs that are no longer paired by the host.
        hostPairedArray = (
    )
        simPairedArray=(
    )
        unpairArray=(
    )
fattikus
  • 542
  • 1
  • 4
  • 15
  • Please check the iOS logs for more details and post them here. It is impossible to determine what is happening with only this error message. – Gerald Versluis Jun 22 '16 at 13:14
  • im following up on this, i think its related https://forums.xamarin.com/discussion/16770/failed-to-start-application-on-the-target-simulator-xamarin-ios-extension – fattikus Jun 22 '16 at 13:51

3 Answers3

16

I've got the same problem. After searching the solution for 4 hours... and reading all Internet with no result, I found that problem is when on the Mac machine in user account confuguration you have different NAME ACCOUNT and FULL NAME ACCOUNT. These 2 fields must be filed with the same names. Otherwise, the path from VS iosEMualtor doesn't match (it takes FULL NAME).

To do so just follow the steps of this Apple-KB-Article: https://support.apple.com/en-us/HT201548 (Yosemite instructions shown below)

  1. Choose Apple menu  > System Preferences, then click Users & Groups.
  2. Click the lock button, then enter an administrator name and password.
  3. From the list of users, Control-click or right-click the user that you want to rename. Choose Advanced Options from the shortcut menu.
  4. Change the name in the “Full name” field, then click OK.
shim
  • 9,289
  • 12
  • 69
  • 108
M.Gajdzik
  • 161
  • 2
  • 1
    Thanks it was so helpful. I found that it is not necessary to name "Account name" and "Full name" the same. In fact : do not use the "Full name" when connecting the mac from VS ==> use the "Account name" and now the remote debug still works and .... the iOs simulator works too :) – existenz31 Oct 04 '16 at 21:27
0

I got this error yesterday when I updated xamarin to the latest on both mac and windows. I was able to run the simulator on mac but not on windows. I fixed it by installing the iso simulator to the preview version on windows and the remote simulator works again. iOS Simulator (for Windows)

wesley Wang
  • 103
  • 11
0
  1. delete folder /Users/xxxx/Library/Caches/Xamarin/mtbs/builds/ProjectName (on Mac)
  2. Rebuild Project
  3. run debug on simulatorPhone
Taras Lisniak
  • 71
  • 1
  • 5