Description
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
Activity
imurchie commentedon Aug 22, 2016
I'm not sure that Appium can do anything about the rate limiting.
The webpack error is avoidable by using the
-d
flag to./Scripts/bootstrap.sh
, as Appium does.When you say you could not reproduce the issue above, which issue are you referring to.
ssynix commentedon Aug 22, 2016
The problem with rate limiting is that running the script manually resulted in a build that appium was able to use, even though it still generated log messages about rate limiting. Maybe the script is returning an error status where it shouldn't, and Appium is treating it as a fatal error.
My bad, I missed the
-d
flag.I was about to edit the issue, but shortly after submitting it I realized that the
SessionNotCreatedError
was due to mistakenly running appium from a terminal window that I used for appium 1.5.3, which is why I wasn't able to reproduce it after I correctly started appium 1.6.0.imurchie commentedon Aug 22, 2016
Interesting. I'll look into how to test that.
If peertalk has really failed to download, I don't think you would be able to test on a real device.
ssynix commentedon Aug 22, 2016
I haven't had a chance to look into real device testing, which might be why I haven't run into any issues with it yet.
I'll keep you updated if I find a solution on my end.
ssynix commentedon Aug 24, 2016
I modified the
bootstrap.sh
script to callcarthage bootstrap
--use-ssh
, which avoided the API rate limiting issue.skumar1122 commentedon Aug 25, 2016
@ssynix @imurchie
on interest have you tried on Real devices? I am trying to run iOS 9.3.4 first and iOS 10.0 versions.
pre-requisites -
Appium 1.6.0-beta1
Xcode 8 beta
iOS 10.0 devices
and with new capability - Automation name = XCUITest
Am i missing anything new ?
can you please let me know.
Thanks
Shiva
imurchie commentedon Aug 25, 2016
You will need Carthage installed, and libimobiledevice. See https://github.com/appium/appium-xcuitest-driver#external-dependencies
riadcse07 commentedon Aug 29, 2016
I followed @ssynix procedure and finally got the below error in terminal
[XCUITest] 2016-08-29 14:45:44.980 xcodebuild[4493:60451] Connection peer refused channel request for "dtxproxy:XCTestManager_IDEInterface:XCTestManager_DaemonConnectionInterface"; channel canceled <DTXChannel: 0x7fd0d5311b60>
[XCUITest]
Testing failed:
[XCUITest] ./Scripts/generate_modules.sh: line 15: Modules/module.modulemap: Permission denied
** TEST FAILED **
The following build commands failed:
PhaseScriptExecution Generate\ modules /Users//Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Intermediates/WebDriverAgent.build/Debug-iphonesimulator/WebDriverAgentLib.build/Script-AD35D0281CF1B37A00870A75.sh
(1 failure)
[XCUITest] xcodebuild exited with code '65' and signal 'null'
[XCUITest] Error: xcodebuild failed with code 65
at SubProcess. (lib/webdriveragent.js:214:25)
at emitTwo (events.js:106:13)
at SubProcess.emit (events.js:191:7)
at ChildProcess. (lib/teen_process.js:191:14)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
Error: xcodebuild failed with code 65
at SubProcess. (lib/webdriveragent.js:214:25)
at emitTwo (events.js:106:13)
at SubProcess.emit (events.js:191:7)
at ChildProcess. (lib/teen_process.js:191:14)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
[XCUITest] Shutting down WebDriverAgent
[XCUITest] Simulator log exited with code 'null'
[debug] [XCUITest] Resetting simulator
[debug] [XCUITest] Shutting down simulator
[debug] [iOSSim] Killing all iOS Simulators
[debug] [iOSLog] Stopping iOS log capture
[MJSONWP] Encountered internal error running command: Error: xcodebuild failed with code 65
at SubProcess. (lib/webdriveragent.js:214:25)
at emitTwo (events.js:106:13)
at SubProcess.emit (events.js:191:7)
at ChildProcess. (lib/teen_process.js:191:14)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
[HTTP] <-- POST /wd/hub/session 500 198442 ms - 167
SrinivasanTarget commentedon Aug 31, 2016
@triager please label: Bug
ssynix commentedon Aug 31, 2016
@SrinivasanTarget my problems have all been resolved (at least the ones in the original post). It was all user-error on my end except the API rate limit being reached using carthage, which I filed here: facebookarchive/WebDriverAgent#260.
codehunterridoy commentedon Sep 1, 2016
@ssynix could you please help me out how i can run appium 1.6.0 beta 1 on iOS 10 simulator using java client.
THIRISANGU commentedon Sep 6, 2016
Here are the log details for my current issue. I am using Appium 1.6.0beta1 with java for execution.
XCUITest] Using default agent: /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj
[XCUITest] Using default bootstrap: /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent
[XCUITest] Launching WebDriverAgent on the device
[debug] [XCUITest] Running WebDriverAgent bootstrap script to install dependencies
[XCUITest] Error: Command '/bin/bash Scripts/bootstrap.sh -d' exited with code 1
at ChildProcess. (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:877:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
{ Error: Command '/bin/bash Scripts/bootstrap.sh -d' exited with code 1
at ChildProcess. (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:877:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
stdout: '\u001b[1mFetching dependencies\n*** Downloading KissXML.framework binary at "5.0.5"\n*** Downloading RoutingHTTPServer.framework binary at "v1.0.1"\n',
stderr: 'Failed to write to /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Carthage/Build/iOS: Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “iOS” in the folder “Build”." UserInfo={NSFilePath=/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Carthage/Build/iOS, NSUnderlyingError=0x7fbf2a432120 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}}\n',
code: 1 }
[XCUITest] Shutting down WebDriverAgent
[debug] [XCUITest] Resetting simulator
25 remaining items
kirangowdawestwing commentedon Nov 15, 2016
thanks @imurchie and @ssynix my issue got fixed. It was related to the permissions of the user.
dayanacgeorge commentedon Nov 15, 2016
i am following the following link for the installation steps.
https://discuss.appium.io/t/installation-steps-to-get-appium-fully-working-on-macos-10-11/12336/4
npm i -g webpack
imurchie commentedon Nov 15, 2016
You should not need webpack at all. I would re-install the
appium-xcuitest-driver
, as something seems to have gotten messed up.dayanacgeorge commentedon Nov 16, 2016
MDMCreateDeltaDirectory:1920 calling MDMDirectoryDiff with:
state->old_bundle: /var/folders/3j/093h0g350fb50b5f__530z9h0000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/dfe71ce010bede6ea2505507e2698e25/34c351a1076e2ce9cbc7136f10fb32bc145dcf11/WebDriverAgentRunner-Runner.app
state->new_bundle: /Users/User1/Library/Developer/Xcode/DerivedData/WebDriverAgent-brjtpqrlumrvdccurmbiooiyxgwd/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app
state->dst_bundle: /var/folders/3j/093h0g350fb50b5f__530z9h0000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.8uq1Ua/WebDriverAgentRunner-Runner.app_sparse.ipa/Payload//WebDriverAgentRunner-Runner.app, binaryDiff flag: FALSE
dst_ipa: /var/folders/3j/093h0g350fb50b5f__530z9h0000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.8uq1Ua/WebDriverAgentRunner-Runner.app_sparse.ipa
__MDMDirectoryDiff_block_invoke.37:1473 calling writeDictToFile with: /var/folders/3j/093h0g350fb50b5f__530z9h0000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.8uq1Ua/WebDriverAgentRunner-Runner.app_sparse.ipa/ManifestCache.plist
writeDictToFile:1278 ==== Successfully wrote Manifest cache to /var/folders/3j/093h0g350fb50b5f__530z9h0000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.8uq1Ua/WebDriverAgentRunner-Runner.app_sparse.ipa/ManifestCache.plist
2016-11-16 09:32:58.735475 XCTRunner[3825:776867] Running tests...
2016-11-16 09:32:58.811743 XCTRunner[3825:776867] The bundle “WebDriverAgentRunner” couldn’t be loaded because it is damaged or missing necessary resources. Try reinstalling the bundle.
2016-11-16 09:32:58.811871 XCTRunner[3825:776867](dlopen_preflight%28/var/containers/Bundle/Application/57A06B32-3E8A-4BE2-95FF-1467160B823C/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest/WebDriverAgentRunner%29: Library not loaded: @rpath/KissXML.framework/KissXML
Referenced from: /private/var/containers/Bundle/Application/57A06B32-3E8A-4BE2-95FF-1467160B823C/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest/Frameworks/WebDriverAgentLib.framework/WebDriverAgentLib
Reason: image not found)
2016-11-16 09:33:00.472 xcodebuild[43852:483539] Error Domain=IDETestOperationsObserverErrorDomain Code=5 "Early unexpected exit, operation never finished bootstrapping - no restart will be attempted" UserInfo={NSLocalizedDescription=Early unexpected exit, operation never finished bootstrapping - no restart will be attempted}
Testing failed:
Test target WebDriverAgentRunner encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted)
** TEST FAILED **
Now I am getting this error. how to get the KissXML.framework/KissXML
imurchie commentedon Nov 16, 2016
The KissXML framework is downloaded when the
./Scripts/bootstrap.sh
script is run. Appium does that automatically.dayanacgeorge commentedon Nov 16, 2016
In Integration App >> 'Provisioning profile' signed code is deprecated.
Locally, we can not do the Automatic signing due to the security reasons.
dayanacgeorge commentedon Nov 28, 2016
I have done all the signing certificate configurations in Xcode 8.1. But when I execute the following command
xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=' test
is giving a TEST FAILED message.
kommuswamy commentedon 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.
vikramvi commentedon Dec 8, 2016
@kommuswamy this is not related issue, can you open new issue with all the necessary details as mentioned in issue template ?
shabana-parveen commentedon Dec 9, 2016
@kommuswamy , please increase app launch time.
mollywhitnack commentedon Dec 13, 2016
I am getting the same error
After running:
I ran the
./Scripts/bootstrap.sh -d
command to generate the bootstrap.sh file.When I navigate to
/Users//Library/Caches/org.carthage.CarthageKit/binaries/peertalk/v1.0/
My 1725911-Peertalk.framework.zip file is HTML document text and cannot be unzipped:
I have carthage version 0.18.1 installed, running Appium 1.6.3 with ios10.1 and xcode 8.1 on osx 10.11.6
timcallanan2 commentedon Jan 26, 2017
I have a similar problem as @dayanacgeorge using WebDriverAgent that came with Appium 1.6.3 , so I pull the latest version from GITHub https://github.com/facebook/WebDriverAgent and re-built it and I got it working, I suggest replace all files from Appium version with latest files on GIT Hub repro, and rebuild, https://www.youtube.com/watch?v=Yi177Si5aLU#t=3.478444 is a good video to check for all dependencies
lock commentedon Apr 29, 2019
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.