Forum Visual Studio
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Can not deploy on emulator

softlionsoftlion FRBeta ✭✭✭

Hi all,
i move my question here.
Here the log file while deploying to the ios emulator from VS:

Starting debug on:iPhone (Retina) 7.0
Remote build finished...
Running AcTouchMono.IOS.VisualStudio.MonoTouchPackage Error: 0 : Exception caught.
System.Net.WebException: The remote server returned an error: (500) Internal Server Error.
   at System.Net.HttpWebRequest.GetResponse()
   at MonoTouch.Tools.Utilities.BuildServerClient.ServerIO.Server_GetResult[T](String command, IDictionary`2 queryVariables)
Mono.IOS.VisualStudio.MonoTouchPackage Error: 0 : Xamarin.iOS encountered the following error(s):
System.Exception: Failed to run application (Generic)
Server command 'DebugApplication': failed to start application debugging session

Command execution task ended with exception

Exception System.Net.WebException: The remote server returned an error: (500) Internal Server Error.

Exception details can be found in the log file

On server log file:

04-févr.-2014 14:29:52] Error: Command [DebugApplication: CommmandUrl=DebugApplication] failed.
[04-févr.-2014 14:29:52] Exception: Exception type: System.NullReferenceException
Object reference not set to an instance of an object
  at Mtb.Server.Commands.DebugApplication.StartLogProxy (MonoTouch.Tools.Tools.Mtouch mtouch) [0x00000] in <filename unknown>:0 
  at Mtb.Server.Commands.DebugApplication.StartProxy (MonoTouch.Tools.Tools.Mtouch mtouch) [0x00000] in <filename unknown>:0 
  at Mtb.Server.Commands.DebugApplication.HandleRequest (ILoggingHelper logger, System.Object commandRequestState) [0x00000] in <filename unknown>:0 
  at Mtb.Server.BaseCommand.OnRequest (System.Net.HttpListenerContext context, System.Object commandRequestState) [0x00000] in <filename unknown>:0 
  at Mtb.Server.Listener.OnRequest (System.Object state) [0x00000] in <filename unknown>:0 

Posts

  • softlionsoftlion FRBeta ✭✭✭
    edited February 2014

    Upgraded to latest alpha, it works now.

    No it don't. Same error.

  • softlionsoftlion FRBeta ✭✭✭

    I managed to launch the app manually. It has been built by mtbserver, but not deployed.

    /Developer/MonoTouch/usr/bin/mtouch -launchsim xxx.app
    

    So the problem is in mtbserver. But it hides which command fails, and does not display the problem.

  • AndrewMobileAndrewMobile USMember ✭✭✭✭
    edited February 2014

    I have the same issue.

    I have:

    Visual Studio 2013, Mac OSX Maverics, XCode 5.0.2
    Xamarin iOS Build Host 7.0.6.168

    @softlion:
    What version of build host and XCode do you have?

  • softlionsoftlion FRBeta ✭✭✭

    7.0.6.168, vs2013 (tested also with 2012 - same pb). xcode 5 something. I'm in touch with Xamarin support. I don't understand the origin of the problem, all was working ok 10 days ago.

  • softlionsoftlion FRBeta ✭✭✭

    XCode is version 5.0

    I'm downloading the latest version and will install/try withit.

    The command which fails is "Show iOS simulator". The toolbar button in VS fails to launch the simulator.

    I also have the SDK documentation tooltip in loop. I updated it already 10 times.

  • AndrewMobileAndrewMobile USMember ✭✭✭✭

    I can also confirm that the app is built correctly on the build host based on the logs.
    It fails however to launch the simulator.

  • softlionsoftlion FRBeta ✭✭✭

    I updated xcode to 5.0.2, no luck.

    I'm reinstalling a macOS from scratch to try.

  • softlionsoftlion FRBeta ✭✭✭

    MacOs reinstalled to latest version.
    Result:

    [05-févr.-2014 05:28:47] Got connection from Visual Studio (log)
    [05-févr.-2014 05:28:47] Handling with command: [DebugApplication: CommmandUrl=DebugApplication] (22)
    [05-févr.-2014 05:28:47] Attempting to acquire command execution lock, timeout set to 00:10:00
    [05-févr.-2014 05:28:47] Error: Command [DebugApplication: CommmandUrl=DebugApplication]   failed.
    [05-févr.-2014 05:28:47] Exception: Exception type: System.NullReferenceException
    

    Object reference not set to an instance of an object
    at Mtb.Server.Commands.DebugApplication.StartLogProxy (MonoTouch.Tools.Tools.Mtouch mtouch) [0x00000] in :0
    at Mtb.Server.Commands.DebugApplication.StartProxy (MonoTouch.Tools.Tools.Mtouch mtouch) [0x00000] in :0
    at Mtb.Server.Commands.DebugApplication.HandleRequest (ILoggingHelper logger, System.Object commandRequestState) [0x00000] in :0
    at Mtb.Server.BaseCommand.OnRequest (System.Net.HttpListenerContext context, System.Object commandRequestState) [0x00000] in :0
    at Mtb.Server.Listener.OnRequest (System.Object state) [0x00000] in :0
    [05-févr.-2014 05:28:55] Finishing Output (log:writer) Thread...
    [05-févr.-2014 05:28:55] Error: An error occurred (no details available)

  • AndrewMobileAndrewMobile USMember ✭✭✭✭

    I have the exact stack call.

  • softlionsoftlion FRBeta ✭✭✭

    It deploys perfectly on the device though. But debugging won't work on it. And i don't know how to get the logs from the device in real time.

  • AndrewMobileAndrewMobile USMember ✭✭✭✭

    the call stack gives a pretty good indication where the exception is originating from
    it should be a good start

  • MoidulHasanMoidulHasan USMember

    It worked for me after closing the iOS simulator.

Sign In or Register to comment.