ENVIRONMENT:
xcode path: /Applications/Xcode.app/Contents/Developer
xcode version: Xcode 7.3
calabash-ios version: 0.18.2
run_loop version: 2.0.9
simulator: iPhone 6s Plus (9.3)
Started my app manually from Xcode and did:
$ curl http://localhost:37265/version
{
"device_family": "iPhone",
"outcome": "SUCCESS",
"server_port": 37265,
"simulator_devic e": "iPhone",
"simulator": "CoreSimulator 209.19 - Device: iPhone 6s Plus - Runtime: iOS 9.3 (13E230) - DeviceType: iPhone 6s Plus",
"app_name": "SOTesters",
"app_version": "11.2",
"screen_dimensions": {
"sample": 1,
"height": 2208,
"width": 1242,
"scale": 3
},
"git": {
"revision": "68026d3",
"remote_origin": "git@github.com:calabash\/calabash-ios-server.git",
"branch": "master"
},
"device_name": "iPhone Simulator",
"4inch": false,
"app_id": "com.goinstant.internal.SOTesters",
"form_factor": "iphone 6+",
"system": "x86_64",
"version": "0.18.2",
"iOS_version": "9.3",
"short_version_string": "11.2",
"ios_version": "9.3",
"iphone_app_emulated_on_ipad": false,
"model_identifier": "iPhone8,2",
"app_base_sdk": "iphonesimulator9.3"
}
Steps to reproduce
1. Build app to iPhone 6s Plus (9.3) simulator
2. Launch DEBUG=1 DEBUG_HTTP=1 DEVICE_TARGET='iPhone 6s Plus (9.3)'calabash-ios console
irb(main):003:0> start_test_server_in_background
EXEC: xcrun strings /Users/k/Library/Developer/Xcode/DerivedData/Build/Products/Debug-iphonesimulator/SOTesters.app/SOTesters
INFO: Detected app at path:
INFO: /Users/k/Library/Developer/Xcode/DerivedData/Build/Products/Debug-iphonesimulator/SOTesters.app
INFO: Modification time of app: Tue 29 Mar 2016 17:20:52 ADT
INFO: If this is incorrect, set the APP variable and/or rebuild your app
INFO: It is your responsibility to ensure you are testing the right app.
INFO: Using uia strategy: 'host'
DEBUG: Searching for run-loop results with glob: /Users/k/.run-loop/results/*
DEBUG: Found 6 previous run-loop results
DEBUG: Will delete 1 previous run-loop results
DEBUG: Deleted 1 previous results in 0.007448 seconds
DEBUG: Searching for instruments caches with glob: /Library/Caches/com.apple.dt.instruments/xrtmp__*
DEBUG: Found 6 instruments caches
DEBUG: Will delete 1 instruments caches
DEBUG: Deleted 1 instruments caches in 0.002827 seconds
DEBUG: Simulator instruction set 'x86_64' is compatible with '["x86_64"]'
DEBUG: Deleting /Users/k/Library/Developer/CoreSimulator/Devices/DDB1E8ED- 025F-40E5-AF6C-1A99C30729B9/data/tmp/instruments_cvg4z3/stdio.pipe
DEBUG: Installed app is the same as #<APP: /Users/k/Library/Developer/Xcode/DerivedData/Build/Products/Debug-iphonesimulator/SOTesters.app>
DEBUG: Launching #<Simulator: iPhone 6s Plus (9.3) DDB1E8ED-025F-40E5-AF6C-1A99C30729B9 x86_64> with:
EXEC: xcrun open -g -a /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app --args -CurrentDeviceUDID DDB1E8ED-025F-40E5-AF6C-1A99C30729B9
DEBUG: Waiting for simulator to stabilize with timeout: 30
DEBUG: Simulator stable after 4.394763 seconds
DEBUG: Waited a total of 6.394763 seconds for simulator to stabilize
DEBUG: Took 6.519767 seconds to launch the simulator
2016-03-29 22:23:23 -0300 [RunLoop:debug]:
{
:app => "/Users/k/Library/Developer/Xcode/DerivedData/Build/Products/Debug-iphonesimulator/SOTesters.app",
:args => [],
:bundle_dir_or_bundle_id => "/Users/k/Library/Developer/Xcode/DerivedData/Build/Products/Debug-iphonesimulator/SOTesters.app",
:bundle_id => "com.goinstant.internal.SOTesters",
:device_target => "iPhone 6s Plus (9.3)",
:instruments => #<Instruments 7.3>,
:launch_method => :instruments,
:launch_retries => 5,
:log_file => "/Users/k/.run-loop/results/2016-03-29_22-23-14/run_loop.out",
:no_launch => false,
:no_stop => false,
:relaunch_simulator => true,
:reset => false,
:results_dir => "/Users/k/.run-loop/results/2016-03-29_22-23-14",
:results_dir_trace => "/Users/k/.run-loop/results/2016-03-29_22-23-14/trace",
:script => "/Users/k/.run-loop/results/2016-03-29_22-23-14/_run_loop.js",
:sdk_version => nil,
:udid => "iPhone 6s Plus (9.3)",
:uia_strategy => :host,
:xcode => "7.3",
:xcode_path => "/Applications/Xcode.app/Contents/Developer"
}
EXEC: xcrun instruments -s templates
### Starting on iPhone 6s Plus (9.3) App: /Users/k/Library/Developer/Xcode/DerivedData/Build/Products/Debug-iphonesimulator/SOTesters.app ###
EXEC: xcrun instruments -s devices
2016-03-29 22:23:24 -0300 [RunLoop:debug]: xcrun instruments -w DDB1E8ED-025F-40E5-AF6C-1A99C30729B9 -D /Users/k/.run-loop/results/2016-03-29_22-23-14/trace -t Automation /Users/k/Library/Developer/Xcode/DerivedData/Build/Products/Debug-iphonesimulator/SOTesters.app -e UIARESULTSPATH /Users/k/.run-loop/results/2016-03-29_22-23-14 -e UIASCRIPT /Users/k/.run-loop/results/2016-03-29_22-23-14/_run_loop.js >& /Users/k/.run-loop/results/2016-03-29_22-23-14/run_loop.out
2016-03-29 22:23:24 -0300 [RunLoop:debug]: Preparation took 10.577951 seconds
2016-03-29 22:23:29 -0300 [RunLoop:debug]: Launching took 4.361413 seconds
DEBUG: It took 14.939501 seconds to launch the app
|
The cursor waits there and it's incomplete.
I have to ctrl+c and to return irb>
If I query without start_test_server_in_background
I get timeout error
irb(main):001:0> query("*")
= Request
> ! CONNECT TO 10.10.10.10:37265
Retrying.. HTTPClient::ConnectTimeoutError: (execution expired)
= Request
`! CONNECT TO 10.10.10.10:37265
Retrying.. HTTPClient::ConnectTimeoutError: (execution expired)
= Request
> ! CONNECT TO 10.10.10.10:37265
Failing... HTTPClient::ConnectTimeoutError
HTTPClient::ConnectTimeoutError: execution expired
I basically followed all the instructions on https://github.com/calabash/calabash-ios/wiki/Updating-your-Calabash-iOS-version
The server version and gem version are 0.18.2 but still can't connect. I tried running on other simulator and I'm getting the same connection timeout error.
+1 for including all relevant information.
Your curl
is against localhost
, but the stacktrace shows: 10.10.10.10:37265
. These means that somewhere in your environment DEVICE_ENDPOINT
is set to "http://10.10.10.10:37265".
Either you are starting the Calabash console with DEVICE_ENDPOINT=http://10.10.10.10:37265
or DEVICE_ENDPOINT
has been exported in your shell.
Try:
$ DEVICE_ENDPOINT="http://localhost:37265" calabash-ios console
> start_test_server_in_background
You can check to see if DEVICE_ENDPOINT
has been defined in your shell:
$ echo $DEVICE_ENDPOINT