IOS-deploy Error creating IOS xcuitedt driver on real device

Few prerequisites:

  1. When app is allready installed on the device I succeed to create the driver
  2. When app is not installed I get the following error

debug] [XCUITest] Error checking install status: Command ‘ios-deploy --exists --id dc397fd3ff3c9a0aa10bf306d8f67b0c482bea07 --bundle_id com.life-beam.Vi-Dev’ exited with code 255
[debug] [XCUITest] App is not installed. Will try to install.
[debug] [XCUITest] Error : Command ‘ios-deploy --id dc397fd3ff3c9a0aa10bf306d8f67b0c482bea07 --uninstall --bundle /Users/asihizkiahu/Library/Developer/Xcode/DerivedData/Vi-chglmmqrkfgvuoflipawibkmabgs/Build/Products/Debug-iphonesimulator/Vi-Dev.app’ exited with code 253

[debug] [XCUITest] Running ios real device reset flow
[debug] [XCUITest] Resetting simulator
[debug] [iOSLog] Stopping iOS log capture[XCUITest] Error: could not install app Command ‘ios-deploy --id dc397fd3ff3c9a0aa10bf306d8f67b0c482bea07 --uninstall --bundle /Users/asihizkiahu/Library/Developer/Xcode/DerivedData/Vi-chglmmqrkfgvuoflipawibkmabgs/Build/Products/Debug-iphonesimulator/Vi-Dev.app’ exited with code 253
at IOSDeploy.install$ (lib/ios-deploy.js:37:13)
at tryCatch (/Users/asihizkiahu/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Users/asihizkiahu/node_modules/babel-runtime/regenerator/runtime.js:315:22)

  1. My ios-deploy exists…

asis-Mac-mini:~ asihizkiahu$ which ios-deploy
/usr/local/bin/ios-deploy

  1. my capabilities are

platformName=ios
platformVersion=9.3
#platformVersion=10.0
deviceName=iPhone 6s Plus
#deviceName=iPhone 6s
#sendKeyStrategy=grouped
waitForAppScript=true
newCommandTimeout=6000
app=/Users/asihizkiahu/Library/Developer/Xcode/DerivedData/Vi-chglmmqrkfgvuoflipawibkmabgs/Build/Products/Debug-iphonesimulator/Vi-Dev.app
automationName=XCUITest
udid=dc397fd3ff3c9a0aa10bf306d8f67b0c482bea07
bundleId=com.life-beam.Vi-Dev
realDeviceLogger=/usr/local/lib/node_modules/deviceconsole/deviceconsole

  1. My Full log is:

