xcode安装位置:/Applications/Xcode.app/Contents/Developer
xcode版本:Xcode 7.2
构建版本7C68
calabash版本:0.16.4
calabash.framework version: `0.16.4`
profiling: /Users/moody/git/calabash/calabash-ios-server/build/framework/version-tool/Build/Intermediates/calabash.build/Debug/version.build/Objects-normal/x86_64/main.gcda: cannot open: No such file or directory
profiling: /Users/moody/git/calabash/calabash-ios-server/build/framework/version-tool/Build/Intermediates/calabash.build/Debug/version.build/Objects-normal/x86_64/main.gcda: cannot open: No such file or directory
profiling: /Users/moody/git/calabash/calabash-ios-server/build/framework/version-tool/Build/Intermediates/calabash.build/Debug/version.build/Objects-normal/x86_64/main.gcda: cannot open: No such file or directory
profiling: /Users/moody/git/calabash/calabash-ios-server/build/framework/version-tool/Build/Intermediates/calabash.build/Debug/version.build/Objects-normal/x86_64/main.gcda: cannot open: No such file or directory
(在我从0.14.3
升级到0.16.4
后,我收到了热门文字,在此之前它只会告诉我0.14.3
没有额外的东西)
问题在于:
当我在Xcode和我们的01_launch.rb
从8.4
更新到9.1
的模拟器版本时,我的calabash功能将无法运行。这是我得到的错误:
No device_target was specified and did not detect a connected device. Set a device_target option in the relaunch method. (RuntimeError)
/Users/myname/.calabash/gems/calabash-cucumber-0.14.3/lib/calabash-cucumber/launcher.rb:684:in `default_uia_strategy'
/Users/myname/.calabash/gems/calabash-cucumber-0.14.3/lib/calabash-cucumber/launcher.rb:627:in `relaunch'
/Users/myname/Development/sprayerMobile/SprayMobile/features/support/01_launch.rb:35:in `Before'
Retrying.. Errno::ECONNREFUSED: (Connection refused - connect(2) for "localhost" port 37265 (http://localhost:37265))
Retrying.. Errno::ECONNREFUSED: (Connection refused - connect(2) for "localhost" port 37265 (http://localhost:37265))
Failing... Errno::ECONNREFUSED
Connection refused - connect(2) for "localhost" port 37265 (http://localhost:37265) (Errno::ECONNREFUSED)
/Users/myname/.calabash/gems/httpclient-2.6.0.1/lib/httpclient/session.rb:799:in `initialize'
/Users/myname/.calabash/gems/httpclient-2.6.0.1/lib/httpclient/session.rb:799:in `new'
/Users/myname/.calabash/gems/httpclient-2.6.0.1/lib/httpclient/session.rb:799:in `create_socket'
/Users/myname/.calabash/gems/httpclient-2.6.0.1/lib/httpclient/session.rb:747:in `block in connect'
/Users/myname/.rbenv/versions/2.2.3/lib/ruby/2.2.0/timeout.rb:88:in `block in timeout'
/Users/myname/.rbenv/versions/2.2.3/lib/ruby/2.2.0/timeout.rb:98:in `call'
/Users/myname/.rbenv/versions/2.2.3/lib/ruby/2.2.0/timeout.rb:98:in `timeout'
/Users/myname/.rbenv/versions/2.2.3/lib/ruby/2.2.0/timeout.rb:124:in `timeout'
/Users/myname/.calabash/gems/httpclient-2.6.0.1/lib/httpclient/session.rb:746:in `connect'
/Users/myname/.calabash/gems/httpclient-2.6.0.1/lib/httpclient/session.rb:612:in `query'
/Users/myname/.calabash/gems/httpclient-2.6.0.1/lib/httpclient/session.rb:164:in `query'
/Users/myname/.calabash/gems/httpclient-2.6.0.1/lib/httpclient.rb:1191:in `do_get_block'
/Users/myname/.calabash/gems/httpclient-2.6.0.1/lib/httpclient.rb:974:in `block in do_request'
/Users/myname/.calabash/gems/httpclient-2.6.0.1/lib/httpclient.rb:1082:in `protect_keep_alive_disconnected'
/Users/myname/.calabash/gems/httpclient-2.6.0.1/lib/httpclient.rb:969:in `do_request'
/Users/myname/.calabash/gems/httpclient-2.6.0.1/lib/httpclient.rb:822:in `request'
/Users/myname/.calabash/gems/httpclient-2.6.0.1/lib/httpclient.rb:725:in `post'
/Users/myname/.calabash/gems/calabash-cucumber-0.14.3/lib/calabash-cucumber/http_helpers.rb:57:in `block in make_http_request'
/Users/myname/.calabash/gems/calabash-cucumber-0.14.3/lib/calabash-cucumber/http_helpers.rb:50:in `times'
/Users/myname/.calabash/gems/calabash-cucumber-0.14.3/lib/calabash-cucumber/http_helpers.rb:50:in `make_http_request'
/Users/myname/.calabash/gems/calabash-cucumber-0.14.3/lib/calabash-cucumber/http_helpers.rb:29:in `http'
/Users/myname/.calabash/gems/calabash-cucumber-0.14.3/lib/calabash-cucumber/connection_helpers.rb:11:in `http'
/Users/myname/.calabash/gems/calabash-cucumber-0.14.3/lib/calabash-cucumber/map.rb:71:in `raw_map'
/Users/myname/.calabash/gems/calabash-cucumber-0.14.3/lib/calabash-cucumber/map.rb:23:in `map'
/Users/myname/.calabash/gems/calabash-cucumber-0.14.3/lib/calabash-cucumber/core.rb:112:in `query'
/Users/myname/.calabash/gems/calabash-cucumber-0.14.3/lib/calabash-cucumber/tests_helpers.rb:23:in `element_does_not_exist'
/Users/myname/.calabash/gems/calabash-cucumber-0.14.3/lib/calabash-cucumber/tests_helpers.rb:30:in `element_exists'
/Users/myname/Development/company/Company/features/support/01_launch.rb:43:in `Before'
当我切换回8.4
时,这个错误就消失了。有没有人经历过这个,或者可能知道解决这个问题的方法?对我来说这似乎是一个模拟器问题,因为当我切换回模拟器时,在9.1
我得到了那些错误,8.4
我的功能正常运行...但我的同事放了一些Xcode 7更新了我的代码,因此它可能与他的更新有关...
顺便说一下,如果我升级到0.14.3
,为什么会引用0.16.4
宝石?
*更新
当我在运行功能之前添加DEBUG=1
时,我会收到以下警告:
WARN: deprecated '1.5.0' - Replaced with RunLoop::Xcode
/Users/myname/.calabash/gems/run_loop-1.5.6/lib/run_loop/xctools.rb:183:in `xcode_version_gte_51?'
/Users/myname/.calabash/gems/calabash-cucumber-0.14.3/lib/calabash-cucumber/launcher.rb:490:in `default_launch_method'
/Users/myname/.calabash/gems/calabash-cucumber-0.14.3/lib/calabash-cucumber/launcher.rb:420:in `default_launch_args'
/Users/myname/.calabash/gems/calabash-cucumber-0.14.3/lib/calabash-cucumber/launcher.rb:534:in `relaunch'
/Users/myname/Development/sprayerMobile/SprayMobile/features/support/01_launch.rb:36:in `block in <top (required)>'
WARN: deprecated '1.5.0' - Replaced by RunLoop::Xcode
/Users/myname/.calabash/gems/run_loop-1.5.6/lib/run_loop/sim_control.rb:21:in `xctools'
/Users/myname/.calabash/gems/calabash-cucumber-0.14.3/lib/calabash-cucumber/launcher.rb:666:in `default_uia_strategy'
/Users/myname/.calabash/gems/calabash-cucumber-0.14.3/lib/calabash-cucumber/launcher.rb:627:in `relaunch'
/Users/myname/Development/sprayerMobile/SprayMobile/features/support/01_launch.rb:36:in `block in <top (required)>'
/Users/myname/.calabash/gems/cucumber-1.3.20/lib/cucumber/core_ext/instance_exec.rb:48:in `instance_exec'
WARN: deprecated '1.5.0' - Replaced with RunLoop::Instruments
/Users/myname/.calabash/gems/run_loop-1.5.6/lib/run_loop/xctools.rb:265:in `instruments'
/Users/myname/.calabash/gems/calabash-cucumber-0.14.3/lib/calabash-cucumber/launcher.rb:666:in `default_uia_strategy'
/Users/myname/.calabash/gems/calabash-cucumber-0.14.3/lib/calabash-cucumber/launcher.rb:627:in `relaunch'
/Users/myname/Development/sprayerMobile/SprayMobile/features/support/01_launch.rb:36:in `block in <top (required)>'
/Users/myname/.calabash/gems/cucumber-1.3.20/lib/cucumber/core_ext/instance_exec.rb:48:in `instance_exec'
任何帮助将不胜感激!
答案 0 :(得分:1)
安装新Xcode或移动/重命名Xcode安装后,您需要重新启动计算机。
您的应用中的gem版本(0.14.3)与服务器版本(0.16.4)不匹配。请参阅Updating your Calabash iOS version。
我认为您的运行循环版本与Xcode 7.2不兼容。
如果您没有使用Gemfile,我们建议您开始使用。