Failed to install DeviceAgent iOS 11.0 Simulator

I was able to reproduce this error using the sample project CreditCardValidator. I updated the TestCloud.Agent and the UITest package and set the app to build for both x86_64 and i386.

SetUp : Xamarin.UITest.XDB.Exceptions.DeviceAgentException : Failed to install DeviceAgent

ExitCode: 1

    -c,--codesign-identity  <codesign-identifier> [OPTIONAL]    Identity used to codesign app bundle [device only]. Deprecated - should use profile path.   DEFAULT=
    -d,--device-id  <device-identifier> iOS Simulator GUID or 40-digit physical device ID
    -i,--resources-path <resources-path> [OPTIONAL]     Path to resources (executables) to inject into app directory. A list of colon separated files may be specified.
    -p,--profile-path   <profile-path> [OPTIONAL]   Path to provisioning profile
    -u,--update-app <should-update-app> [OPTIONAL]  When true, will reinstall the app if the device contains an older version than the bundle specified DEFAULT=1
install <app-path>

Error installing application: Error Domain=com.facebook.FBSimulatorControl Code=0 "Simulator does not support any of the architectures ([x86_64, i386]) of the executable at /var/folders/cc/w99g7tzs2pz7sc_d44ks6kpc0000gp/T/xdb/DeviceAgent.iOS.Dependencies/ef04601147daac30ef0dccc3027a2bd4/app/DeviceAgent-Runner.app/DeviceAgent-Runner. Simulator Archs ([(null)])" UserInfo={NSLocalizedDescription=Simulator does not support any of the architectures ([x86_64, i386]) of the executable at /var/folders/cc/w99g7tzs2pz7sc_d44ks6kpc0000gp/T/xdb/DeviceAgent.iOS.Dependencies/ef04601147daac30ef0dccc3027a2bd4/app/DeviceAgent-Runner.app/DeviceAgent-Runner. Simulator Archs ([(null)])}

Versions:

Visual Studio Community 2017 for Mac Version 7.2 (build 636)
Xcode 9.0.1 (13249) Build 9A1004
Xamarin.iOS Version: 11.2.0.11
Mac OS X 10.12.6
Xamarin.TestCloud.Agent Version 0.21.1
Xamarin.UITest Version 2.1.4
NUnit Version 2.6.4

Best Answer