/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/bin/java -ea -Didea.launcher.port=7534 “-Didea.launcher.bin.path=/Applications/IntelliJ IDEA CE.app/Contents/bin” -Didea.junit.sm_runner -Dfile.encoding=UTF-8 -classpath “/Applications/IntelliJ IDEA CE.app/Contents/lib/idea_rt.jar:/Applications/IntelliJ IDEA CE.app/Contents/plugins/junit/lib/junit-rt.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/lib/htmlconverter.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/lib/javaws.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/lib/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/lib/management-agent.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/lib/plugin.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/lib/ant-javafx.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/lib/javafx-doclet.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/lib/javafx-mx.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/lib/tools.jar:/Users/asihizkiahu/Documents/automation/mobile/iossanity/test/target/test-classes:/Users/asihizkiahu/Documents/automation/mobile/iossanity/test/target/classes:/Users/asihizkiahu/.m2/repository/com/lifebeam/automation/AutomationCommon/1.0/AutomationCommon-1.0.jar:/Users/asihizkiahu/Documents/automation/mobile/iossanity/infra/target/classes:/Users/asihizkiahu/.m2/repository/junit/junit/4.11/junit-4.11.jar:/Users/asihizkiahu/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar:/Users/asihizkiahu/.m2/repository/log4j/log4j/1.2.17/log4j-1.2.17.jar:/Users/asihizkiahu/.m2/repository/org/seleniumhq/selenium/selenium-java/2.53.0/selenium-java-2.53.0.jar:/Users/asihizkiahu/.m2/repository/org/seleniumhq/selenium/selenium-chrome-driver/2.53.0/selenium-chrome-driver-2.53.0.jar:/Users/asihizkiahu/.m2/repository/org/seleniumhq/selenium/selenium-remote-driver/2.53.0/selenium-remote-driver-2.53.0.jar:/Users/asihizkiahu/.m2/repository/org/seleniumhq/selenium/selenium-api/2.53.0/selenium-api-2.53.0.jar:/Users/asihizkiahu/.m2/repository/org/seleniumhq/selenium/selenium-edge-driver/2.53.0/selenium-edge-driver-2.53.0.jar:/Users/asihizkiahu/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar:/Users/asihizkiahu/.m2/repository/org/apache/commons/commons-exec/1.3/commons-exec-1.3.jar:/Users/asihizkiahu/.m2/repository/org/seleniumhq/selenium/selenium-firefox-driver/2.53.0/selenium-firefox-driver-2.53.0.jar:/Users/asihizkiahu/.m2/repository/org/seleniumhq/selenium/selenium-ie-driver/2.53.0/selenium-ie-driver-2.53.0.jar:/Users/asihizkiahu/.m2/repository/net/java/dev/jna/jna/4.1.0/jna-4.1.0.jar:/Users/asihizkiahu/.m2/repository/net/java/dev/jna/jna-platform/4.1.0/jna-platform-4.1.0.jar:/Users/asihizkiahu/.m2/repository/org/seleniumhq/selenium/selenium-safari-driver/2.53.0/selenium-safari-driver-2.53.0.jar:/Users/asihizkiahu/.m2/repository/io/netty/netty/3.5.7.Final/netty-3.5.7.Final.jar:/Users/asihizkiahu/.m2/repository/org/seleniumhq/selenium/selenium-support/2.53.0/selenium-support-2.53.0.jar:/Users/asihizkiahu/.m2/repository/org/seleniumhq/selenium/selenium-leg-rc/2.53.0/selenium-leg-rc-2.53.0.jar:/Users/asihizkiahu/.m2/repository/io/appium/java-client/4.1.2/java-client-4.1.2.jar:/Users/asihizkiahu/.m2/repository/com/google/code/gson/gson/2.7/gson-2.7.jar:/Users/asihizkiahu/.m2/repository/org/apache/httpcomponents/httpclient/4.5.2/httpclient-4.5.2.jar:/Users/asihizkiahu/.m2/repository/org/apache/httpcomponents/httpcore/4.4.4/httpcore-4.4.4.jar:/Users/asihizkiahu/.m2/repository/commons-logging/commons-logging/1.2/commons-logging-1.2.jar:/Users/asihizkiahu/.m2/repository/commons-codec/commons-codec/1.9/commons-codec-1.9.jar:/Users/asihizkiahu/.m2/repository/com/google/guava/guava/19.0/guava-19.0.jar:/Users/asihizkiahu/.m2/repository/commons-validator/commons-validator/1.5.1/commons-validator-1.5.1.jar:/Users/asihizkiahu/.m2/repository/commons-beanutils/commons-beanutils/1.9.2/commons-beanutils-1.9.2.jar:/Users/asihizkiahu/.m2/repository/commons-digester/commons-digester/1.8.1/commons-digester-1.8.1.jar:/Users/asihizkiahu/.m2/repository/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2.jar:/Users/asihizkiahu/.m2/repository/org/apache/commons/commons-lang3/3.4/commons-lang3-3.4.jar:/Users/asihizkiahu/.m2/repository/cglib/cglib-nodep/3.2.4/cglib-nodep-3.2.4.jar:/Users/asihizkiahu/.m2/repository/org/springframework/spring-context/4.3.2.RELEASE/spring-context-4.3.2.RELEASE.jar:/Users/asihizkiahu/.m2/repository/org/springframework/spring-aop/4.3.2.RELEASE/spring-aop-4.3.2.RELEASE.jar:/Users/asihizkiahu/.m2/repository/org/springframework/spring-beans/4.3.2.RELEASE/spring-beans-4.3.2.RELEASE.jar:/Users/asihizkiahu/.m2/repository/org/springframework/spring-core/4.3.2.RELEASE/spring-core-4.3.2.RELEASE.jar:/Users/asihizkiahu/.m2/repository/org/springframework/spring-expression/4.3.2.RELEASE/spring-expression-4.3.2.RELEASE.jar:/Users/asihizkiahu/.m2/repository/org/aspectj/aspectjweaver/1.8.9/aspectjweaver-1.8.9.jar” com.intellij.rt.execution.application.AppMain com.intellij.rt.execution.junit.JUnitStarter -ideVersion5 appium.messaging.LifeBeamTest,pocSanity
Property file /environment/env.properties parsed successfully
[node, /Users/asihizkiahu/node_modules/appium/build/lib/main.js, --address, 127.0.0.1, --port, 4723]
(node:24851) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
[Appium] Welcome to Appium v1.6.0-beta1
[Appium] Non-default server args:
[Appium] address: ‘127.0.0.1’
[Appium] Appium REST http interface listener started on 127.0.0.1:4723
Appium server started.
Trying to set IOS driver
Property file src/test/resources/life_beam_test/capabilities.properties parsed successfully
log4j:WARN No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
[HTTP] --> POST /wd/hub/session {“desiredCapabilities”:{“waitForAppScript”:“true”,“automationName”:“XCUITest”,“newCommandTimeout”:“6000”,“app”:"/Users/asihizkiahu/Library/Developer/Xcode/DerivedData/Vi-chglmmqrkfgvuoflipawibkmabgs/Build/Products/Debug-iphonesimulator/Vi-Dev.app",“platformVersion”:“9.3”,“platformName”:“iOS”,“deviceName”:“iPhone 6s Plus”,“realDeviceLogger”:"/usr/local/lib/node_modules/deviceconsole/deviceconsole",“bundleId”:“com.life-beam.Vi-Dev”,“udid”:“dc397fd3ff3c9a0aa10bf306d8f67b0c482bea07”}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{“waitForAppScript”:“true”…
[Appium] Creating new XCUITestDriver session
[Appium] Capabilities:
[Appium] waitForAppScript: ‘true’
[Appium] automationName: ‘XCUITest’
[Appium] newCommandTimeout: ‘6000’
[Appium] app: ‘/Users/asihizkiahu/Library/Developer/Xcode/DerivedData/Vi-chglmmqrkfgvuoflipawibkmabgs/Build/Products/Debug-iphonesimulator/Vi-Dev.app’
[Appium] platformVersion: ‘9.3’
[Appium] platformName: ‘iOS’
[Appium] deviceName: ‘iPhone 6s Plus’
[Appium] realDeviceLogger: ‘/usr/local/lib/node_modules/deviceconsole/deviceconsole’
[Appium] bundleId: ‘com.life-beam.Vi-Dev’
[Appium] udid: ‘dc397fd3ff3c9a0aa10bf306d8f67b0c482bea07’
[debug] [XCUITest] XCUITestDriver version: 2.0.24
[BaseDriver] Capability ‘newCommandTimeout’ changed from string (‘6000’) to integer (6000). This may cause unexpected behavior
[BaseDriver] Session created with session id: 8089b97f-3bf6-443b-aa72-315790e26244
[debug] [XCUITest] Xcode version set to ‘8.0’
[debug] [XCUITest] iOS SDK Version set to ‘10.0’
[debug] [XCUITest] Available devices: dc397fd3ff3c9a0aa10bf306d8f67b0c482bea07
[debug] [XCUITest] Creating iDevice object with udid dc397fd3ff3c9a0aa10bf306d8f67b0c482bea07
[XCUITest] Determining device to run tests on: udid: ‘dc397fd3ff3c9a0aa10bf306d8f67b0c482bea07’, real device: true
[BaseDriver] Using local app ‘/Users/asihizkiahu/Library/Developer/Xcode/DerivedData/Vi-chglmmqrkfgvuoflipawibkmabgs/Build/Products/Debug-iphonesimulator/Vi-Dev.app’
[debug] [XCUITest] Checking whether app is actually present
[debug] [iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog
[debug] [iOSLog] Found idevicesyslog: ‘/usr/local/bin/idevicesyslog’
[XCUITest] Setting up real device
[debug] [XCUITest] Error checking install status: Command ‘ios-deploy --exists --id dc397fd3ff3c9a0aa10bf306d8f67b0c482bea07 --bundle_id com.life-beam.Vi-Dev’ exited with code 255
[debug] [XCUITest] App is not installed. Will try to install.
[debug] [XCUITest] Error : Command ‘ios-deploy --id dc397fd3ff3c9a0aa10bf306d8f67b0c482bea07 --uninstall --bundle /Users/asihizkiahu/Library/Developer/Xcode/DerivedData/Vi-chglmmqrkfgvuoflipawibkmabgs/Build/Products/Debug-iphonesimulator/Vi-Dev.app’ exited with code 253

[debug] [XCUITest] Running ios real device reset flow
[debug] [XCUITest] Resetting simulator
[debug] [iOSLog] Stopping iOS log capture[XCUITest] Error: could not install app Command ‘ios-deploy --id dc397fd3ff3c9a0aa10bf306d8f67b0c482bea07 --uninstall --bundle /Users/asihizkiahu/Library/Developer/Xcode/DerivedData/Vi-chglmmqrkfgvuoflipawibkmabgs/Build/Products/Debug-iphonesimulator/Vi-Dev.app’ exited with code 253
at IOSDeploy.install$ (lib/ios-deploy.js:37:13)
at tryCatch (/Users/asihizkiahu/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Users/asihizkiahu/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/Users/asihizkiahu/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Users/asihizkiahu/node_modules/babel-runtime/regenerator/runtime.js:136:37)
Error: could not install app Command ‘ios-deploy --id dc397fd3ff3c9a0aa10bf306d8f67b0c482bea07 --uninstall --bundle /Users/asihizkiahu/Library/Developer/Xcode/DerivedData/Vi-chglmmqrkfgvuoflipawibkmabgs/Build/Products/Debug-iphonesimulator/Vi-Dev.app’ exited with code 253
at IOSDeploy.install$ (lib/ios-deploy.js:37:13)
at tryCatch (/Users/asihizkiahu/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Users/asihizkiahu/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/Users/asihizkiahu/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Users/asihizkiahu/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[MJSONWP] Encountered internal error running command: Error: could not install app Command ‘ios-deploy --id dc397fd3ff3c9a0aa10bf306d8f67b0c482bea07 --uninstall --bundle /Users/asihizkiahu/Library/Developer/Xcode/DerivedData/Vi-chglmmqrkfgvuoflipawibkmabgs/Build/Products/Debug-iphonesimulator/Vi-Dev.app’ exited with code 253
at IOSDeploy.install$ (lib/ios-deploy.js:37:13)
at tryCatch (/Users/asihizkiahu/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Users/asihizkiahu/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/Users/asihizkiahu/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Users/asihizkiahu/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[HTTP] <-- POST /wd/hub/session 500 20302 ms - 402
org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: could not install app Command ‘ios-deploy --id dc397fd3ff3c9a0aa10bf306d8f67b0c482bea07 --uninstall --bundle /Users/asihizkiahu/Library/Developer/Xcode/DerivedData/Vi-chglmmqrkfgvuoflipawibkmabgs/Build/Products/Debug-iphonesimulator/Vi-Dev.app’ exited with code 253 (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 20.64 seconds
Build info: version: ‘2.53.0’, revision: ‘35ae25b1534ae328c771e0856c93e187490ca824’, time: ‘2016-03-15 10:43:46’
System info: host: ‘Asis-Mac-mini.local’, ip: ‘192.168.1.194’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.11.6’, java.version: ‘1.7.0_79’
Driver info: io.appium.java_client.ios.IOSDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:40)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.ios.IOSDriver.execute(IOSDriver.java:1)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:249)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:131)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:144)
at io.appium.java_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:36)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:114)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:132)
at io.appium.java_client.ios.IOSDriver.(IOSDriver.java:82)
at com.ui.service.drivers.Drivers$Appium.createIOSDriver(Drivers.java:471)
at com.ui.service.drivers.Drivers$Appium.setDriver(Drivers.java:421)
at com.ui.service.drivers.Drivers.setDriver(Drivers.java:60)
at com.test.BaseTest$StaticRouter.before(BaseTest.java:80)
at appium.messaging.LifeBeamTest.setUp(LifeBeamTest.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:117)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:262)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:84)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)

