ERROR : "The returned port is invalid."

I am using windows 8 and visual stuido 2012. I would like to make an iphone app while using the vs2012. I have installed xamarin on the windows 8 and I have installed mac os x mountaion lion on my virtual machine that is vmware. I have installed xamarin and xcode on macosx. The macosx's ip is 192.168.1.5. The windows's ip 192.168.1.3. I have set vmware adapter settings as bridge and replicate physical.

I cannot connect the mac host. I open vs, then I go tools -> options -> ios. I click configure button. I click configure host manually button. I type ip address and I click diagnose button. However It is failed on step 'Checking for a valid control connection to the server'

How can I solve this problem ?

Posts

  • SinanAKYAZICISinanAKYAZICI USMember
    edited March 2013

    I'm sorry, I haven't used mac os before. So I don't know how to do what you have said.

    How can I check server state ?
    How can I run mtbserver or kill mtbserver ?

    I have checked the mtbserver by using activity monitor. It is not running. I still cannot connect the mac os.

  • JohnHairJohnHair GBMember ✭✭✭✭✭

    Hi, can you confirm that you can compile and run a Hello World in Xamarin Studio on your virtual mac?

  • SinanAKYAZICISinanAKYAZICI USMember

    I have created a hello world project at the xcode on the macos. I have run it. It has been run succesfully. Then I have created a hello world project at the xamarin studio on the macos. I have run it. It has also been run successfully.

  • AlexSotoAlexSoto MXXamarin Team Xamurai

    Hey @SinanAKYAZICI

    Do you have VS2010 installed on your system too? or just VS2012

    Alex

  • ViniciusJarina.0630ViniciusJarina.0630 BRXamarin Team Xamurai

    Hello @SinanAKYAZICI

    Here there is two common issues with Xamarin.iOS:

    https://gist.github.com/viniciusjarina/bac2816265d0b4c154d8
    https://gist.github.com/viniciusjarina/ef805b60b7f4c0df78a7

    Also, check if you can telnet your mac from Windows:

    and type:

    HELO
    

    After that, you should see something like:

    MTBSERVERPORTS:64881
                    Apple SDK developer root: /Applications/Xcode.app/Contents/Developer
        Server IP Address : 10.211.55.2
    
  • SinanAKYAZICISinanAKYAZICI USMember

    @dalexsoto I have just vs2012. The vs2010 is not installed.
    Also, My windows 8 is 64 bit and my mac os is 64 bit.

    @Jarina
    I have tried what you had said, however it has gave an error like below.

    Apple iOS SDK not found at '/Applications/Xcode.app' Apple iOS SDK not found at '/Developer'
    System.ApplicationException: Apple SDK developer root not specified.
    at MonoTouch.Tools.Frameworks.MonoTouchFrameworks.Init () [0x00000] in :0
    at Mtb.Application.MainClass.Init () [0x00000] in :0
    at Mtb.Application.MainClass.Main (System.String[] args) [0x00000] in :0
    Exception: Exception type: System.ApplicationException
    Apple SDK developer root not specified.
    at MonoTouch.Tools.Frameworks.MonoTouchFrameworks.Init () [0x00000] in :0
    at Mtb.Application.MainClass.Init () [0x00000] in :0
    at Mtb.Application.MainClass.Main (System.String[] args) [0x00000] in :0
    Error: Unknown error occurred.

  • ViniciusJarina.0630ViniciusJarina.0630 BRXamarin Team Xamurai

    @SinanAKYAZICI

    Looks like your Xcode is not properly installed.

  • SinanAKYAZICISinanAKYAZICI USMember

    @Jarina Thank you so much. The problem is solved. It has worked. I haven't moved the xcode into the applications. That has been what caused the problem.

  • wil.2496wil.2496 USMember

    I have a same issue. I followed the instruction but no go. I don't have documentation/docset folder in my mac. I have the latest Xcode.

    I get this error with when I try to connect with telnet from window.

    Error: Error loading Xcode information for prefix '/Applications/Xcode.app/Conte
    nts/Developer' Exception: Exception type: System.FormatException Input string was
    not in the correct format at System.Int32.Parse (System.String s) [0x00000] in
    :0 at MonoTouch System.ApplicationException: Apple SDK developer
    root not specified. at MonoTouch.Tools.Frameworks.MonoTouchFrameworks.Init ()
    [0x00000] in :0 at Mtb.Application.MainClass.Init () [0x0000
    0] in :0 at Mtb.Application.MainClass.Main (System.String[]
    args) [0x00000] in :0 Exception: Exception type: System.Applic
    ationException Apple SDK developer root not specified. at MonoTouch.Tools.Framew
    orks.MonoTouchFrameworks.Init () [0x00000] in :0 at Mtb.Appl
    ication.MainClass.Init () [0x00000] in :0 at Mtb.Application
    .MainClass.Main (System.String[] args) [0x00000] in :0
    Error:
    Unknown error occurred.

    I spent all day trying to get my pc to talk to mac. man this is so frustrating. I this I will just code in my mac.

  • RichardShawRichardShaw USMember

    I have the same issue that wil.2496 stated.

    I have a Win8 x64 machine with VS2012 trying to communicate with my Mac. When I try to debug/build from Visual Studio, I get the following:

    Checking for a valid control connection to the server : Failed

    Then, after looking for a solution to that (and finding this thread), I cannot continue further.
    Just to be clear, this is the error that I am getting when executing the following command:

    $ telnet my-mac-machine 5000

    `Error: Error loading Xcode information for prefix '/Applications/Xcode.app/Contents/Developer'

    Exception: Exception type: System.FormatException
    Input string was not in the correct format
    at System.Int32.Parse (System.String s) [0x00000] in :0
    at MonoTouch.Tools.Frameworks.AppleSdkSettings.Init () [0x00000] in :0
    System.ApplicationException: Apple SDK developer root not specified.
    at MonoTouch.Tools.Frameworks.MonoTouchFrameworks.Init () [0x00000] in :0
    at Mtb.Application.MainClass.Init () [0x00000] in :0
    at Mtb.Application.MainClass.Main (System.String[] args) [0x00000] in :0
    Exception: Exception type: System.ApplicationException
    Apple SDK developer root not specified.
    at MonoTouch.Tools.Frameworks.MonoTouchFrameworks.Init () [0x00000] in :0
    at Mtb.Application.MainClass.Init () [0x00000] in :0
    at Mtb.Application.MainClass.Main (System.String[] args) [0x00000] in :0
    Error: Unknown error occurred.
    Connection closed by foreign host.`

    I'm guessing the "Apple SDK Developer root not specified" might have something to do with it. Any ideas would be greatly appreciated!

  • MaximGrigoryevMaximGrigoryev UAMember ✭✭

    I have exactly the same issue as Richard and Wil.2496. Can someone help us?

  • KevinBowlingKevinBowling USMember, University
    edited April 2013

    I'm having exactly the same issue (Status: Unreachable):

    OSX 10.8.3

    XCode 4.6.2 (4H1003)

    Xamarin 4.0.4 (build 2)

    mtouch 6.2.3.0 (8d98f5e)

    Windows 7 Ultimate N SP1

    Visual Studio Professional 2012 Update 2

  • rdiazconchardiazconcha MXUniversity ✭✭

    The same here. I'm using Windows 8 64bit, VS2012 and XCode 4.6.2. The error I receive after trying to telnet the iMac is:

    Error: Error loading Xcode information for prefix '/Applications/Xcode.app/Conte
    nts/Developer'
    Exception: Exception type: System.FormatException
    Input string was
    not in the correct format
    at System.Int32.Parse (System.String s) [0x00000] in
    :0
    at MonoTouch.Tools.Frameworks.AppleSdkSettings.Init () [0
    x00000] in :0
    System.ApplicationException: Apple SDK developer
    root not specified.
    at MonoTouch.Tools.Frameworks.MonoTouchFrameworks.Init ()
    [0x00000] in :0
    at Mtb.Application.MainClass.Init () [0x0000
    0] in :0
    at Mtb.Application.MainClass.Main (System.String[]
    args) [0x00000] in :0
    Exception: Exception type: System.Applic
    ationException
    Apple SDK developer root not specified.
    at MonoTouch.Tools.Framew
    orks.MonoTouchFrameworks.Init () [0x00000] in :0
    at Mtb.Appl
    ication.MainClass.Init () [0x00000] in :0
    at Mtb.Application
    .MainClass.Main (System.String[] args) [0x00000] in :0
    Error:
    Unknown error occurred.

    Someone please help!

  • DaveTDaveT DEMember

    I am having the same issues since last friday after the update for xcode. I already reinstalled Xamarin a dozen times on my Windows 7 machine and on my MacMini. But nothing worked.

  • MathiasKuhrMathiasKuhr DEMember

    I have also exactly the same issue as Blitzxion, Wil.2496 and others. I just started a Xamarin 30-Day trial and this is a big show-stopper for me.

  • wil.2496wil.2496 USMember

    Xamarin? Please help. Any idea on this?

  • CombyJean-MarcCombyJean-Marc FRMember

    Same Problem: I'm using Windows 8 (64bits) VS2010 and XCode 4.6.2

    Error: Error loading Xcode information for prefix '/Applications/Xcode.app/Conte nts/Developer' Exception: Exception type: System.FormatException Input string was not in the correct format at System.Int32.Parse ....

  • JohnJilekJohnJilek USMember

    Just upgraded from Indie to Business and can't connect from VS2012 on Windows 7 64-bit to XCode 4.6.2. Not impressed.

    Error: Error loading Xcode information for prefix '/Applications/Xcode.app/Contents/Developer'
    Exception: Exception type: System.FormatException
    Input string was not in the correct format

  • TommyFannonTommyFannon USMember

    same problem here. i can connect to a machine that has not been upgraded to xcode 4.6.2

  • EbenKrapfl.6860EbenKrapfl.6860 USMember ✭✭

    I am also having the same problem. Everything seemed to be working until I upgraded XCode to 4.6.2. Is there anyone from Xamarin who can either give us a workaround for this, or an ETA on a fix?

    Thanks,
    Eben

  • DaveTDaveT DEMember
    edited April 2013

    Like Chris suggested in another thread forums.xamarin.com/discussion/comment/11126/#Comment_11126
    downgrading to Xcode 4.6.1 works. At least a workaround for the time being.

  • TommyFannonTommyFannon USMember

    I can confirm downgrading works.

  • wil.2496wil.2496 USMember

    I downgraded to 4.6.1 from 4.6.2 and it didn't work.

  • MarkWhite.3552MarkWhite.3552 GBMember

    Also just started a trial and having the same issue ... I don't want to mess around downgrading Xcode just to run the trial.

  • ViniciusJarina.0630ViniciusJarina.0630 BRXamarin Team Xamurai

    @wil.2496

    Can you gist your "Mac Server Log" http://screencast.com/t/Qcz9qYLcM

    @MarkWhite.3807

    You don't need to Downgrade, the latest STABLE version 6.2.4.2 will work with Xcode 4.6.2

  • AlexeyBogdanovAlexeyBogdanov RUMember

    Failing on step 'Checking for a valid control connection to the server' ('The returned port is invalid').

    Mac: Xamarin Studio 4.0.8, Xamarin.iOS 6.2.6.6 (Business edition), XCode 4.6.2.

    Windows: Win8, VS 2012, Xamarin.iOS 1.1.200.

    Logs from Mac process (mtbserver.log):

    [30-may-2013 19:02:29] Warning: Failed to parse Xcode revision from '2067.2'
    [30-may-2013 19:02:30] Apple SDK developer root: /Applications/Xcode.app/Contents/Developer
    [30-may-2013 19:02:30] Server IP Address : 192.168.1.100
    

    No logs in VS Output (Mac Server Log).

    telnet MacName 5000 works and server responds to HELO:

    MTBSERVERPORTS:49360
    Apple SDK developer root: /Applications/Xcode.app/Contents/Developer
    Server IP Address : 192.168.1.100
    
Sign In or Register to comment.