Answers

  • MichaelVentusMichaelVentus AUMember
    edited October 2017

    I get the same thing, but only for iPhone 8 and iPhone X simulators.

    iOS11 for iPhone 7 and below seem to work okayish (I have other random issues). ->
    SetUp : System.Exception : Unable to determine simulator version for XXXX simulator.

    Even though it seems to find the same simulator for other tests.

    I'm running:

    VS - 7.3
    Xamarin.iOS - 11.4.0.93
    Xamarin.UITest - 2.1.4
    MacOS - 10.12.6
    Xcode - 9.0.1

  • KohCheanSiongKohCheanSiong USMember ✭✭

    Same for me too, I make the testing in iOS 10.0.3 as a temporary solutions and waiting for an updates/fixes.

  • MariaAlexandrovaMariaAlexandrova USMember ✭✭

    Same error for me. Workaround with using iPhone 7 simulator helped.

  • @MichaelVentus said:
    I get the same thing, but only for iPhone 8 and iPhone X simulators.

    iOS11 for iPhone 7 and below seem to work okayish (I have other random issues). ->
    SetUp : System.Exception : Unable to determine simulator version for XXXX simulator.

    Even though it seems to find the same simulator for other tests.

    I'm running:

    VS - 7.3
    Xamarin.iOS - 11.4.0.93
    Xamarin.UITest - 2.1.4
    MacOS - 10.12.6
    Xcode - 9.0.1

    Same error for me too, works as stated above. Just updated Xamarin to Release: 15.4.2 with the same results.

  • JoshuaLogueJoshuaLogue USUniversity

    I'm seeing a similar issue in both simulator and on a device.
    I'm running:
    Xcode 9.1
    VS 7.2.2
    Xamarin.iOS 11.3.0.47
    Xamarin.UITest 2.2.0

    Here's the error I get:

    SetUp : Xamarin.UITest.XDB.Exceptions.DeviceAgentException : Failed to install DeviceAgent

    ExitCode: 8

        -c,--codesign-identity  <codesign-identifier> [OPTIONAL]    Identity used to codesign app bundle [device only]. Deprecated - should use profile path.   DEFAULT=
        -d,--device-id  <device-identifier> iOS Simulator GUID or 40-digit physical device ID
        -i,--resources-path <resources-path> [OPTIONAL]     Path to resources (executables) to inject into app directory. A list of colon separated files may be specified.
        -p,--profile-path   <profile-path> [OPTIONAL]   Path to provisioning profile
        -u,--update-app <should-update-app> [OPTIONAL]  When true, will reinstall the app if the device contains an older version than the bundle specified DEFAULT=1
    install <app-path>
    

    Error getting device with ID 50b47b5a68908652b35bc8877a0a3443ef42e12f: Error Domain=com.facebook.FBControlCore Code=0 "Failed to load device console entries" UserInfo={NSLocalizedDescription=Failed to load device console entries}

  • Nomad461Nomad461 USMember ✭✭

    Thanks @Kent.Green, it looks like things are back to normal with XCode 9.1 and iOS 11.x

  • VictorChelaruVictorChelaru USMember ✭✭
    edited April 16

    Unfortunately I still get this issue on Xamarin.UITest 2.2.3 so maybe there are other issues aside from the "primary known cause" in play.

    Update: I was able to solve the problem as follows:

    1. Make sure that Xamarin.UITest is the same version on all linked libraries (I have a main iOS project and a linked iOS project)
    2. If required, update the libraries (I updated to 2.2.4)
    3. Clean/Rebuild project
    4. Run project to make sure it actually runs on device/simulator before attempting to run tests.
    5. Once it runs, then try running tests.
  • MykhailGalushkoMykhailGalushko UAUniversity
    edited April 17

    When running Xamarin.UI tests locally on Macos machine with simulator (iPhone X iOS 11.3) getting "Failed to install DeviceAgent" and having next output:

    Full log file: /var/folders/_4/g83h2w4975bfsv5t19_qwf5h0000gn/T/uitest/log-2018-04-17_14-29-22-619.txt

    iOS test running Xamarin.UITest version: 2.2.4

    Skipping IDE integration as important properties are configured. To force IDE integration, add .PreferIdeSettings() to ConfigureApp.

    Skipping local screenshots. Can be enabled with EnableScreenshots() when configuring app.

    Sim check: App not installed.

    1 - LaunchTestAsync: deviceId: 9108E538-E44E-4D6D-9AA8-BB9A2CCCDDC1

    1 - Launching simulator if not already running

    7 - Launching simulator if not already running

    7 - InstallApp: pathToBundle: /Users/{user}/Projects/UITest/iOS/bin/iPhoneSimulator/Debug/device-builds/iphone7.2-10.1/UITest.iOS.app deviceId: 9108E538-E44E-4D6D-9AA8-BB9A2CCCDDC1

    8 - HTTP request failed, retry limit hit Exception: System.Net.Http.HttpRequestException: An error occurred while sending the request ---> System.Net.WebException: Error: ConnectFailure (Connection refused) ---> System.Net.Sockets.SocketException: Connection refused at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP) [0x000b0] in /Users/builder/data/lanes/5533/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/System/System.Net.Sockets/Socket.cs:879 at System.Net.WebConnection.Connect (System.Net.HttpWebRequest request) [0x0016d] in /Users/builder/data/lanes/5533/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/System/System.Net/WebConnection.cs:187 --- End of inner exception stack trace --- at System.Net.HttpWebRequest.EndGetRequestStream (System.IAsyncResult asyncResult) [0x0003c] in /Users/builder/data/lanes/5533/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/System/System.Net/HttpWebRequest.cs:904 at System.Threading.Tasks.TaskFactory1[TResult].FromAsyncCoreLogic (System.IAsyncResult iar, System.Func2[T,TResult] endFunction, System.Action1[T] endAction, System.Threading.Tasks.Task1[TResult] promise, System.Boolean requiresSynchronization) [0x0000f] in /Users/builder/data/lanes/5533/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/threading/Tasks/FutureFactory.cs:550 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/5533/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:152 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Users/builder/data/lanes/5533/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /Users/builder/data/lanes/5533/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /Users/builder/data/lanes/5533/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in /Users/builder/data/lanes/5533/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:535 at System.Net.Http.HttpClientHandler+d__64.MoveNext () [0x0029d] in /Users/builder/data/lanes/5533/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/System.Net.Http/System.Net.Http/HttpClientHandler.cs:392

    Packages that are used:

    Xamarin.TestCloud.Agent
    0.21.5 Xamarin.UITest
    2.2.4 NUnit 2.6.3
    Tested on clean new Xamarin.Forms project. Already tried to remove xdb folder - didn't help. Anybody has experience how to solve this?

Sign In or Register to comment.