============================================================================
New Test Class Started

Test Class Name : appium.messaging.LifeBeamTest

Theses are the tests included :

1.pocSanity

Performs agent - visitor chat sanity

Property file /Users/asihizkiahu/Documents/automation/AutomationCommon/automation-common/src/main/resources/environment/env.properties parsed successfully
Property file /Users/asihizkiahu/Documents/automation/AutomationCommon/automation-common/src/main/resources/environment/env.properties parsed successfully
All files deleted from /Users/asihizkiahu/Dropbox/Trainer Logs/
Parsing Jaxb objects of type com.log.xml_data.data.user_configuration.UserConfiguration
Parsing Jaxb objects completed com.log.xml_data.data.user_configuration.UserConfiguration


New Test Started

Test Class Name : appium.messaging.LifeBeamTest
Test Name : pocSanity

Theses are the test flow :

  1. Open app
  2. Register new user
  3. Inject settings from xml files
  4. Choose test type
  5. Perform test from file
  6. Load CSV file
  7. Start test
  8. Wait pre determined time
  9. Stop test
  10. Export trainer log to Dropbox
  11. Parse Trainer log
  12. Get trainer log expected data from XML
  13. For each actual cell, verify all actual events appear in the expected column
  14. For each actual cell, verify all actual events appear in the expected column in the right location
  15. Close app
  16. close app
  17. Uninstall app

