calabash / calabash-ios

Calabash for iOS
Other
1.81k stars 368 forks source link

HTTPClient::ConnectTimeoutError: execution expired(Only Phone) #1411

Open DoubleJ2011 opened 5 years ago

DoubleJ2011 commented 5 years ago

start_test_server_in_background failed on iPhone real device, but work well on iPad real device.

BasicInfo

$ xcode-select --print-path /Applications/Xcode.app/Contents/Developer $ xcodebuild -version Xcode 10.2.1 Build version 10E1001 $ calabash-ios version 0.21.10 $ curl http://192.168.2.14:37265/version {"device_family":"iPhone","outcome":"SUCCESS","server_port":37265,"simulator":"","app_name":"SCB_RM(CN)","app_version":"0430-13:30:10","screen_dimensions":{"height":1334,"bounds":{"y":0,"x":0,"width":375,"height":667},"sample":1,"native_bounds":{"y":0,"x":0,"width":750,"height":1334},"width":750,"native_scale":2,"bounds_portrait_height":667,"bounds_portrait_width":375,"scale":2},"git":{"revision":"c36c12c","remote_origin":"git@github.com:calabash\/calabash-ios-server.git","branch":"tag\/0.21.7"},"device_name":"robot的 iPhone","4inch":false,"app_id":"com.moxtrablr.SCB-RM","form_factor":"iphone 6","version":"0.21.7","server_identifier_to_skip":"","short_version_string":"1.3","server_identifier":"c36c12ce937d044d55d0c208f9d4502868233513","build_date":"2018-38-10 09:40:40 +0200","ios_version":"12.2","iphone_app_emulated_on_ipad":false,"model_identifier":"iPhone10,1","app_base_sdk":"iphoneos12.2"}

Detail Error when start test server on Phone:

Screen Shot 2019-05-05 at 2 50 31 PM

start_test_server_in_background SHELL: xcrun simctl list devices --json SHELL: xcrun instruments -s devices DEBUG: HTTP: get http://192.168.2.14:27753/1.0/health {:retries=>1, :timeout=>0.5} DEBUG: HTTP: get http://192.168.2.14:27753/1.0/health {:retries=>1, :timeout=>0.5} DEBUG: Waiting for DeviceAgent to launch... SHELL: /Users/moxtra/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/run_loop-4.2.2/lib/run_loop/device_agent/bin/iOSDeviceManager install /Users/moxtra/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/run_loop-4.2.2/lib/run_loop/device_agent/ipa/DeviceAgent-Runner.app --device-id a6d29d97bbd59997882b66fb1be0100521ccf46f --codesign-identity iOS Developer: Anu Kaimala (Anu Kaimala) DEBUG: Took 7.03025 seconds to install DeviceAgent SHELL: xcrun xcodebuild test-without-building -xctestrun /Users/moxtra/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/run_loop-4.2.2/lib/run_loop/device_agent/ipa/DeviceAgent-Runner.app/PlugIns/DeviceAgent.xctest/DeviceAgent-device.xctestrun -destination id=a6d29d97bbd59997882b66fb1be0100521ccf46f -derivedDataPath /Users/moxtra/.run-loop/DeviceAgent/DerivedData >& /Users/moxtra/.run-loop/DeviceAgent/current.log DEBUG: HTTP: get http://192.168.2.14:27753/1.0/health {:retries=>1800, :timeout=>180.0} HTTPClient::ConnectTimeoutError: execution expired from /Users/moxtra/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/httpclient-2.8.3/lib/httpclient/session.rb:611:ininitialize' from /Users/moxtra/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/httpclient-2.8.3/lib/httpclient/session.rb:611:in new' from /Users/moxtra/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/httpclient-2.8.3/lib/httpclient/session.rb:611:increate_socket' from /Users/moxtra/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/httpclient-2.8.3/lib/httpclient/session.rb:755:in block in connect' from /Users/moxtra/.rbenv/versions/2.3.1/lib/ruby/2.3.0/timeout.rb:101:intimeout' from /Users/moxtra/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/httpclient-2.8.3/lib/httpclient/session.rb:748:in connect' from /Users/moxtra/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/httpclient-2.8.3/lib/httpclient/session.rb:511:inquery' from /Users/moxtra/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/httpclient-2.8.3/lib/httpclient/session.rb:177:in query' from /Users/moxtra/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/httpclient-2.8.3/lib/httpclient.rb:1242:indo_get_block' from /Users/moxtra/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/httpclient-2.8.3/lib/httpclient.rb:1019:in block in do_request' from /Users/moxtra/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/httpclient-2.8.3/lib/httpclient.rb:1133:inprotect_keep_alive_disconnected' from /Users/moxtra/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/httpclient-2.8.3/lib/httpclient.rb:1014:in do_request' from /Users/moxtra/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/httpclient-2.8.3/lib/httpclient.rb:856:inrequest' from /Users/moxtra/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/httpclient-2.8.3/lib/httpclient.rb:743:in get' from /Users/moxtra/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/run_loop-4.2.2/lib/run_loop/http/retriable_client.rb:186:insend_request' from /Users/moxtra/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/run_loop-4.2.2/lib/run_loop/http/retriable_client.rb:165:in block in request' from /Users/moxtra/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/run_loop-4.2.2/lib/run_loop/http/retriable_client.rb:152:intimes' from /Users/moxtra/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/run_loop-4.2.2/lib/run_loop/http/retriable_client.rb:152:in request' from /Users/moxtra/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/run_loop-4.2.2/lib/run_loop/http/retriable_client.rb:78:inget' from /Users/moxtra/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/run_loop-4.2.2/lib/run_loop/device_agent/client.rb:1424:in health' from /Users/moxtra/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/run_loop-4.2.2/lib/run_loop/device_agent/client.rb:1483:inlaunch_cbx_runner' from /Users/moxtra/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/run_loop-4.2.2/lib/run_loop/device_agent/client.rb:313:in launch' from /Users/moxtra/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/run_loop-4.2.2/lib/run_loop/device_agent/client.rb:184:inrun' from /Users/moxtra/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/run_loop-4.2.2/lib/run_loop.rb:113:in run' from /Users/moxtra/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/calabash-cucumber-0.21.10/lib/calabash-cucumber/launcher.rb:414:inblock in new_run_loop' from /Users/moxtra/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/calabash-cucumber-0.21.10/lib/calabash-cucumber/launcher.rb:412:in times' from /Users/moxtra/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/calabash-cucumber-0.21.10/lib/calabash-cucumber/launcher.rb:412:innew_run_loop' from /Users/moxtra/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/calabash-cucumber-0.21.10/lib/calabash-cucumber/launcher.rb:365:in relaunch' from /Users/moxtra/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/calabash-cucumber-0.21.10/lib/calabash-cucumber/core.rb:1576:instart_test_server_in_background' from (irb):2 from /Users/moxtra/.rbenv/versions/2.3.1/bin/irb:11:in <main>' error log: tail -1000 -F /Users/moxtra/.run-loop/DeviceAgent/current.log (on Phone) iphone.txt tail -1000 -F /Users/moxtra/.run-loop/DeviceAgent/current.log (on Pad) ipad.txt

spring196 commented 5 years ago

i has also met this issue on some iPhone real device xcodebuild -version Xcode 10.2.1 Build version 10E1001 calabash-ios version 0.21.10

image