appium / appium

Cross-platform automation framework for all kinds of apps, built on top of the W3C WebDriver protocol
http://appium.io/
Apache License 2.0
18.95k stars 6.07k forks source link

Error on starting iOS test when running against appium 1.14.1 #13047

Closed BoazWarshawsky closed 5 years ago

BoazWarshawsky commented 5 years ago

The problem

After updating to appium 1.14.1 I started seeing errors when calling Remote method to start my test: [debug] [XCUITest] Removing WDA application from device [XCUITest] Error: Unable to launch WebDriverAgent because of xcodebuild failure: Command 'carthage bootstrap --platform iOS\,tvOS' exited with code 1. 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. [XCUITest] at quitAndUninstall (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:516:15) [XCUITest] at

Environment

Details

Link to Appium logs

https://assets-production.applicaster.com.s3.amazonaws.com/qa/zapp_qa/manual/boaz/appium.log## Code To Reproduce Issue [ Good To Have ]

KazuCocoa commented 5 years ago

What message can you see when you run below by hand?

$ cd /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver
$ carthage bootstrap --platform iOS,tvOS

[debug] [BaseDriver] Event 'wdaStartAttempted' logged at 1565243992959 (08:59:52 GMT+0300 (IDT)) [XCUITest] Launching WebDriverAgent on the device [WebDriverAgent] Fetching dependencies [WebDriverAgent] Installing/updating dependencies for platforms 'iOS', 'tvOS' [XCUITest] Launching WebDriverAgent on the device [WebDriverAgent] Fetching dependencies [WebDriverAgent] Installing/updating dependencies for platforms 'iOS', 'tvOS' [debug] [BaseDriver] Event 'wdaStartFailed' logged at 1565243995369 (08:59:55 GMT+0300 (IDT)) [debug] [XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: Command 'carthage bootstrap --platform iOS\,tvOS' exited with code 1. 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.

BoazWarshawsky commented 5 years ago

@KazuCocoa, seeing this: *** No Cartfile.resolved found, updating dependencies Failed to read file or folder at /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/Cartfile: Error Domain=NSCocoaErrorDomain Code=260 "The file “Cartfile” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/Cartfile, NSUnderlyingError=0x7fcb43603cb0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}

KazuCocoa commented 5 years ago

sorry, the place is $ cd /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent ( WebDriverAgent was missed)

BoazWarshawsky commented 5 years ago

I don't have the WebDriverAgent there, I installed appium using CLI. I do have WebDriverAgent somewhere else on my machine, which I run there successfully the Runner. When I run your cmd from there I got this: Checking out RoutingHTTPServer at "v1.0.1" xcodebuild output can be found in /var/folders/r6/x6gmkcb171xcpcy6m69z6dk00000gn/T/carthage-xcodebuild.P893q7.log *** Downloading RoutingHTTPServer.framework binary at "v1.0.1"

KazuCocoa commented 5 years ago

I ensured appium@1.14.1 on my local, and exactly the structure is for 1.15.0's one. We expect 1.14.1 has WebDriverAgent in xcuitest driver. https://github.com/appium/appium/blob/1.14/npm-shrinkwrap.json

Can you install 1.14.0 instead of 1.14.1 as a workaround? 1.14.1 is a patch release for YouI Engine. Others should be the same as 1.14.0 (but maybe something wrong unexpectedly in npm package) https://github.com/appium/appium/pull/13008/files

BoazWarshawsky commented 5 years ago

Thanks @KazuCocoa the problem is solved, I am just concern since I updated in 4 different CI machines few days ago from appium 1.11.1 to 1.14.1, all the tests there are running against Simulators and not Real Devices as in our case above. Should I downgrade to 1.14.0? its a real problem doing this now

KazuCocoa commented 5 years ago

Yes. 1.14.0 is better for now

KazuCocoa commented 5 years ago

note:

appium prefix packages in node_modules by npm install -g. Only appium-webdriveragent affects WDA build by xcuitest-driver. Other changes are no problem.

dpgraham commented 5 years ago

Can you try installing the release candidate npm install -g appium@rc and see if that fixes it?

KazuCocoa commented 5 years ago

Installed the rc and took a look at node_modules (below) looks fine.

appium-adb/                 appium-idb/                 appium-selendroid-driver/   appium-xcode/
appium-android-driver/      appium-ios-driver/          appium-support/             appium-xcuitest-driver/
appium-base-driver/         appium-ios-simulator/       appium-tizen-driver/        appium-youiengine-driver/
appium-chromedriver/        appium-mac-driver/          appium-uiautomator2-driver/
appium-espresso-driver/     appium-remote-debugger/     appium-uiautomator2-server/
appium-fake-driver/         appium-sdb/                 appium-windows-driver/
JavonDavis commented 5 years ago

@KazuCocoa I'm having the same problem and when I navigate to the WebDriver agent folder and run the command this is the output

bash-3.2$ carthage bootstrap --platform iOS,tvOS
*** Checking out CocoaAsyncSocket at "7.6.3"
*** Checking out RoutingHTTPServer at "v1.0.2"
*** Checking out YYCache at "1.1.0"
*** xcodebuild output can be found in /var/folders/1b/gl7yt7ds26vcyr1pkgld6l040000gn/T/carthage-xcodebuild.UlLFQO.log
*** Downloading CocoaAsyncSocket.framework binary at "Version 7.6.3"
*** Building scheme "RoutingHTTPServer tvOS" in RoutingHTTPServer.xcodeproj
*** Building scheme "RoutingHTTPServer iOS" in RoutingHTTPServer.xcodeproj
*** Building scheme "YYCache iOS" in YYCache.xcodeproj
*** Building scheme "YYCache tvOS" in YYCache.xcodeproj

appium v 1.14.2

JavonDavis commented 5 years ago

I also so this message that might be related in the appium logs.

2019-08-26 18:16:50:721 [WebDriverAgent] Fetching dependencies
2019-08-26 18:16:51:682 [WebDriverAgent] Installing/updating dependencies for platforms 'iOS', 'tvOS'
2019-08-26 18:16:52:300 [WebDriverAgent] *** Checking out CocoaAsyncSocket at "7.6.3"
2019-08-26 18:16:52:301 [WebDriverAgent] *** Checking out RoutingHTTPServer at "v1.0.2"
2019-08-26 18:16:52:301 [WebDriverAgent] *** Checking out YYCache at "1.1.0"
2019-08-26 18:16:54:423 [WebDriverAgent] *** xcodebuild output can be found in /var/folders/1b/gl7yt7ds26vcyr1pkgld6l040000gn/T/carthage-xcodebuild.QmjRp9.log
2019-08-26 18:16:54:434 [WebDriverAgent] *** Downloading CocoaAsyncSocket.framework binary at "Version 7.6.3"
2019-08-26 18:17:02:852 [WebDriverAgent] *** Building scheme "RoutingHTTPServer tvOS" in RoutingHTTPServer.xcodeproj
2019-08-26 18:17:11:524 [WebDriverAgent] Build Failed
2019-08-26 18:17:11:524 [WebDriverAgent]        Task failed with exit code 66:
2019-08-26 18:17:11:524 [WebDriverAgent]        /usr/bin/xcrun xcodebuild -project /Users/distiller/project/node_modules/appium-webdriveragent/Carthage/Checkouts/RoutingHTTPServer/RoutingHTTPServer.xcodeproj -scheme RoutingHTTPServer\ tvOS CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -showBuildSettings -skipUnavailableActions
mykola-mokhnach commented 5 years ago

Appium 1.14.2 patch has been released a while ago. Closed as fixed.

SaiNiranjan commented 4 years ago

note:

appium prefix packages in node_modules by npm install -g. Only appium-webdriveragent affects WDA build by xcuitest-driver. Other changes are no problem.

  • 1.14.0
appium-adb/                 appium-idb/                 appium-selendroid-driver/   appium-xcode/
appium-android-driver/      appium-ios-driver/          appium-support/             appium-xcuitest-driver/
appium-base-driver/         appium-ios-simulator/       appium-tizen-driver/        appium-youiengine-driver/
appium-chromedriver/        appium-mac-driver/          appium-uiautomator2-driver/
appium-espresso-driver/     appium-remote-debugger/     appium-uiautomator2-server/
appium-fake-driver/         appium-sdb/                 appium-windows-driver/
  • 1.14.1
appium-adb/                 appium-fake-driver/         appium-remote-debugger/     appium-uiautomator2-server/
appium-android-driver/      appium-gulp-plugins/        appium-sdb/                 appium-webdriveragent/
appium-base-driver/         appium-idb/                 appium-selendroid-driver/   appium-windows-driver/
appium-chromedriver/        appium-ios-driver/          appium-support/             appium-xcode/
appium-ci/                  appium-ios-simulator/       appium-tizen-driver/        appium-xcuitest-driver/
appium-espresso-driver/     appium-mac-driver/          appium-uiautomator2-driver/ appium-youiengine-driver/

May I please know how and where can I find all installed components like yours ? Thanks