Test on driver finished succssesfully
Appium server stopped.

java.lang.NullPointerException
at com.ui.service.UIService.findElement(UIService.java:68)
at com.ui.service.AppiumService.findElement(AppiumService.java:67)
at com.pages.messaging.appium.HomePage$Activate.chooseFlow(HomePage.java:34)
at com.service.messaging.appium.MobileService$Activate.chooseFlow(MobileService.java:42)
at appium.messaging.LifeBeamTest.mobileInit(LifeBeamTest.java:108)
at appium.messaging.LifeBeamTest.pocSanity(LifeBeamTest.java:98)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:117)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:262)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:84)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)

Going to execute kill appium server: [cmd, /c, taskkill, /F, /IM, node.exe]
Now running command [cmd, /c, taskkill, /F, /IM, node.exe]

Process finished with exit code 255

Device: iPhone 6
Appium version: 1.6.2
Xcode version: 8.1

I’m having a similar issue to the one reported by OP, even after executing the steps in this github thread: https://github.com/phonegap/ios-deploy/issues/109

Running sudo npm install --global --unsafe-perm ios-deploy seems to have helped a lot of people resolve this issue, but it’s not working for me. I get this error regardless of whether the app is already installed on the device when I try to run my test.

Exact error as seen in TestNG reporting: > org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Could not install app Command 'ios-deploy --id <udid> --uninstall --bundle /Users/cmichalowski/Documents/workspace/mobileAnalyticsSandboxIOS/app/myapp.app' exited with code 253 (WARNING: The server did not provide any stacktrace information)

