HTTPClient::ConnectTimeoutError: срок выполнения истек
СРЕДА:
Путь xcode: /Applications/Xcode.app/Contents/Developer
версия xcode: Xcode 7.3
версия Calabash-IOS: 0.18.2
run_loop версия: 2.0.9
симулятор: iPhone 6s Plus (9.3)
Запустил мое приложение вручную из Xcode и сделал:
$ 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"
}
Действия по воспроизведению
1. Создание приложения для симулятора iPhone 6s Plus (9.3)
2. Запустите DEBUG=1 DEBUG_HTTP=1 DEVICE_TARGET='iPhone 6s Plus (9.3)' консоль calabash-ios
irb(основной):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
|
Курсор ждет там, и он не завершен.
Я должен Ctrl+ C и вернуть irb>
Если я запросить без start_test_server_in_background
Я получаю ошибку тайм-аута
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
Я в основном следовал всем инструкциям на https://github.com/calabash/calabash-ios/wiki/Updating-your-Calabash-iOS-version
Версия сервера и версия gem - 0.18.2, но все еще не может соединиться. Я попытался запустить на другом симуляторе, и я получаю ту же ошибку тайм-аута соединения.
2 ответа
+1 за включение всей соответствующей информации.
Ваш curl
против localhost
, но трассировка стека показывает: 10.10.10.10:37265
, Это означает, что где-то в вашей среде DEVICE_ENDPOINT
установлен на " http://10.10.10.10:37265".
Либо вы запускаете консоль Calabash с DEVICE_ENDPOINT=http://10.10.10.10:37265
или же DEVICE_ENDPOINT
был экспортирован в вашей оболочке.
Пытаться:
$ DEVICE_ENDPOINT="http://localhost:37265" calabash-ios console
> start_test_server_in_background
Вы можете проверить, если DEVICE_ENDPOINT
был определен в вашей оболочке:
$ echo $DEVICE_ENDPOINT
Ты start_test_server_in_background
перед запуском query()
в irb
? Существует довольно сложный процесс прикрепления, который должен произойти, прежде чем calabash сможет взаимодействовать с вашим приложением.