Bug 53835 - Cannot manually choose an Xcode path in the settings
Summary: Cannot manually choose an Xcode path in the settings
Status: VERIFIED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 4.3.0 (C9)
Hardware: PC Mac OS
: Normal major
Target Milestone: 15.3
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-03-23 09:32 UTC by Alan McGovern
Modified: 2017-07-13 10:23 UTC (History)
6 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

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:
Status:
VERIFIED FIXED

Description Alan McGovern 2017-03-23 09:32:12 UTC
There are two issues so far:
1) If i type a path into the sdk settings like "/Applications/XcodeDoesNotExist.app", close the settings window, then re-open the settings window, my path is gone. Screencast: https://screencast.com/t/NIB1tyuAqu7

2) If you make a mistake typing the path you can completely break the XMA agent in an unrecoverable way.
Screenshot: https://screencast.com/t/do3ry8RJHp

The relevant part of the stacktrace once the exception propagates far enough:
https://gist.github.com/alanmcgovern/bab420a07423e7a7746596ef025bedb4

I have a few questions:
* If there's an explict override for the user can we always just display that override without querying the Mac?
* Can we either display an empty box with some hinttext saying 'automatic', or just leave it empty when the user has not explicitly added an override.
* Can we fix the agents so they don't silently crash when given broken paths?
Comment 1 xamarin-release-manager 2017-06-12 18:40:05 UTC
Fixed in version 4.7.0.30 (master)

Author: Mauro Agnoletti
Commit: 2d79e9b3c5dccb210749973ed4527a485bf5df49 (xamarin/XamarinVS)
Comment 2 mag@xamarin.com 2017-06-12 18:51:39 UTC
Regarding the doubts above:

- There is no user override for the Xcode hint path, so we only show the information that we get from the IDB Agent
- The text box on the settings dialog should never be empty, unless there is no connection to the Mac or the IDB agent is down. In both cases a message will be displayed below the text box
- There should be no crashes withe the latest improvements

The current behaviour is that we just show what IDB Agent informs to VS. Also, when the user changes the Xcode path value, we sync with IDB and send the new value. This sync requires an agent restart, which will be correctly informed from VS in the Output pane, logs and XMA icon.
The restart is required because of MacDev API requirements
Comment 3 mag@xamarin.com 2017-06-21 19:15:00 UTC
After the fix commit above, the Xcode setting experience has been improved. Besides having no errors to retrieve Xcode path, this should be the new experience:

- A new checkbox has been added, to allow deciding if the default Xcode path should be used or not, saving the user to type or decide anything else.

- If there is no connection to the Mac or the IDB agent is not connected, then the Xcode hint path textbox and checkbox should be disabled, given they only makes sense when there is a full active connection

- When there is a full connection against a Mac, if the Xcode path set is the default, then the checkbox should be checked and the text box should be disabled, showing which is the default path. If the path is not the default, then it will be shown in the textbox with the checkbox unchecked.

- If the user unchecks the checkbox, the textbox will be enabled allowing the user to write the new Xcode path to use. If the user writes an invalid value or a blank value, then the default Xcode path will be used instead

Finally, the restarting of the IDB Agent after the change of the Xcode path has been removed, since it's no necessary.
Comment 4 mag@xamarin.com 2017-06-21 19:15:19 UTC
This issue will be fixed for the next 15.3 refresh.
Comment 5 mag@xamarin.com 2017-06-22 19:08:29 UTC
Master commit: 566e7f1c6a9d3e44362f65929e9853e92a283dec

Pending for approval on d15-3 branch: https://github.com/xamarin/XamarinVS/pull/7696
Comment 6 Gaurav Ganorkar 2017-07-06 11:42:46 UTC
Verified this issue on the build

Microsoft Visual Studio Enterprise 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Version 4.6.01586

Installed Version: Enterprise

Xamarin   4.7.0.106 (6a60c38)
Xamarin.Android   7.4.99.16 (0a1eb81)
Xamarin.iOS   10.13.0.14 (0a31695)


Scenario: Create an app, then change $(Optimize) in the Debug
configuration to be True, with $(EmbedAssembliesIntoApk)=False
(default for Debug configuration).

Actual result- Application gets  deploy successfully.
Comment 7 Gaurav Ganorkar 2017-07-06 11:43:08 UTC
Verified this issue on the build

Microsoft Visual Studio Enterprise 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Version 4.6.01586

Installed Version: Enterprise

Xamarin   4.7.0.106 (6a60c38)
Xamarin.Android   7.4.99.16 (0a1eb81)
Xamarin.iOS   10.13.0.14 (0a31695)


Scenario: Create an app, then change $(Optimize) in the Debug
configuration to be True, with $(EmbedAssembliesIntoApk)=False
(default for Debug configuration).

Actual result- Application gets  deploy successfully.
Comment 8 Gaurav Ganorkar 2017-07-06 11:45:14 UTC
Please ignore Comment 6 and Comment 7 , Marked this defect as Verified mistakenly. Reverting the Bug Verified>Resolved FIX again.