First of all, thanks for your appium!. Has been awesome this past days I worked with it. And sorry because I am still a newbie.
I have to automatize an app that is cross-platform throught Android and iOS. I already made everything works perfectly at Android side.
But now I am having many many troubles with MAC, Xcode and Appium… I am also new at MAC…
After a lot of research I couldnt fix my problem so here I am to look forward to fix it.
- MAC version: 10.12.3
- iOS version: 7.1.2 (iPhone 4)
- XCode version: 8.2.1
- Appium version: 1.6.4-beta
- npm version: 4.3.0
My app is installed perfectly with ideviceinstaller:
$ ideviceinstaller -u 1b42a5a03f9c5ac1a28c58a27cefe9923... -i /Users/user/Documents/MyApp/Payload/MyApp.app
Uploading MyApp.app package contents... DONE.
Installing '(null)'
- CreatingStagingDirectory (5%)
- ExtractingPackage (15%)
- InspectingPackage (20%)
- TakingInstallLock (20%)
- PreflightingApplication (30%)
- VerifyingApplication (40%)
- CreatingContainer (50%)
- InstallingApplication (60%)
- PostflightingApplication (70%)
- SandboxingApplication (80%)
- GeneratingApplicationMap (90%)
- Complete
I made a Hello World app with XCode to test installing and launching the app, but I have the same problems…
Here are my capabilities
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("platformName", "iOS");
capabilities.setCapability("platformVersion", "9.3"); //Here should go 7.1.2, but version has to be higher than 9.3
capabilities.setCapability("deviceName", "iPhoneTest");
capabilities.setCapability("automationName", "XCUITest");
capabilities.setCapability("bundleId", "com.myapp.sp.tv");
//capabilities.setCapability("showIOSLog", true);
capabilities.setCapability("udid", "1b42a5a03f9c5ac1a28c58a27cefe9923...");
capabilities.setCapability("app","/Users/user/Documents/MyApp/Payload/MyApp.app");
//capabilities.setCapability("app","/Users/user/Documents/MyApp.ipa"); //Tried .app and .ipa extension
driver = new IOSDriver(new URL("http://192.168.0.208:4723/wd/hub"), capabilities);
driver.launchApp();
Eclipse error displayed at try catch is:
org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session. desired capabilities = Capabilities [{app=/Users/user/Documents/MyApp/Payload/MyApp.app, appium-version=1.6.4-beta, platformVersion=9.3, automationName=XCUITest, bundleId=com.myapp.sp.tv, platformName=iOS, udid=1b42a5a03f9c5ac1a28c58a27cefe9923…, deviceName=iPhoneTest}], required capabilities = Capabilities [{}]
Build info: version: 'unknown', revision: '1969d75', time: '2016-10-18 09:43:45 -0700'
System info: host: 'Mac-mini-de-User.local', ip: '192.168.0.208', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.3', java.version: '1.8.0_101'
Driver info: driver.version: IOSDriver
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:91)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:141)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:69)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)
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:241)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:128)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:141)
at io.appium.java_client.DefaultGenericMobileDriver.<init>(DefaultGenericMobileDriver.java:38)
at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:83)
at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:93)
at io.appium.java_client.ios.IOSDriver.<init>(IOSDriver.java:75)
at MyAppiumTest.<init>(MyAppiumTest.java:38)
at MyAppiumTest.main(MyAppiumTest.java:71)
And at Appium console I see this:
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1489072335797 (16:12:15 GMT+0100 (CET))
[Appium] Creating new XCUITestDriver (v2.15.0) session
[Appium] Capabilities:
[Appium] app: '/Users/user/Documents/MyApp/Payload/MyApp.app'
[Appium] appium-version: '1.6.4-beta'
[Appium] platformVersion: '9.3'
[Appium] automationName: 'XCUITest'
[Appium] bundleId: 'com.myapp.sp.tv'
[Appium] platformName: 'iOS'
[Appium] udid: '1b42a5a03f9c5ac1a28c58a27cefe9923...'
[Appium] deviceName: 'iPhoneTest'
[debug] [XCUITest] XCUITestDriver version: 2.15.0
[BaseDriver] The following capabilities were provided, but are not recognized by appium: appium-version.
[BaseDriver] Session created with session id: 7d370310-0610-4ab6-8ee2-84313b98141d
[debug] [XCUITest] Xcode version set to '8.2.1' (tools v8.2.0.0.1.1480973914)
[debug] [XCUITest] iOS SDK Version set to '10.2'
[debug] [BaseDriver] Event 'xcodeDetailsRetrieved' logged at 1489072335831 (16:12:15 GMT+0100 (CET))
[debug] [XCUITest] Available devices: 1b42a5a03f9c5ac1a28c58a27cefe9923...
[debug] [XCUITest] Creating iDevice object with udid '1b42a5a03f9c5ac1a28c58a27cefe9923...'
[XCUITest] Determining device to run tests on: udid: '1b42a5a03f9c5ac1a28c58a27cefe9923...', real device: true
[BaseDriver] Using local app '/Users/user/Documents/MyApp/Payload/MyApp.app'
[debug] [BaseDriver] Event 'appConfigured' logged at 1489072336813 (16:12:16 GMT+0100 (CET))
[debug] [XCUITest] Checking whether app '/Users/user/Documents/MyApp/Payload/MyApp.app' is actually present on file system
[debug] [XCUITest] App is present
[debug] [BaseDriver] Event 'resetStarted' logged at 1489072336814 (16:12:16 GMT+0100 (CET))
[debug] [XCUITest] Reset: running ios real device reset flow
[debug] [BaseDriver] Event 'resetComplete' logged at 1489072336815 (16:12:16 GMT+0100 (CET))
[debug] [iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog
[debug] [iOSLog] Found idevicesyslog: '/usr/local/bin/idevicesyslog'
[debug] [BaseDriver] Event 'logCaptureStarted' logged at 1489072336966 (16:12:16 GMT+0100 (CET))
[XCUITest] Setting up real device
[debug] [XCUITest] Reset requested. Removing app with id 'com.myapp.sp.tv' from the device
[debug] [XCUITest] Installing '/Users/user/Documents/MyApp/Payload/MyApp.app' on device with UUID '1b42a5a03f9c5ac1a28c58a27cefe9923...'...
[debug] [XCUITest] The app has been installed successfully.
[debug] [BaseDriver] Event 'appInstalled' logged at 1489072351129 (16:12:31 GMT+0100 (CET))
[debug] [BaseDriver] Event 'wdaStartAttempted' logged at 1489072351130 (16:12:31 GMT+0100 (CET))
[XCUITest] Using WDA path: '/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[XCUITest] Using WDA agent: '/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj'
[XCUITest] Launching WebDriverAgent on the device
[debug] [XCUITest] Carthage found: '/usr/local/bin/carthage'
[debug] [XCUITest] Killing hanging processes
[debug] [XCUITest] Beginning test with command 'xcodebuild build-for-testing test-without-building -project /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=1b42a5a03f9c5ac1a28c58a27cefe9923... -configuration Debug' in directory '/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[debug] [XCUITest] Output from xcodebuild will not be logged
[debug] [XCUITest] Starting iproxy to forward traffic from local port 8100 to device port 8100 over USB
[debug] [XCUITest] Waiting up to 60000ms for WebDriverAgent to start
[XCUITest] xcodebuild exited with code '70' and signal 'null'
[debug] [XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 70
[debug] [XCUITest] Quitting and uninstalling WebDriverAgent, then retrying
I can see at the phone that the app is installed and at appium server that session is created and I get a session_id, but the thing is that the process repeats a few times (installing, uninstalling, installing…) before the exception is thrown…
Just for the record, I haven’t paid to become an Apple member developer or however is called to develop…
Can someone help me?
Thank you!
with such error). Due to implemented retry logic this does not affect test - third try succeded.