ApkFile or InstalledApp has not been configured

syang10syang10 USMember ✭✭

I just moved to a new computer and ran into this error when trying to run a test.
SetUp : System.Exception : ApkFile or InstalledApp has not been configured.

Looking further into the log, it seems to be hung up at this line:

09-10-2017 12:29:41.004 -07:00 - 45 - No named pipe value found in environment variable XTC_IDE.
09-10-2017 12:29:41.004 -07:00 - 46 - Skipped IDE integration, connection failed.

where as my previous PC would run the test with no issue with the following line in the log:

09-10-2017 12:23:16.045 -07:00 - 880 - Attempting IDE connection through pipe d1c8528c29c54462a9371f3ad9678d8e.
09-10-2017 12:23:16.197 -07:00 - 1031 - Deploying app through IDE.

I have read some solutions related to this involved specifying an apk path in the following line:

ConfigureApp.Android.ApkFile ("../path/to/apk")

But I did not have to do that on my previous PC, so I would like to try to figure out what is different (both are using Visual Studio 2015).

Answers

  • AnthonyMehallelAnthonyMehallel USMember ✭✭✭

    Hi @syang10 ,

    can you show the full log /var/folders/sw/XXXX/uitest/log-date.txt$$

    your path to Android SDK is configured ?

    Anthony

  • syang10syang10 USMember ✭✭

    Here is the full log from the PC where it is not working:

    09-10-2017 12:29:40.983 -07:00 - 24 - Potential Android SDK location: (No path) - Not set. [ Source: ANDROID_HOME ]
    09-10-2017 12:29:40.985 -07:00 - 26 - Potential Android SDK location: C:\Program Files (x86)\Android\android-sdk - Valid SDK. [ Source: Registry ]
    09-10-2017 12:29:40.986 -07:00 - 26 - Potential Android SDK location: C:\Program Files (x86)\Android\android-sdk - Valid SDK. [ Source: Registry ]
    09-10-2017 12:29:40.986 -07:00 - 27 - Using Android SDK: C:\Program Files (x86)\Android\android-sdk
    09-10-2017 12:29:40.989 -07:00 - 29 - Using JDK: C:\Program Files (x86)\Java\jdk1.8.0_131 [ Source: Registry ]
    09-10-2017 12:29:41.001 -07:00 - 42 - Attempting IDE connection for Android: C:\workspace\MyApp\MyApp.UITests\bin\Release\MyApp.UITests.DLL.
    09-10-2017 12:29:41.004 -07:00 - 45 - No named pipe value found in environment variable XTC_IDE.
    09-10-2017 12:29:41.004 -07:00 - 46 - Skipped IDE integration, connection failed.
    

    Below is from the working PC:

    09-10-2017 12:23:15.943 -07:00 - 778 - Potential Android SDK location: (No path) - Not set. [ Source: ANDROID_HOME ]
    09-10-2017 12:23:15.973 -07:00 - 807 - Potential Android SDK location: C:\Program Files (x86)\Android\android-sdk - Valid SDK. [ Source: Registry ]
    09-10-2017 12:23:15.974 -07:00 - 809 - Potential Android SDK location: C:\Program Files (x86)\Android\android-sdk - Valid SDK. [ Source: Registry ]
    09-10-2017 12:23:15.975 -07:00 - 810 - Using Android SDK: C:\Program Files (x86)\Android\android-sdk
    09-10-2017 12:23:15.981 -07:00 - 816 - Using JDK: C:\Program Files (x86)\Java\jdk1.8.0_45 [ Source: JAVA_HOME ]
    09-10-2017 12:23:16.038 -07:00 - 873 - Attempting IDE connection for Android: C:\workspace\MyApp\MyApp.UITests\bin\Release\MyApp.UITests.DLL.
    09-10-2017 12:23:16.045 -07:00 - 880 - Attempting IDE connection through pipe d1c8528c29c54462a9371f3ad9678d8e.
    09-10-2017 12:23:16.197 -07:00 - 1031 - Deploying app through IDE.
    

    ...then continues with the test

    I tried setting some of the variables the log was complaining about (ANDROID_HOME and JAVA_HOME) and now I am getting this in the log:

    10-10-2017 09:44:35.941 -07:00 - 51 - Attempting IDE connection through pipe 604c2ffbef9142a68cf041bc719ccaa1.
    10-10-2017 09:44:35.968 -07:00 - 77 - Skipped IDE integration, connection failed.
    

    So now it looks like it found a pipe to use but it still seems to be failing.

    My android sdk is located here:

    C:\Program Files (x86)\Android\android-sdk
    
  • syang10syang10 USMember ✭✭

    As a work around, I ended up just copying my project from my old PC to the new one and that seems to work (previously I had just pulled a copy down from our git repo). I'm still curious as to what the problem was.

  • BradCunninghamBradCunningham USBeta, Developer Group Leader ✭✭

    Any update here. I am have the same issues. Log file shows the same steps and failing to find a named pipe value

  • syang10syang10 USMember ✭✭

    After I 'fixed' my problem, I did notice it happened again and I think all I did was restart Visual Studio but that could have just been a fluke. Try some of the following as I think I made these changes when I was dealing with it, although I'm not sure if any particular one of them helped the issue:

    • Manually uninstall the app from your device
    • Rebuild Solution
    • Move your android-sdk to a path with no spaces or special characters (ex: C:\Temp\android-sdk)
    • Add a JAVA_HOME and ANDROID_HOME environment variable
  • syang10syang10 USMember ✭✭

    Ran into this problem again after VS2015 crashed. I tried the following and it appeared to work again:

    https://stackoverflow.com/questions/9079466/visual-studio-popup-the-operation-could-not-be-completed/9130257#9130257

Sign In or Register to comment.