Forum Visual Studio

Upgrading Mac OS Catalina to Ver 10.5.4 broke the VS Connector

ShantimohanElchuriShantimohanElchuri USMember ✭✭✭✭✭

Last week I upgraded my Mac OS and ever since I am not able to connect to my Mac Mini from VS 2019 Ver. 16.5.1. I was happily connecting till an hour before my Mac OS update.

The error is:

Couldn't connect to xxx-MAC-MINI. Please try again.
An attempt was made to access a socket in a way forbidden by its access permissions

I was trying troubleshooting as described in this doc.

Up to Step 9 I had no issues. Tried to check on the Known Issues. Deleted the XMA directories in both Mac and Windows. Now I get the error:

An error occurred while trying to start the Broker...

How do I get it resolved?

Best Answer

  • ShantimohanElchuriShantimohanElchuri US ✭✭✭✭✭
    Accepted Answer

    I have resolved this connection issue as follows:

    It appears the Mac OS Catalina upgrade to ver. 10.15.4 is buggy. I have followed the instructions by 'eslamo' in the Xamarin support ticket on GitHub for this Broker Error issue. The detailed steps that I followed are:

    1. On Windows, started Windows Power Shell as an Administrator.
    2. Issued the command "cat C:\Users\xx\AppData\Local\Xamarin\MonoTouch\id_rsa.pub".
    3. Opened the Terminal on the Mac.
    4. Issued the command "cat ~/.ssh/authorized_keys".
    5. Compared the one line in the 'id_rsa.pub' on windows with the contents of 'authorized_keys' on Mac. If the entry in Windows file is NOT in Mac then continue with next step. Otherwise go to step #14.
    6. Copied the Windows file 'id_rsa.pub' to my Dropbox.
    7. Opened this file from Dropbox using TextEdit on Mac.
    8. In Mac's Terminal app, issued the command "vi ~/.ssh/authorized_keys".
    9. Issued the vi command 'o' at the last line to insert a new line below in insert mode.
    10. Then selected the contents in the TextEdit and copied the text to clipboard using "Command+C" on Mac.
    11. Pasted that content into the last inserted line in vi using "Command+V" on Mac.
    12. Then pressed Esc to exit edit mode in vi.
    13. Then issued the vi command ':wq' to write the contents and quit vi.
    14. Then on Mac downloaded the [scp.zip](https://github.com/xamarin/xamarin-macios/files/4386337/scp.zip) and decompressed it.
    15. Now some Mac OS System Operations to be done with care.
    16. I followed the instructions given in [this doc](https://support.studionetworksolutions.com/hc/en-us/articles/115003839246-How-to-disable-Systems-Integrity-Protection-SIP-in-macOS) to disable System Integrity Protection (SIP). Here is what I actually did...
    17. On Mac started 'Restart' from the Apple's menu.
    18. When my monitor displayed "No Signal" message, I pressed and held "Command+R" keys on the keyboard" till the Apple icon appeared and released them.
    19. When the account login screen appeared, selected my login image and clicked 'Next' and entered the password. This displayed the Utilities screen.
    20. From the top menu selected Utilities - Terminal to start the Terminal app.
    21. In the Terminal app entered the command "csrutil disable" to disable SIP.
    22. Then issued the command "reboot" to reboot Mac.
    23. On reboot, logged into my account.
    24. Started the Terminal app and entered the command "sudo mount -uw /"/li>
    25. Then issued the command "sudo cp /usr/bin/scp /usr/bin/scp.bak"
    26. Then issued the command "sudo cp ~/Downloads/scp /usr/bin/scp"
    27. Rebooted both Mac and Windows.
    28. Then opened a XF solution in VS on Windows and now VS connected to Mac successfully.

    Before above steps I did tried connecting both to wired LAN and also reinstalling Mac OS. Both of these steps didn't work. I could connect successfully only after above steps.

    Of course, now it appears still something wrong with either Xamarin or Xcode on Mac. That will be another story.

    Hi @JohnRummell , Hope this will be helpful to you too.

Answers

  • JohnRummellJohnRummell USMember
    edited March 30

    I have the same issue.

    Checking host configuration for connecting to 'elite-mac-1'...
    Checking SSH configuration...
    Initializing environment...
    Checking available disk space...
    Checking Mono installation...
    Checking Xamarin iOS installation...
    Checking host configuration for connecting to 'elite-mac-1'...
    Host 'elite-mac-1' is configured correctly
    Starting connection to 'elite-mac-1'...
    Checking Broker 16.5.000.521 installation...
    Installing Broker 16.5.000.521...
    Unable to install the Broker
    Starting connection to 'elite-mac-1'...
    Starting disconnection from elite-mac-1...
    Starting disconnection from elite-mac-1...
    The connection to 'elite-mac-1' has been finished
    An error occurred while trying to start the Broker...
    An active connection to the Mac is required in order to launch the application. Please ensure the connection is established and try again
    
  • ShantimohanElchuriShantimohanElchuri USMember ✭✭✭✭✭
    Accepted Answer

    I have resolved this connection issue as follows:

    It appears the Mac OS Catalina upgrade to ver. 10.15.4 is buggy. I have followed the instructions by 'eslamo' in the Xamarin support ticket on GitHub for this Broker Error issue. The detailed steps that I followed are:

    1. On Windows, started Windows Power Shell as an Administrator.
    2. Issued the command "cat C:\Users\xx\AppData\Local\Xamarin\MonoTouch\id_rsa.pub".
    3. Opened the Terminal on the Mac.
    4. Issued the command "cat ~/.ssh/authorized_keys".
    5. Compared the one line in the 'id_rsa.pub' on windows with the contents of 'authorized_keys' on Mac. If the entry in Windows file is NOT in Mac then continue with next step. Otherwise go to step #14.
    6. Copied the Windows file 'id_rsa.pub' to my Dropbox.
    7. Opened this file from Dropbox using TextEdit on Mac.
    8. In Mac's Terminal app, issued the command "vi ~/.ssh/authorized_keys".
    9. Issued the vi command 'o' at the last line to insert a new line below in insert mode.
    10. Then selected the contents in the TextEdit and copied the text to clipboard using "Command+C" on Mac.
    11. Pasted that content into the last inserted line in vi using "Command+V" on Mac.
    12. Then pressed Esc to exit edit mode in vi.
    13. Then issued the vi command ':wq' to write the contents and quit vi.
    14. Then on Mac downloaded the [scp.zip](https://github.com/xamarin/xamarin-macios/files/4386337/scp.zip) and decompressed it.
    15. Now some Mac OS System Operations to be done with care.
    16. I followed the instructions given in [this doc](https://support.studionetworksolutions.com/hc/en-us/articles/115003839246-How-to-disable-Systems-Integrity-Protection-SIP-in-macOS) to disable System Integrity Protection (SIP). Here is what I actually did...
    17. On Mac started 'Restart' from the Apple's menu.
    18. When my monitor displayed "No Signal" message, I pressed and held "Command+R" keys on the keyboard" till the Apple icon appeared and released them.
    19. When the account login screen appeared, selected my login image and clicked 'Next' and entered the password. This displayed the Utilities screen.
    20. From the top menu selected Utilities - Terminal to start the Terminal app.
    21. In the Terminal app entered the command "csrutil disable" to disable SIP.
    22. Then issued the command "reboot" to reboot Mac.
    23. On reboot, logged into my account.
    24. Started the Terminal app and entered the command "sudo mount -uw /"/li>
    25. Then issued the command "sudo cp /usr/bin/scp /usr/bin/scp.bak"
    26. Then issued the command "sudo cp ~/Downloads/scp /usr/bin/scp"
    27. Rebooted both Mac and Windows.
    28. Then opened a XF solution in VS on Windows and now VS connected to Mac successfully.

    Before above steps I did tried connecting both to wired LAN and also reinstalling Mac OS. Both of these steps didn't work. I could connect successfully only after above steps.

    Of course, now it appears still something wrong with either Xamarin or Xcode on Mac. That will be another story.

    Hi @JohnRummell , Hope this will be helpful to you too.

  • JohnRummellJohnRummell USMember

    Today's VS 16.5.2 release fixed this for me.

  • ShantimohanElchuriShantimohanElchuri USMember ✭✭✭✭✭

    @JohnRummell said:
    Today's VS 16.5.2 release fixed this for me.

    That's great...

Sign In or Register to comment.