Forum Visual Studio

Xamarin.iOS Build Host Issue - Another instance already connected

Hi, I just installed the latest stable bits from Xamarin on my Mac and my PC. I first launch Xamarin.iOS Build Host on my Mac and click "Pair". It pops up a code for me to enter on my PC. Then on my PC I click the "Refresh Build Server Info" button, click continue, click "Configure Host Manually", type in my Mac's IP address, click "OK", a popup comes up momentarily saying it's connecting to my Mac, then all the windows disappear and I'm back at Visual Studio with two errors in the error list.

Error 1 Another instance of Visual studio is using the Build Host on 10.70.29.215. Double click here to select a new server. Xamarin.iOS Extension 0 0
Error 2 Connection to Xamarin.iOS Build Host failed. Double click here to select a server. Xamarin.iOS Extension 0 0
Why does keep insisting that Visual Studio is already connected? How do I fix this?

«1

Posts

  • josemiguel.torresjosemiguel.torres ESXamarin Team Xamurai

    Hello Bart,

    Try to unpair and pair the Xamarin.iOS Build Host again and input the new PIN in the VS connection dialog.

    Let me know...

  • BartSipesBartSipes USMember

    Hi Jose, I tried that as well and I end up with the same result. Also, I never get prompted on the VS side to enter the pin. I just get the momentary popup saying VS is trying to connect to the Build Host and then get the errors in the error list. I don't get a window asking for the pin.

  • josemiguel.torresjosemiguel.torres ESXamarin Team Xamurai

    Hi Bart,

    I guess you downloaded the latest Xamarin.iOS for VS right? version 1.8

  • BartSipesBartSipes USMember

    As far as I know. I just grabbed the installer straight from Xamarin.com a couple hours ago. I would check but I'm installing VS 2012 update 4 at the moment.

  • josemiguel.torresjosemiguel.torres ESXamarin Team Xamurai

    Yes you did, sorry. Could you remove the registry key: HKEY_CURRENT_USER\Software\Xamarin\MonoTouchVS\MonoTouchBuildServerAddress

    And try again please,,,

    thanks

  • BartSipesBartSipes USMember

    Ok, removed that. I'll try again as soon as the VS installer finishes.

  • BartSipesBartSipes USMember
    edited November 2013

    Ok, now I encountered a different problem. VS 2012 lost my Xamarin account info, so I am not logged into the Xamarin account. Normally not a problem. However when I go to login, I type in my email and password, my pic pops up, click "Log In", it brings up the spinner with "Logging In", then "Activating", then it tells me "Please connect to the internet to proceed". I've brought up Fiddler and I see the traffic going to Xamarin with HTTP 200 responses so I don't know why it thinks that I'm not connected.

    Also, to answer your previous question, yes I'm using Xamarin.iOS 1.8 (1.8.361).

  • BartSipesBartSipes USMember

    Ah, thanks Mathieu.

  • BartSipesBartSipes USMember

    Whohoo! Up and running again now. It appears the activation server issue has been resolved and removing the registry key fixed the VS already connected issue. Thanks.

  • MarkGibaud.2183MarkGibaud.2183 GBUniversity ✭✭

    A quick addition if anyone else hits this problem - I had to go one level further in the registry:

    HKEY_CURRENT_USER\Software\Xamarin\MonoTouchVS\KnownServers

    ...and remove the entry for the build host IP that wouldn't pair correctly. After that a re-pairing worked.

  • Hi,
    I deleted both described registry keys mentioned above but the error still remained, is there others suggestion?

  • Fixed, Xamarin.ios build host was off on my Mac.

  • Our whole team is getting this issue, and it only started happening after the last Xamarin update. Restarting the build host does not always do it for me. At least once a day, this happens, and the only way to move forward is to kill Visual Studio (seriously). When you build, it acts like it's working, but the progress bar at the bottom gets stuck. You can't cancel the build, and you can't close VS.net because it says a build is in progress. It's rather annoying for all of us, and I hope it gets resolved with the next update.

  • PhilHarrisPhilHarris USMember

    Michael Stuart - I am also getting the same issue on the Lost pairing, hung VS.

  • unarityunarity USMember

    Restarting mac helped to me...for now. Try to turnoff proxy server if you are using windows 8.1

  • Guy.GodinGuy.Godin USMember ✭✭

    I don't understand the whole necessity of pairing VS to your build host. The build host should just be a service that runs on the Mac and that VS uses when it needs to (query list of plugged devices, build, deploy, etc). You don't need to have an "active connection" to the host either.. You can just queue client requests or process them in parallel (if u ever have more than 1 client connected, if that ever happens). The design decisions that went into this product baffle me and so does the quality of the implementation.

  • I have same problem, I restarted both boxes and still cant connect. WTF?

    Error 3 Connection to Xamarin.iOS Build Host failed. Double click here to select a server. Xamarin.iOS Extension

    Error 4 Another instance of Visual studio is using the Build Host on 192.168.1.100. Double click here to select a new server. Xamarin.iOS Extension

  • Markusgreuel.5980Markusgreuel.5980 USMember, University

    I fought with this issues for some time. For me the only way to fix it was to reset my Windows VM to a snapshot without a pairing connection and reset the Mac Os VM to the state it was in when I downloaded it. But this only works if I do not apply Xamarin updates on the Mac VM. After updates it's broken again.

    Really an extremely poor experience, which is a shame considering how smoothly it works with Android.

  • FredyWengerFredyWenger CHInsider ✭✭✭✭✭

    Hy all
    I try now since a few days to install a complete environment for multiplatform (VS2013 + Update2 + Xamarin + Android-Tablet + Windows-Phone-Emulator, MAC + XCode + Xamarin Studio + IPhone + IPad).
    I then have created a first "Hello World" App and want bring it to work now with the whole environment...

    • Android seems to work
    • For enable the WP-Emulator (I have no Windows-Phone), I had to change (VM-)settings in the BIOS!
      => The WP-Emulator now works, but has negative side effects (screen does not wake-up after screen-saver, CTI does
      not work anymore)
      **- The biggest problem (I try to solve it now for about two days) is the problem, that is described here **
      I have tried anything described here...
      Sometimes it works for one or two try's then (the most time) It don't works

    Same Errors as described by Vojtech Machacek (see on top) **
    **Are there any news how to solve this problem...?

    I try to test the Xamarin and was not able to install a running environment in about 4 full days now...
    I was not able until now, to write my first "real code" as the base-environment not works
    This is very frustrating...

    Thanks for any help

  • FredyWengerFredyWenger CHInsider ✭✭✭✭✭

    Update to my own posting on top:
    By my (various) tries to solve the problem, I have installed an old version of the Xamarin-Software for the MAC (mistake -> old link).
    To solve this (self made) problem, I have installed the software on the MAC once again.
    Then there was a "Hotfix" installed with the lapidary sentence “This bugfix solves some problems with the Trial-Version and iOS…” showed in the release-notes after install.
    B.t.w.: I have installed the MAC software from the "official Link" a few days before...
    Now, the problem is much better, but still not solved... :-(
    A workaround for me is:

    • close VS2013 and the "Build Host" on the MAC
    • restart "Build Host" on MAC
    • restart "VS2013"
      -> Works for a while...

    This is definitely not nice (and also not smart)!
    It seems as that "some process" is blocking the Port 5000 on the Mac.
    I can't understand, that this issue is so difficult to fix..?

    Every newbie (like me) stumbles over this problem!
    => This is no good reputation for Xamarin.

    I hope, this problem will be fixed definitely soon (and I hear that the problem is fixed)

    Question:
    - Can anyone say, if the problem is only related to the Trial-Version (as described in the release-note to the bugfix"?
    => Does this problem not exist in a licensed version?

    Thanks for an answer

  • SergiCzerkasowSergiCzerkasow USUniversity ✭✭

    Problem still exist, i have vs2013 and 2 mac machines, one with os x 10.9.4 and the other with os x 10.10
    cant connect to any of them, so this makes a dev a little harder.

  • FredyWengerFredyWenger CHInsider ✭✭✭✭✭

    Hi Sergi

    Do you work with a Trial-Version or with an licensed Xamarin-version (that was my Question)?

    Thanks

  • josemiguel.torresjosemiguel.torres ESXamarin Team Xamurai
    edited August 2014

    Hey guys,

    So sorry about this issue. We are trying to make it more reliable. Meanwhile if any of you guys are still facing this issue try following steps.

    (I am assuming no VS instance is running)

    • 1.- Click on Unpair button on Xamarin.iOS Build Host
    • 2.- Remove %LOCALAPPDATA%\Xamarin\MonoTouch*.* (Tip off: remove only folder's content -it should be two files- not the folder)
    • 3.- Remove MonoTouchBuildServerAddress from HKEY_CURRENT_USER\Software\Xamarin\MonoTouchVS on Win Registry
    • 4.- Click on Pair button on Xamarin.iOS Build Host and start over a new pairing/connection process on a new VS instance

    Please let me know whether these steps fix this issue or not

    josemiguel

  • FredyWengerFredyWenger CHInsider ✭✭✭✭✭

    Following your steps (1. - 4.)....

    ... I now have 2 (new) errors and 10 warnings in project and am not able to start a debug-session for iOS

    Error (in German):
    Fehler 12 Die Datei "obj\iPhone\Debug\FormsTemplateiOS.exe" kann nicht in "bin\iPhone\Debug\FormsTemplateiOS.exe" kopiert werden. Der Prozess kann nicht auf die Datei "bin\iPhone\Debug\FormsTemplateiOS.exe" zugreifen, da sie von einem anderen Prozess verwendet wird. MatrixGuide.iOS
    Translated:
    The file "obj\iPhone\Debug\FormsTremplateiOS.exe" can not be copied to the file "bin\iPhone\Debug\FormsTemplateiOS.exe" as this file is in use from another process

    What to do now..?

    Thanks

  • FredyWengerFredyWenger CHInsider ✭✭✭✭✭

    Update to my last post:
    Close vs2013, close BH on Mac restart both... no change
    I then have tried to delete the file "bin\iPhone\Debug\FormsTemplateiOS.exe" manually (before that, I have closed VS2013).
    I also can't delete the file manually..
    **Error message: The file can't be deleted, as it is in use by process "vshost-clr2.exe" **

    I don't see any task "vshost-clr2.exe" in the task-manager.

    This is annoying - now I am not able anymore to debug iOS...

  • FredyWengerFredyWenger CHInsider ✭✭✭✭✭

    Update to my last post #2
    I now have rebooted my developer machine, restarted the "Build Host" on the MAC and started VS2013.
    Then the error-message to the "vshost-clr2.exe" has gone away...
    I was able to run iOS-Debug-sessions, than android, then WP, than iOS and then...

    Connection to Xamarin.iOS Build Host failed. Double click here to attempt to reconnect/select a server.

    and then..:

    "Another instance of Visual studio is using the Build Host on 172.16.1.3. Double click here to select a new server."

    Conclusion:
    I have lost another full hour to "shake the bug", instead of testing Xamarin :-(

  • Is the issue fixed ?
    After trying everything i completely reinstalled OSX (10.10), but i always can not achieve the pairing.

  • Hi, back to Mavericks (clean install from USB key), pairing works.

    In my case i needed to know a simple working config : os and software versions that just works.

    Xamarin documentation, installers and software should warn about developper preview osx versions and recommend a good working config. I lost a week of time, but now really happy to start learning the plateform.

    Best regards,

    Alexey

  • Hi, back to Mavericks (clean install from USB key), pairing works.

    In my case i needed to know a simple working config : os and software versions that just works.

    Xamarin documentation, installers and software should warn about developper preview osx versions and recommend a good working config. I lost a week of time, but now really happy to start learning the plateform.

    Best regards,

    Alexey

  • Hi, back to Mavericks (clean install from USB key), pairing works.

    In my case i needed to know a simple working config : os and software versions that just works.

    Xamarin documentation, installers and software should warn about developper preview osx versions and recommend a good working config. I lost a week of time, but now really happy to start learning the plateform.

    Best regards,

    Alexey

  • FredyWengerFredyWenger CHInsider ✭✭✭✭✭

    Update from my side:

    I have seen, that the problem mainly occurs, if the MAC goes to sleep-mode.

    So.. I don't let it go to sleep-mode anymore (changed settings to energy/screensaver on MAC).

    Since then, I further have some problems with the debugging and the MAC, but the worst problem (another instance..) is gone.

  • KenonRonz.9009KenonRonz.9009 USUniversity

    Any further updates on this issue? I am encountering the issue where the MAC Build Host is saying another instance of Visual Studio is attached, when another one is not. This is very frustrating as we deal with this daily and lose hours wrestling with it. We also get an error "Build server with address x.x.x.x is too old to be used with this version of Xamarin.iOS extension." Xamarin on both the Windows and Mac say they are up to date.

  • FredyWengerFredyWenger CHInsider ✭✭✭✭✭

    @KenonRonz.9009‌:
    I think there are (heavy) communication problems between VS and the MAC (I can see that, if I run Fiddler in the Background).
    I have posted this information's (from Fiddler) in another thread: forums.xamarin.com/discussion/25470/false-communication-with-mac
    Unfortunately (once more) without any answer from Xamarin....
    Another Instance is running...:
    Have you disabled the sleep-mode of the MAC = "always on"?
    If not -> try that
    Since I have disabled the sleep-mode, this messages has (mostly) gone (maybe one time in a week)
    Extensions:
    You are right, this is very annoying too...
    Try first to reboot the mac and close/reopen the project in VS2013
    The try to unpair/(re-)pair the build host on MAC with VS2013

    Hope this helps...

  • RezaMohamedRezaMohamed USMember ✭✭✭

    Is there any update to this issue? I have the latest version (as of May 2015) installed and still have the same issue. I have not been able to successfully pair a single time - VS2013 Win10 (tried on Win 8.1 as well) and Yosemite VM.

  • FredyWengerFredyWenger CHInsider ✭✭✭✭✭

    @RezaMohamed:

    I have done a test of the newest integration-software and have posted my finings here:

    https://forums.xamarin.com/discussion/41844/my-findings-after-test-if-the-newest-xamarin-vs-integration-software#latest

    With the new version, I still have problems (described in the thread) but I don't have the issue described in this thread.
    So... if you have deactivated the sleep-mode on mac (like described in my last posting) and the newest (Alpha-)version installed, this problem should be gone... (while others unfortunately still remains)

  • RezaMohamedRezaMohamed USMember ✭✭✭
    edited May 2015

    Fredy - I will give this alpha version a try.

  • J-coSamzJ-coSamz USMember

    I am using visual studio 2013 in Windows 8.1.
    Can any help me on connecting to MAC Build Server? It keeps on Failing
    It will be a great help.

Sign In or Register to comment.