Bug 44071 - IDB agent has some dependency on XS Xcode SDK location preference
Summary: IDB agent has some dependency on XS Xcode SDK location preference
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: XMA ()
Version: 4.2.0 (C8)
Hardware: PC Mac OS
: --- normal
Target Milestone: 4.4.0 (C10)
Assignee: Kyle White
: 44240 ()
Depends on:
Reported: 2016-09-07 21:22 UTC by Kyle White
Modified: 2017-01-05 14:24 UTC (History)
4 users (show)

Is this bug a regression?: Yes
Last known good build: (c7sr1/fcbe082)

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Kyle White 2016-09-07 21:22:08 UTC
Steps to reproduce:
1) On you mac, open XS
2) Go to Preferences > Projects > SDK Locations > Apple and set the Xcode path to something invalid (not Xcode)
3) Go back to XVS, open a Xamarin.iOS project
4) Try to connect XMA.

It results in limited connection due to:
An error occured starting the IDB agent: The IDB Agent initialization exceeded the timeout of 60000 millisecs without receiving confirmation from the Agent.

5) Now go back to XS on the mac
6) Set the path to the correct Xcode (the same one in XVS preferences)

Now try to reconnect to XMA. It will connect. 

Clearly XVS has some dependency on the Xs preference and it shouldn't.
Comment 3 Ben Beckley 2016-09-13 16:16:15 UTC
*** Bug 44240 has been marked as a duplicate of this bug. ***
Comment 4 mag@xamarin.com 2016-12-22 20:11:59 UTC
Moving to cycle10 for further investigation
Comment 5 mag@xamarin.com 2017-01-05 14:24:35 UTC
This report caused some deep refactoring and changes in the XMA layer, given that the real issue was that VS were not getting the real Xcode path value sometimes, which caused confusion. And also that IDB agent was not ready to deal with wrong Xcode path set from outside of VS.

That said, this should be the current and expected behaviour and what should be tested:

- VS now always get the real Xcode path set on the Mac (the default one shown by xcode-select or the one set by XS or VS). This path will be shown in the Xcode hint path text box on Tools > Options > Xamarin > iOS

- Every time the Xcode path is changed on VS, the IDB and Designer agents will be restarted, causing XMA to switch to limited state (yellow icon) until the agents finish restarting (this will be advised on a tooltip icon near the Xcode hint path textbox)

- If XS sets a invalid Xcode path and then you connect from VS, IDB will not crash but it will send an exception to VS saying that the Xcode path is wrong and that it needs to be changes from VS. Until that moment, IDB will be running but not getting simulators and all the stuff that is tied to the Xcode location

- If the Xcode path is changed on VS, then XS will see that change. Also if XS changes the Xcode path, VS will also see it. This happens because right now both IDEs share that value and uses the same MacDev library to read and write this setting. This could be changed in the future for both IDEs, but by now is by design for both XS and VS

Marking this issue as Resolved from commit d93dfd492094c65a3709716da65247093bb55766 on master branch