System.Exception: IDE failed to deploy app

Elw00tElw00t USUniversity

imgur.com/Ws5H5D7

I am trying to run a UITest locally on an emulator. I am using Xamarin Android Player with a Nexus 4 image running lollipop. I am getting a setup error saying it failed to deploy the app, but visual studio is saying that it deployed successfully. Can someone please help me with this. I have attached an image for reference.

Posts

  • Glenn.WilsonGlenn.Wilson USXamarin Team Xamurai

    @Elw00t Make sure that you using the latest stable builds of Xamarin and Xamarin.UITest. If that does not resolve the issue please provide the error and stacktrace and the ConfigureApp statement in your UITest project.

  • Elw00tElw00t USUniversity

    @Glenn.Wilson I have the latest of everything and that doesn't solve it.
    I cant provide a stack trace as the app never actually starts to give me a crash.
    All that i get for an error is what i have provided in the photo. As far as the ConfigureApp statement this is what i have

    app = ConfigureApp
                    .Android
                    .Debug()
                    .EnableLocalScreenshots()
                    .StartApp(Xamarin.UITest.Configuration.AppDataMode.Clear);
    

    the App we are testing is a reference to our UITest project.

  • Glenn.WilsonGlenn.Wilson USXamarin Team Xamurai

    @Elw00t Yes, thanks for that. The stack trace I mean is the one in the photo. Nothing below "StackTrace" is visible. This would be a stack trace from UITest, not your app.

  • Elw00tElw00t USUniversity
    Test Name:  CanCloseDialog
    Test FullName:  Redacted
    Test Source:    Redacted.cs : line 39
    Test Outcome:   Failed
    Test Duration:  0:01:01.38
    
    Result StackTrace:  
    at Xamarin.UITest.Utils.Integration.IdeIntegrationClient.TryConnect(Platform platform)
    at Xamarin.UITest.Android.AndroidApp..ctor(IAndroidAppConfiguration appConfiguration)
    at Xamarin.UITest.Configuration.AndroidAppConfigurator.StartApp(AppDataMode appDataMode)
    at Redacted.BeforeEveryTest() in C:\Redacted.cs:line 15
    Result Message: SetUp : System.Exception : IDE failed to deploy app: Deploy failed
    
    

    sorry about all the Redacteds, but hopefully this will be enough for you to get what you need.

  • Elw00tElw00t USUniversity

    more information that might help you

    Test Name:  CanCloseDialog
    Test Outcome:   Failed
    Result Message: SetUp : System.Exception : IDE failed to deploy app: Deploy failed
    Result StandardOutput:  Full log file: C:\Users\{name}\AppData\Local\Temp\uitest\log-2016-04-15_14-10-16-975.txt
    Potential Android SDK location: (No path) - Not set. [ Source: ANDROID_HOME ]
    Potential Android SDK location: C:\Users\{name}\AppData\Local\Android\android-sdk - Valid SDK. [ Source: Registry ]
    Potential Android SDK location: C:\Users\{name}\AppData\Local\Android\android-sdk - Valid SDK. [ Source: Registry ]
    Using Android SDK: C:\Users\{name}\AppData\Local\Android\android-sdk
    Using JDK: C:\Program Files (x86)\Java\jdk1.7.0_71 [ Source: Registry ]
    Attempting IDE connection for Android: C:\Redacted\bin\Debug\Redacted.DLL.
    Attempting IDE connection through pipe e214c5cdea5f4b16a8194e844ba6198e.
    Deploying app through IDE.
    Instructing the IDE to prepare the test app for execution. Session: Assembly=C:\Redacted\bin\Debug\Redacted.DLL
    Platform=Android
    IDE integration failed to deploy app: Deploy failed
    
    

    I hope something is useful fo ryou

  • Glenn.WilsonGlenn.Wilson USXamarin Team Xamurai

    It looks like either the IDE failed to deploy the app or UITest was not able to connect to it after deployment.

    A few thoughts:

    Does the app have Internet Permissions enabled? It should.

    Make sure the emulator is not locked (in some environments with some emulators that is an issue).

    Review these steps (the top right of the page has a toggle for Visual Studio / Xamarin Studio):
    https://developer.xamarin.com/guides/testcloud/uitest/working-with/running-tests-in-ide/

    The app can be deployed by either the IDE or by UITest. You might try switching to UITest deployment adding .ApkFile() to your ConfigureApp:

    app = ConfigureApp
                    .Android
                    .Debug()
                    .EnableLocalScreenshots()
                    .ApkFile (@"path-to-redacted.apk")
                    .StartApp(Xamarin.UITest.Configuration.AppDataMode.Clear);
    
  • Elw00tElw00t USUniversity
    edited April 2016

    Yes we have internet permissions and the emulator is unlocked.
    I thought test cloud preferred the IDE deployment. At least that's how it looks in the documentation. If test cloud doesn't care I will try it Monday.

  • EdwinSEdwinS USMember ✭✭

    having the same issue here

  • PeterSimonsPeterSimons GBMember ✭✭

    Hi we were getting this problem for aaaages and couldn't find a solution from any forum post all of them gave similar advice as above but I fixed the issue by disabling Fast Assembly Deployment in the android build section of the Project options and we have never had the problem since

Sign In or Register to comment.