question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problems setting up appium-1.6.0-beta1 for XCUITesting

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:3
  • Comments:49 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
kommuswamycommented, Dec 7, 2016

Hi,

I am unable to launch the iOS simulator in Appium 1.6.2 version. it shows an error like killing all simulator. i am testing in mac book.

1reaction
lvconleycommented, Nov 8, 2016

Thanks guys, is working now!

My initial install attempts were not working correctly with Brew, and I kept getting warnings or errors which indicated that the installation may not have fully worked correctly. So, I ran the following command to see what had been installed by brew:

brew list

And carthage was never listed.

So, I did an update of Brew just to make sure I had the latest version:

brew update

And actually encountered permissions errors which I temporarily resolved with brute force:

chmod -R 777 /usr/local

and this allowed the next ‘brew update’ attempt to complete without any errors. Once brew had been fully updated, the next time I ran:

brew install carthage

The installation completed without any warnings or errors and then when I ran the following command at the terminal:

which carthage

The carthage installation path was instantly displayed.

And then I re-ran my test code, and the test worked perfectly!

Thanks for the tips guys, very helpful!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting - Appium
Make sure your system is set up appropriately (i.e., XCode is updated, Android SDK is installed and ANDROID_HOME is set. Make sure the...
Read more >
iOS App is unable to launch using appium 1.6.0 (beta) #7348
1.Launching WebDriverAgent success 2.Can see driver trying to open the app 3. Launching .app file on simulator failed (It opens the app and ......
Read more >
appium/CHANGELOG.md - UNPKG
67, Appium 1.7.1 fixes multiple issues with the previous release. ... 140, which is highly recommended for real device testing and to speed...
Read more >
Error trying to write mobile automation - Katalon Studio
Hello everyone, good afternoon! I am having a big problem, when I try to record the steps in the mobile application, it is...
Read more >
Getting started with Appium 2.0: Your beginner's guide | Bitrise
If you are facing issues with Appium with iOS apps — or can't run your tests on iOS real devices — check out...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found