Skip to content

Problems setting up appium-1.6.0-beta1 for XCUITesting #6759

@ssynix

Description

@ssynix

The problem

I ran into a couple of issues setting up the 1.6.0-beta1 driver for iOS 10 simulator testing with the XCUITestDriver.

2016-08-22 09:10:10:384 - [XCUITest] Launching WebDriverAgent on the device
2016-08-22 09:10:10:386 - [debug] [XCUITest] Running WebDriverAgent bootstrap script to install dependencies
2016-08-22 09:10:11:499 - [XCUITest] Error: Command '/bin/bash Scripts/bootstrap.sh -d' exited with code 1
    at ChildProcess.<anonymous> (lib/teen_process.js:66:19)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:852:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
 { Error: Command '/bin/bash Scripts/bootstrap.sh -d' exited with code 1
    at ChildProcess.<anonymous> (lib/teen_process.js:66:19)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:852:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
  stdout: '\u001b[1mFetching dependencies\n*** Downloading KissXML.framework binary at "5.0.5"\n*** Downloading peertalk.framework binary at "v1.0"\n',
  stderr: 'A shell task (/usr/bin/env unzip -qq -d /var/folders/2x/nx56z5rx0rn94pps7f15frx4bpqmmv/T/carthage-archive.8k9Nqk /Users/shayansa/Library/Caches/org.carthage.CarthageKit/binaries/peertalk/v1.0/1725911-Peertalk.framework.zip) failed with exit code 9:\n[/Users/shayansa/Library/Caches/org.carthage.CarthageKit/binaries/peertalk/v1.0/1725911-Peertalk.framework.zip]\n  End-of-central-directory signature not found.  Either this file is not\n  a zipfile, or it constitutes one disk of a multi-part archive.  In the\n  latter case the central directory and zipfile comment will be found on\n  the last disk(s) of this archive.\nunzip:  cannot find zipfile directory in one of /Users/shayansa/Library/Caches/org.carthage.CarthageKit/binaries/peertalk/v1.0/1725911-Peertalk.framework.zip or\n        /Users/shayansa/Library/Caches/org.carthage.CarthageKit/binaries/peertalk/v1.0/1725911-Peertalk.framework.zip.zip, and cannot find /Users/shayansa/Library/Caches/org.carthage.CarthageKit/binaries/peertalk/v1.0/1725911-Peertalk.framework.zip.ZIP, period.\n\n',
  code: 1 }
2016-08-22 09:10:11:501 - [XCUITest] Shutting down WebDriverAgent
2016-08-22 09:10:11:506 - [debug] [iOSLog] Stopping iOS log capture
2016-08-22 09:10:11:519 - [MJSONWP] Encountered internal error running command: Error: Command '/bin/bash Scripts/bootstrap.sh -d' exited with code 1
    at ChildProcess.<anonymous> (lib/teen_process.js:66:19)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:852:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
2016-08-22 09:10:11:527 - [HTTP] <-- POST /wd/hub/session 500 3921 ms - 199

It mentions that it has a problem reading a zip archive. I looked into it and realized that the zip archive is actually this text file:

{"message":"API rate limit exceeded for <blipped ip address>. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)","documentation_url":"https://developer.github.com/v3/#rate-limiting"}

Probably because of how our internal corporate network works.

I ran ./Scripts/bootstrap.sh in the WebDriverAgent folder, which resulted in sh: webpack: command not found. I resolved it by npm i -g webpack.

Afterwards, the bootstrap.sh script finished the build successfully, even though it printed one error and it still mentioned that it skipped downloading packages due to an API limit being reached.

I managed to trigger the creation of an iOSDriver (instead of XCUITest) on my first almost successful attempt, which led to:

[Appium] Creating new IosDriver session
[Appium] Capabilities:
[Appium]   app: '/Users/shayansa/Downloads/ios/my.simulator.app'
[Appium]   noReset: true
[Appium]   newCommandTimeout: 7200
[Appium]   platformVersion: '10.0'
[Appium]   automationName: 'XCUITest'
[Appium]   sessionOverride: true
[Appium]   platformName: 'iOS'
[Appium]   deviceName: 'iPhone 6s Plus'
[BaseDriver] SessionNotCreatedError: A new session could not be created. Details: The desiredCapabilities object was not valid for the following reason(s): automationName XCUITest not part of Appium,Selendroid,WebDriverAgent.

I don't recall changing anything in my config, but I couldn't reproduce the issue above.

After all this, I managed to run the app on the iOS 10 simulator and execute some basic commands.

Environment

  • Appium version (or git revision) that exhibits the issue: 1.6.0-beta1
  • Desktop OS/version used to run Appium: OSX El Capitan

Metadata

Metadata

Assignees

No one assigned

    Labels

    Buga problem that needs fixing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions