Bug 59837 - Cannot connect to Mac
Summary: Cannot connect to Mac
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS (show other bugs)
Version: unspecified
Hardware: PC Windows
: --- critical
Target Milestone: 15.5
Assignee: Bugzilla
Depends on:
Reported: 2017-09-29 04:48 UTC by Rad
Modified: 2017-10-12 19:30 UTC (History)
10 users (show)

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

C:\Users\RKBNair\AppData\Local\Xamarin\Logs\Xamarin.Simulator\2017-09-28-23-31-36.log (786 bytes, text/plain)
2017-09-29 04:48 UTC, Rad
C:\Users\RKBNair\AppData\Local\Xamarin\Logs\15.0 (26.97 KB, application/x-zip-compressed)
2017-09-29 04:50 UTC, Rad
log files (61.28 KB, application/x-zip-compressed)
2017-10-05 21:41 UTC, Rad
screenshot (149.67 KB, image/png)
2017-10-05 21:42 UTC, Rad
screenshot of simulator options (110.18 KB, image/png)
2017-10-05 21:43 UTC, Rad

Description Rad 2017-09-29 04:48:14 UTC
Created attachment 25016 [details]

It used to be working. but recently started showing problems. Visual studio 2017 connects to Mac. However, the simulator doesn't show the page. it shows, "Conneted to Mac' message on the simulator window though.

Visual studio 2017 running on Windows 7
Mac Mini  can tight vnc to mac, no problem

Please see the oog files:
Comment 1 Rad 2017-09-29 04:50:08 UTC
Created attachment 25017 [details]
Comment 2 Alan McGovern 2017-10-02 10:34:30 UTC
Can you update to the latest version of the simulator and try again? The build you are using is very old and it's possible the issue has been resolved already. If you have updated your Mac to Xcode 9 then you are definitely need to upgrade before things will work.

You are currently on Our current stable is and the current preview is
Comment 3 Rad 2017-10-02 15:33:03 UTC
Couldn't find the link to download version

checked here: https://releases.xamarin.com/category/ios-simulator/
Comment 4 Rad 2017-10-02 15:54:04 UTC
Can I choose to run Xcode version 8.2.1 (8C1002) but still upgrade ios simulator to ?
Comment 5 Alan McGovern 2017-10-02 16:02:09 UTC
upgrading your Visual Studio to the latest 15.3 release should also update the simulator. If that has not happened you can grab the latest stable release of the simulator via the link in our documentation: https://developer.xamarin.com/guides/cross-platform/windows/ios-simulator/#Download_and_Install

You can keep using Xcode 8.2.1 with the latest simulator release. That is a tested combination. Do let us know if the newer build resolves the issue!
Comment 6 Rad 2017-10-05 14:39:24 UTC

Upgraded the Xamarin Remoted iOs simulator onto version

The connection issue still persists. The Xamarin agent server popup window shows wait status for ever.
Comment 7 Alan McGovern 2017-10-05 14:48:39 UTC
Can you attach the log files from the session where you triggered the error? Clicking on Help -> Xamarin -> Zip Logs should do the trick!
Comment 8 Rad 2017-10-05 21:41:15 UTC
This time, I could connect to the mac server, but do not see iphone list to choose from to run.

See attachments.
Comment 9 Rad 2017-10-05 21:41:36 UTC
Created attachment 25133 [details]
log files
Comment 10 Rad 2017-10-05 21:42:17 UTC
Created attachment 25134 [details]
Comment 11 Rad 2017-10-05 21:43:03 UTC
Created attachment 25135 [details]
screenshot of simulator options
Comment 12 Alan McGovern 2017-10-05 22:00:24 UTC
If the list of simulators is not showing up in the IDE then the issue is inside the iOS extension for Visual Studio. I've reassigned the bug to that component so it can be examined.

If you can trigger a case where the remoted simulator starts *and* it does not initialize correctly, the log files for that would be useful. The zip file you attached contains no simulator logs so it looks like things are failing before you get that far.  For now there's nothing to look into on the actual simulator side.
Comment 13 Rad 2017-10-06 03:00:08 UTC
Hard part is that it is VERY UNSTABLE.

It has been working for a month. Then suddenly it goes off. Then have to start all over. I never made any changes on visual studio for windows to loose those options from the list of simulators.
Comment 14 mag@xamarin.com 2017-10-12 19:30:55 UTC

I see a mix of many things happening here. So I will try to divide them in order to be clear and be all on the same page.

1 - The first issue (in Description comment) is regarding the iOS remote simulator, which is technically out of the boundaries of the Xamarin Mac Agent and XVS. I mention this because being connected to the Mac from VS doesn't ensure that the iOS remote simulator will work, because it uses a different mechanism for connecting and sending payload to the Mac. It's also a different process than devenv.exe (the VS one). If you have issues here, then the iOS team is more appropriate to tackle the problem.

2 - The second issue (in Comment 6) is confusing. You say "the connection issue still persist", but you have never reported a connection issue on the previous comments (except on Description, which refers to the iOS remote simulator and not to the Mac Agent connection from VS). I say this because of the same thing I mentioned in point #1. A connection issue in XMA is not related to a connection issue in iOS remote simulator and vice versa. Your comment is: "The Xamarin agent server popup window shows wait status for ever."
I can't see any error related to this in the attached logs, so please if this XMA connection error persists, please attach the Ide.log in VS and more details of what is happening.

3 - The third issue (in Comment 8) refers to a successful XMA (not remote simulator) connection, but with no iOS simulators in the devices list in VS. Even if I can't see any error in the Mac and VS logs, a probable cause of not getting iOS simulators could be because you changed the Xcode that you want to use (based on your comments it could be that you changed to Xcode 8.2.1). There are two ways of changing the current Xcode:
  a) You can change Xcode by updating the current version. When you do this, Xcode will require you to accept the Xcode license and probably update the Xcode tools. If you don't do this, we will not be able to get information from it (like simulators) or do actions with it (like launching an app). From the next 15.5 release, we will add remote Xcode license acceptance and Xcode tools installation, which will avoid this kind of issues where you missed to do it on the Mac. By now you will need to go to the Mac and do it manually.

  b) You can change Xcode by having a different Xcode app file (e.g.: Xcode-Foo.app), and renaming it to Xcode.app or even changing the default Xcode path in VS (Tools > Options > Xamarin > iOS). If you do this, you could end with a mess in the Mac side because the Xcode tools could still point to the older Xcode.app, causing unwanted behaviors (like not getting simulators and so on). Also from the next 15.5 version, we introduced a mechanism to refresh the Xcode tools on the Mac when you change the path from VS side, in order to refresh the Mac context and point to the right versions.

Having a better idea of the different situations and the probable causes of the issue, I recommend you do the following:

* Check if you changed Xcode recently and verify that the Xcode license is accepted and the Xcode tools installed (just open Xcode manually on the Mac and wait for any prompt).

* If by any chance you did an Xcode app renaming or changed the Xcode hint path from VS iOS settings, then run this command from the Mac Terminal to ensure the tools points to the right place: xcode-select -switch 'xcode-path'. Note that 'xcode-path' is the path of the Xcode app that you want to use.

Please let us know the status of your connection after performing the mentioned steps and if you are still experiencing problems. By now I change the status to NEED-INFO.

Note You need to log in before you can comment on or make changes to this bug.