locked
Can't connect to Mac RRS feed

  • Question

  • User155051 posted

    We’re unable to connect to our Mac machine using the Xamarin Mac agent in Visual Studio 2015 (we had previously been using the connection successfully). The error message we get is “Couldn't connect to machinename.local.. Please try again.”

    I’ve followed the troubleshooting guide at https://developer.xamarin.com/guides/ios/gettingstarted/installation/windows/connecting-to-mac/troubleshooting/ but the issue persists. Things I’ve tried: • Made sure Remote Login is enabled • Mac firewall is turned off • I am able to ping the Mac from my PC • Both computers are in a wired connection • There is no .bashrc file in the home directory of the Mac • Uninstall and reinstall Xamarin Studio on the Mac • Added the Mac IP manually in Xamarin Mac agent • Cleared the Broker, IDB, Build, and Designer Agents on the Mac by deleting the XMA folder in the $HOME/Library/Caches/Xamarin directory • Added the line UseDNS no to the file /etc/ssh/sshconfig • Deleted file in the MonoTouch directory at C:\Users\username\AppData\Local\Xamarin/MonoTouch • Restarted both machines multiple times throughout troubleshooting process • Delete ALL contents of the directory "$HOME/Library/Caches/Xamarin" • Established a SSH connection to the Mac using an OpenSSH Windows client

    Looking at the Xamarin logs in Visual Studio, I see some errors related to an invalid license. Some of these errors are:

    Xamarin.VisualStudio.ActivationManager|Error|0|mtouch: error MT9000: This version was released after your subscription expired (9/1/2016 3:52:14 PM). Xamarin.VisualStudio.ActivationManager|Error|0|Read invalid license: iOS Business 2016-09-01 09:52:14Z. This version was released after your subscription expired (9/1/2016 3:52:14 PM). (MT9000) Xamarin.VisualStudio.ActivationManager|Information|0|Found UseDefaultEdition file for iOS, downgrading Xamarin.VisualStudio.ActivationManager|Information|0|Updated license: Android Business 9/1/2016 3:52:14 PM Xamarin.VisualStudio.ActivationManager|Information|0|Checking whether Android license valid for installed version. Xamarin.VisualStudio.ActivationManager|Error|0|monodroid: error XA9000: This version was released after your subscription expired (9/1/2016 3:52:14 PM). Xamarin.VisualStudio.ActivationManager|Error|0|Read invalid license: Android Business 2016-09-01 09:52:14Z. This version was released after your subscription expired (9/1/2016 3:52:14 PM). (XA9000)

    However, I’m signed in with my individual company enterprise account. When I login to Xamarin Studio and Visual Studio I can confirm that my account is an enterprise account, which includes a Xamarin license. However, I don’t even know if this is what is causing our connectivity problem.

    Also, I found an error on the logs that could be the issue... Xamarin.VisualStudio.Remote.State.DisconnectedState|Error|0|Method not found: 'Void Newtonsoft.Json.JsonSerializer.setTypeNameAssemblyFormat(System.Runtime.Serialization.Formatters.FormatterAssemblyStyle)'. System.MissingMethodException: Method not found: 'Void Newtonsoft.Json.JsonSerializer.setTypeNameAssemblyFormat(System.Runtime.Serialization.Formatters.FormatterAssemblyStyle)'.

    I’ve attached text files containing my Visual Studio 2015 and Xamarin Studio information as well as the Xamarin log file.

    Thank you,

    Wednesday, April 5, 2017 7:21 PM

Answers

  • User155051 posted

    Solved my Mac agent connectivity problem by updating my Newtonsoft.Json NuGet package to 8.0.3. I tried this after reading the following in the Xamarin logs....

    Xamarin.VisualStudio.Remote.State.DisconnectedState|Error|0|Method not found: 'Void Newtonsoft.Json.JsonSerializer.setTypeNameAssemblyFormat(System.Runtime.Serialization.Formatters.FormatterAssemblyStyle)'. System.MissingMethodException: Method not found: 'Void Newtonsoft.Json.JsonSerializer.setTypeNameAssemblyFormat(System.Runtime.Serialization.Formatters.FormatterAssemblyStyle)'.

    All of projects in the solutions were using 8.0.3 with the exception of one, which was using 6.0.4, so I updated that project Newtonsoft.Json NuGet package to version 8.0.3 and now I'm able to connect to my Mac agent.

    I don't know why the Xamarin Mac Agent would care or use the NuGet packages in my solution, but after doing this I'm able to establish a connection!

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Thursday, April 6, 2017 6:39 PM

All replies

  • User76049 posted

    @rarenivar

    Try posting on the Visual Studio forum, this is the wrong forum for this type of question.

    Even with the correct Xamarin licence you do have to register the Mac for Visual Studio enterprise, we had an enterprise licence and had to do the same thing but it ended up needed backend tweaking at Xamarin's end so maybe drop an email to hello@xamarin.com.

    I'd post on the Visual Studio forum, this post will just get lost here.

    Wednesday, April 5, 2017 7:35 PM
  • User155051 posted

    @NMackay - Thank you! I've posted this question on the Visual Studio forum.

    Wednesday, April 5, 2017 7:56 PM
  • User155051 posted

    Solved my Mac agent connectivity problem by updating my Newtonsoft.Json NuGet package to 8.0.3. I tried this after reading the following in the Xamarin logs....

    Xamarin.VisualStudio.Remote.State.DisconnectedState|Error|0|Method not found: 'Void Newtonsoft.Json.JsonSerializer.setTypeNameAssemblyFormat(System.Runtime.Serialization.Formatters.FormatterAssemblyStyle)'. System.MissingMethodException: Method not found: 'Void Newtonsoft.Json.JsonSerializer.setTypeNameAssemblyFormat(System.Runtime.Serialization.Formatters.FormatterAssemblyStyle)'.

    All of projects in the solutions were using 8.0.3 with the exception of one, which was using 6.0.4, so I updated that project Newtonsoft.Json NuGet package to version 8.0.3 and now I'm able to connect to my Mac agent.

    I don't know why the Xamarin Mac Agent would care or use the NuGet packages in my solution, but after doing this I'm able to establish a connection!

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Thursday, April 6, 2017 6:39 PM
  • User232552 posted

    I have the same problem but all my JSON nugets are 10.2 .. not sure why the build agent cares about the NuGets.

    Thursday, April 20, 2017 8:52 PM
  • User314235 posted

    Also having the same issue. When I try and start the broker the first time, I get the JSON error, then when I try and connect again, it tries to start it on a new port which it can't do and it times out.

    Occasionally it will work, but it's just burning hours....

    Thursday, May 4, 2017 9:49 AM
  • User140054 posted

    I updated Newtonsoft.Json to 8.02 in all Projects, but that didn't work either. I even added it to my iOS Project.

    Tuesday, May 16, 2017 5:07 PM
  • User140054 posted

    I had to downgrade to this level of the tool set in order to fix the issue. https://releases.xamarin.com/stable-release-cycle-9/

    My old MacBook (only used for Builds) isn't capable of upgrading to Sierra or XCode 8.3.

    Wednesday, May 17, 2017 1:11 PM
  • User184181 posted

    I fix this problem by upgrade Xamarin.forms.

    Monday, June 19, 2017 6:26 AM