Appcenter: Xamarin.UITest.XDB.Exceptions.DeviceAgentException : Unable to verify app installation state (Xamarin.UITest package to 3.0.4)

Created on 9 Dec 2019  路  8Comments  路  Source: microsoft/appcenter

With Xamarin.UITest package to 3.0.4 there is an issue running Xamarin.UITests on all iOS devices/Simulators. The following error occurs:

Xamarin.UITest.XDB.Exceptions.DeviceAgentException : Unable to verify app installation state

ExitCode: 134

  Reason: no suitable image found.  Did find:
  Referenced from: /var/folders/g1/1jz4c5yd6bx41bgkjh7vmdw80000gn/T/xdb/DeviceAgent.iOS.Dependencies/0a3ddc92d1ddf25e2059c72229db762c/bin/iOSDeviceManager
    /private/var/folders/g1/1jz4c5yd6bx41bgkjh7vmdw80000gn/T/xdb/DeviceAgent.iOS.Dependencies/0a3ddc92d1ddf25e2059c72229db762c/bin/../Frameworks/FBControlCore.framework/Versions/A/FBControlCore: code signature invalid for '/private/var/folders/g1/1jz4c5yd6bx41bgkjh7vmdw80000gn/T/xdb/DeviceAgent.iOS.Dependencies/0a3ddc92d1ddf25e2059c72229db762c/bin/../Frameworks/FBControlCore.framework/Versions/A/FBControlCore'
    /private/var/folders/g1/1jz4c5yd6bx41bgkjh7vmdw80000gn/T/xdb/DeviceAgent.iOS.Dependencies/0a3ddc92d1ddf25e2059c72229db762c/bin/../Frameworks/FBControlCore.framework/Versions/A/FBControlCore: stat() failed with errno=1
dyld: Library not loaded: @rpath/FBControlCore.framework/Versions/A/FBControlCore

This was talked about here:
https://github.com/microsoft/appcenter/issues/829

The resolution to this issue is to downgrade to Xamarin.UITest package to 3.0.3 to keep running the tests.
Please fix it in the next release, and if more information is requested please feel free to ask.

feature request test

Most helpful comment

@jonstoneman the 3.0.5 update fixes the issue for me, thanks!

All 8 comments

This is a very problematic issue, and downgrading is not a option (3.0.4 fixed many compatibility issues). This is gradually blocking all iOS testing.

UITest 3.0.5 has been released. Could you both test with that and let us know whether you are still experiencing any problems please?

@jonstoneman the 3.0.5 update fixes the issue for me, thanks!

3.0.5 working for me as well. Thank you so much, @jonstoneman!

@jonstoneman
Even after updating to Xamarin.UITest Version 3.0.5, I am still seeing the following when trying to launch Xamarin.UITest from

Visual Studio for Mac 8.3.7 (Build 1)
XCode Version 11.2.1

to

iPhone6s - iOS 13.3

Xamarin.UITest.XDB.Exceptions.DeviceAgentException: Unable to verify app installation state

ExitCode: 134

  Reason: no suitable image found.  Did find:
  Referenced from: /var/folders/sl/x1qg9tt511n7gzx43n2vcb_m0000gn/T/xdb/DeviceAgent.iOS.Dependencies/42d07e9bfef833f40c0ad2b89bf48b10/bin/iOSDeviceManager
    /private/var/folders/sl/x1qg9tt511n7gzx43n2vcb_m0000gn/T/xdb/DeviceAgent.iOS.Dependencies/42d07e9bfef833f40c0ad2b89bf48b10/bin/../Frameworks/FBControlCore.framework/Versions/A/FBControlCore: code signature invalid for '/private/var/folders/sl/x1qg9tt511n7gzx43n2vcb_m0000gn/T/xdb/DeviceAgent.iOS.Dependencies/42d07e9bfef833f40c0ad2b89bf48b10/bin/../Frameworks/FBControlCore.framework/Versions/A/FBControlCore'
    /private/var/folders/sl/x1qg9tt511n7gzx43n2vcb_m0000gn/T/xdb/DeviceAgent.iOS.Dependencies/42d07e9bfef833f40c0ad2b89bf48b10/bin/../Frameworks/FBControlCore.framework/Versions/A/FBControlCore: stat() failed with errno=1
dyld: Library not loaded: @rpath/FBControlCore.framework/Versions/A/FBControlCore

@seangriffin2

Let's collect some more information about iOSDeviceManager and its dependent libraries.

Please verify the version of iOSDeviceManager:

{
  "VERSION" : "3.7.3",
  "GIT_REMOTE_ORIGIN" : "[email protected]:calabash/iOSDeviceManager.git",
  "GIT_BRANCH" : "tag/3.7.3",
  "GIT_SHORT_REVISION" : "47f494b"
}

If you don't see version 3.7.3 then you haven't properly updated to 3.0.5.
$ /var/folders/sl/x1qg9tt511n7gzx43n2vcb_m0000gn/T/xdb/DeviceAgent.iOS.Dependencies/42d07e9bfef833f40c0ad2b89bf48b10/bin/iOSDeviceManager version -j

Check the code signing information for the FBControlCore framework:

$ codesign --display --verbose=4
/private/var/folders/sl/x1qg9tt511n7gzx43n2vcb_m0000gn/T/xdb/DeviceAgent.iOS.Dependencies/42d07e9bfef833f40c0ad2b89bf48b10/bin/../Frameworks/FBControlCore.framework/Versions/A/FBControlCore

Check the certificate status:

# This should print "rejected" (this is the expected and correct output)
# You should not see CSSMERR_TP_CERT_REVOKED
$ spctl --assess --type execute /private/var/folders/sl/x1qg9tt511n7gzx43n2vcb_m0000gn/T/xdb/DeviceAgent.iOS.Dependencies/42d07e9bfef833f40c0ad2b89bf48b10/bin/../Frameworks/FBControlCore.framework/Versions/A/FBControlCore

Watch the iOSDeviceManager logs here for more information about the failure:

$ tail -F ~/.calabash/iOSDeviceManager/logs/current.log

@jmoody @jonstoneman - Thank you so much for the quick response! I was able to get iOS UI Test launch working again.

While troubleshooting this morning, I tried completely removing the Xamarin.UITest 3.0.5 Nuget Package (in Visual Studio for Mac) from my UI Test Project and then adding it again. After that, test launch started working again on iOS.

I'm not sure what was going on, but it definitely seems to suggest that Visual Studio is having some issues with Nuget Packages. Before posting my previous comment regarding Xamarin.UITest.XDB.Exceptions.DeviceAgentException: Unable to verify app installation state, I looked in my packages folder and verified it showed the Xamarin.UITest 3.0.5 Nuget Package

Thank you again for the help!

@jonstoneman 3.0.5 appears to be working as intended and that is with the new VS for mac and Xcode updates. Thank you for all the help!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mason-hz picture mason-hz  路  3Comments

Oddj0b picture Oddj0b  路  3Comments

chriskellor picture chriskellor  路  3Comments

busterlaursen picture busterlaursen  路  4Comments

patrickdoodyIRL picture patrickdoodyIRL  路  3Comments