Cannot install app to test on real device - XCUITest

macOS Sierra version 10.12(16A323)
Appium v1.6.3
Xcode Version 8.0

I could automate and run script on simulator.
It worked fine on real device when the app was installed manually.
But it gives following error messages when I try to execute tests without install app manually.

1. [BaseDriver] The following capabilities were provided, but are not recognized by appium: appium-version, xcodeConfigfile, xcodeOrgId, xcodeSigningId

2. [MJSONWP] Encountered internal error running command: Error: Could not install app Command ā€˜ios-deploy --id fe063b2d1eff6064975f9ff7c90a2f590c98198c --uninstall --bundle ā€˜/Users/admin/Library/Developer/Xcode/DerivedData/ā€¦/xxx.appā€™ā€™ exited with code 253

3. [XCUITest] Error checking install status: Command ā€˜ios-deploy --exists --id fe063b2d1eff6064975f9ff7c90a2f590c98198c --bundle_id com.axis.drawingdesklitetest1234ā€™ exited with code 255

4. [debug] [MJSONWP] Bad parameters: BadParametersError: Parameters were incorrect. We wanted {ā€œrequiredā€:[ā€œdesiredCapabilitiesā€],ā€œoptionalā€:[ā€œrequiredCapabilitiesā€,ā€œcapabilitiesā€,ā€œsessionIdā€,ā€œidā€,ā€œsessionIdā€,ā€œidā€,ā€œsessionIdā€,ā€œidā€]} and you sent [ā€œcapabilitiesā€]

The script is as followsā€¦

When run this Eclipse says,

org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session. desired capabilities = Capabilities [{app=/Users/admin/Library/Developer/Xcode/DerivedData/xxx-dddbkdvfflvbqrfmgkqvjklwhheo/Build/Products/Debug-iphonesimulator/xxx.app, appium-version=1.0, xcodeConfigfile=/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Config.xcconfig, xcodeOrgId=69PLJFK56W, platformVersion=10.0, bundleId=com.xxx1234, automationName=XCUITest, platformName=iOS, udid=fe063b2d1eff6064975f9ff7c90a2f590c98198c, deviceName=xxxiPad Air, platform=iOS, xcodeSigningId=iPhone Developer}], required capabilities = Capabilities [{}]

Is it associated with capabilities in script?

Any comments are highly appreciated :confused:

I have the same issue(

:disappointed:

Did you try with ios-deploy?

I think some thing is wrong with it.
But I cannot fix it.

Just try to install app with ios-deploy with this command

  • ios-deploy --debug --id 9d1201e667ef158492298d50cbb17248bd5002ce --bundle ā€œapp nameā€

In console I have:
[100%] Installed package ā€œapp nameā€

Starting debug of iPhone 6s Plus ā€˜iPhone (Appstore)ā€™ (9d1201e667ef158492298d50cbb17248bd5002ce) connected through USBā€¦
[ 0%] Looking up developer disk image
[ 95%] Developer disk image mounted successfully
2017-01-26 11:48:38.269 ios-deploy[3143:60435] [ !! ] Cannot read Info.plist file: file:///Users/vadimzdanovich/Downloads/ā€˜app nameā€™/Info.plist

I have this message - ā€˜Cannot read Info.plist fileā€™.
I know that the Info.plist file , it`s a file which contains settings of the project.
Do you have the same while building with ios-deploy?

:confused: Yepā€¦
Iā€™m also there and waiting for a solutionā€¦

I posted this separately as well.
But restarting did not help it.

Are you ok with installing app manually and execute test?

Do you mean to install manual app then execute test by bundle id and run tests?

Yep
I install my app manually. > launch appium server > run script

I did not try it(
Maybe later will try.
Do you try it?

@Sandarekha
To restart machine didn`t help me(:disappointed:

Install app manually worked for me.
But I want to execute the test script and install app with test execution.

I want it too:grinning:

Update the ideviceinstaller : brew upgrade ideivceinstaller --HEAD
Install ios-deploy : brew install ios-deploy

@wreed can you please have a lookā€¦

not workedā€¦
Iā€™m using .app for installation.
Should it be .ipa ? Can it be the reason for this error?

In the second screenshot you seem to have ā€˜xcodeConfigFileā€™ commented out and replaced with ā€˜xcodeConfigfileā€™. I think the former is correct:

http://appium.readthedocs.io/en/stable/en/writing-running-appium/caps/

Can you change the capitalization and see if that helps?

1 Like

Yes, you are right. We specify .ipa in case of real device.

1 Like