Can not run automation script on real iPhone device (iOS13)

Hi,

I updated Xcode to 11 from 10.3, appium to 1.15.0 from 1.14.2, real device iPhone X iOS to 13.1.1 from 12.3.1 and appium-xcuitest-driver (3.0.0) after that setup manual the WebDriverAgent(2.0.0) from new location.(/Users/username/node_modules/appium/node_modules/appium-webdriveragent).

The problem that I have is Xcode does not install WebdriverAgentRunner on the device although the build is successful in Xcode and when I want to run the tests I receive the error:
[debug] [W3C] 2019-09-28 01:35:01.922 xcodebuild[9444:68373] Error Domain=NSCocoaErrorDomain Code=260 “The file “WebDriverAgentRunner-Runner.app” couldn’t be opened because there is no such file.” UserInfo={NSFilePath=/Users/cristianmuresan/Library/Developer/Xcode/DerivedData/WebDriverAgent-ciegwgvxzxdrqthilmrmczmqvrgu/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app, NSUnderlyingError=0x7fe03d69af50 {Error Domain=NSPOSIXErrorDomain Code=2 “No such file or directory”}}
[debug] [W3C] Testing failed:
[debug] [W3C] Signing for “WebDriverAgentRunner” requires a development team. Select a development team in the Signing & Capabilities editor.
[debug] [W3C] WebDriverAgentRunner-Runner.app encountered an error (Failed to install or launch the test runner. (Underlying error: The file “WebDriverAgentRunner-Runner.app” couldn’t be opened because there is no such file. The file doesn’t exist. (Underlying error: The operation couldn’t be completed. No such file or directory)))
[debug] [W3C] ** TEST EXECUTE FAILED **
[debug] [W3C] Testing started on ‘iPhone X’. Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.

In the previous configuration versions everything was perfect.
Can anyone help me with some tips about the issue?

1 Like

Hello Cristian
I have faced the same issue
So after doing same setup you did i tried to run
xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=myudid' clean build test

It was successful and installed the WebDriverAgentRunner to my phone
Then i opened this app - it gave ‘Untrusted app’ error so i accepted all apps from this developer in General -> Device Management -> - Trust

After it was done - i run tests and it worked

Also please note that you need to use the following for it to work in Appium:
Step 1 - npm uninstall -g appium && npm install -g appium@rc
Step 2 - Open appium-desktop and Modify Port to 4724
Step 3 - Open the terminal and type “appium” without the quotes. The appium through the terminal will be started. You will now be able to use the terminal appium from the appium-desktop.
Step 4 - In appium-desktop you should click on Start Server V1.13.0

Same issue for me. It was all working until 1.14.2 and I moved to 1.15 and Xcode 11. I never saw this kind of issues.

  1. I can make build succeed from XCODE (I did signed in with team id and changed identifier to unique name and it installed apps on my mobile with out issues)

  2. But when I run from terminal I am seeing this,
    Machine:appium-webdriveragent sk$ xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=87f002306a43d222f7ee7e248617493d80a74ee7 clean build test

    2019-11-21 11:17:51.450 xcodebuild[34589:2846364] DTDeviceKit: deviceType from 87f00230dsadasd7ee7e248617493d80a74ee7 was NULL

    2019-11-21 11:17:51.538 xcodebuild[34589:2846368] DTDeviceKit: deviceType from 87f00230dsadasd7ee7e248617493d80a74ee7 was NULL

    note: Using new build system

    **** CLEAN SUCCEEDED ****

    note: Using new build system

    note: Planning build

    note: Constructing build description

    error: No profiles for ‘com.facebook.magic.WebDriverAgentRunner.xctrunner’ were found: Xcode couldn’t find any iOS App Development provisioning profiles matching ‘com.facebook.magic.WebDriverAgentRunner.xctrunner’. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild. (in target ‘WebDriverAgentRunner’ from project ‘WebDriverAgent’)

    **** BUILD FAILED ****

    note: Using new build system

    note: Planning build

    note: Constructing build description

    error: No profiles for ‘com.facebook.magic.WebDriverAgentRunner.xctrunner’ were found: Xcode couldn’t find any iOS App Development provisioning profiles matching ‘com.facebook.magic.WebDriverAgentRunner.xctrunner’. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild. (in target ‘WebDriverAgentRunner’ from project ‘WebDriverAgent’)

    Test session results, code coverage, and logs:

    /Users/shiva-kumar/Library/Developer/Xcode/DerivedData/WebDriverAgent-ciegwgvxzxdrqthilmrmczmqvrgu/Logs/Test/Run-WebDriverAgentRunner-2019.11.21_11-17-53-+0000.xcresult

    Testing failed:

    No profiles for ‘com.facebook.magic.WebDriverAgentRunner.xctrunner’ were found: Xcode couldn’t find any iOS App Development provisioning profiles matching ‘com.facebook.magic.WebDriverAgentRunner.xctrunner’. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild.

    Testing cancelled because the build failed.

    **** TEST FAILED ****

Could you please let me know how to fix this or how to enable automatic signing, pass -allowProvisioningUpdates to xcodebuild ??

Thanks
SK

I was able to get it working in similar fashion albeit without installing above.

I also had to do similar for Desktop Client to work.

Really these should work OOB