I have confirmed that ios-deploy exists in my environment.

The full Appium log can be found here: https://gist.github.com/anonymous/09f441c372ca4abefecd7fa5899c2d47

Try to use the ipa file on real device, not the app file

1 Like

@asi - Thanks for pointing that out. Unfortunately, I still get the same error with the .ipa file. Actually, I’m getting different results for two different .ipa files that the developer gave me. I only see this error in the .ipa file that has a distribution entitlement and was exported as a build for the app store. The other .ipa file that I have was provided with a development entitlement and a developer certificate and I get a totally different error: https://gist.github.com/ChiWhiteSox56/bf3d9a24417fc15e16c5e559b1b1d389

I’m thinking that the second build is closer to what I need because I see that same error coming up for other users. Either way, I still can’t run tests on a real device ever since having to accommodate the XCUITest framework. Thanks again for your help.

Try this…

npm install -g idevicesyslog

Asi Hizkiahu

Back End And Mobile Automation Developer

LifeBEAM

Mobile: +972-54-4636220

http://www.getvi.com/

When I run npm install -g idevicesyslog I get the following error:

npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/idevicesyslog
npm ERR! 404 
npm ERR! 404  'idevicesyslog' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

I seem to have it though because I was able to pair my device to run idevicepair pair and capture the logs in another terminal window that called idevicesyslog

Documentation for this problem is here:

However, you might want to read through this post as the author does a good job explaining it:

1 Like

@wreed - Thanks for providing these links. During my initial investigation into this, I missed the part about the Real Device Security Settings. (https://github.com/appium/appium-xcuitest-driver#real-device-security-settings)

Definitely seems to be an issue with certificates and the developer and I are working on it. I’ll modify this post once I know exactly what we needed to do to fix it. Thanks again!

Edit / Update: After upgrading Appium to 1.6.3 and getting idevicesyslog proplely installed, I’m getting the xcodebuild exited with code '65' and signal 'null' error that is mentioned in the above post. I worked with the developer on this, and we followed the instructions in the documentation (https://www.npmjs.com/package/appium-xcuitest-driver) that specify what to do for this error. This belongs in a different thread, so I’ll post a link to my post in case anyone else is dealing with the same issue.

can you please clarify why can’t .app be installed on real iphone device ?

Some of the blogs do mention that it can be done with capabilities like below

public AppiumDriver driver;
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, “iPhone 6”);
capabilities.setCapability(MobileCapabilityType.UDID, “6gt72bfbi38sehi42”);
capabilities.setCapability(MobileCapabilityType.APP, System.getProperty(“user.dir”) + “/build/SampleiOS.app”);
driver = new IOSDriver(new URL(“http://127.0.0.1:4723/wd/hub”), capabilities);

@asi Facing the same error found any solution??

Did anyone find any solution about this issue? , i am working almost a week on this problem. Please help.

Can you please show the log with the error message you’re getting?