calabash / calabash-ios

Calabash for iOS
Other
1.81k stars 369 forks source link

calabash iOS console queries working only for localhost server #1266

Closed bansalvarsha closed 7 years ago

bansalvarsha commented 7 years ago

Hi Folks,

I am facing an issue is that when I try to view queries from calabash ios console, it shows me an error

calabash-ios 0.20.4> query("view") Retrying.. Errno::ECONNREFUSED: (Connection refused - connect(2) for "127.0.0.1" port 37265 (127.0.0.1:37265)) Retrying.. Errno::ECONNREFUSED: (Connection refused - connect(2) for "127.0.0.1" port 37265 (127.0.0.1:37265)) Failing... Errno::ECONNREFUSED Errno::ECONNREFUSED: Connection refused - connect(2) for "127.0.0.1" port 37265 (127.0.0.1:37265) from /Users/admin/.calabash/sandbox/Gems/gems/httpclient-2.8.2.3/lib/httpclient/session.rb:604:in initialize' from /Users/admin/.calabash/sandbox/Gems/gems/httpclient-2.8.2.3/lib/httpclient/session.rb:604:innew' from /Users/admin/.calabash/sandbox/Gems/gems/httpclient-2.8.2.3/lib/httpclient/session.rb:604:in create_socket' from /Users/admin/.calabash/sandbox/Gems/gems/httpclient-2.8.2.3/lib/httpclient/session.rb:749:inblock in connect' from /Users/admin/.calabash/sandbox/Rubies/2.1.6-p336/lib/ruby/2.1.0/timeout.rb:91:in block in timeout' from /Users/admin/.calabash/sandbox/Rubies/2.1.6-p336/lib/ruby/2.1.0/timeout.rb:101:incall' from /Users/admin/.calabash/sandbox/Rubies/2.1.6-p336/lib/ruby/2.1.0/timeout.rb:101:in timeout' from /Users/admin/.calabash/sandbox/Gems/gems/httpclient-2.8.2.3/lib/httpclient/session.rb:742:inconnect' from /Users/admin/.calabash/sandbox/Gems/gems/httpclient-2.8.2.3/lib/httpclient/session.rb:504:in query' from /Users/admin/.calabash/sandbox/Gems/gems/httpclient-2.8.2.3/lib/httpclient/session.rb:174:inquery' from /Users/admin/.calabash/sandbox/Gems/gems/httpclient-2.8.2.3/lib/httpclient.rb:1240:in do_get_block' from /Users/admin/.calabash/sandbox/Gems/gems/httpclient-2.8.2.3/lib/httpclient.rb:1017:inblock in do_request' from /Users/admin/.calabash/sandbox/Gems/gems/httpclient-2.8.2.3/lib/httpclient.rb:1131:in protect_keep_alive_disconnected' from /Users/admin/.calabash/sandbox/Gems/gems/httpclient-2.8.2.3/lib/httpclient.rb:1012:indo_request' from /Users/admin/.calabash/sandbox/Gems/gems/httpclient-2.8.2.3/lib/httpclient.rb:854:in request' from /Users/admin/.calabash/sandbox/Gems/gems/httpclient-2.8.2.3/lib/httpclient.rb:763:inpost' from /Users/admin/.calabash/sandbox/Gems/gems/calabash-cucumber-0.20.4/lib/calabash-cucumber/http_helpers.rb:64:in block in make_http_request' from /Users/admin/.calabash/sandbox/Gems/gems/calabash-cucumber-0.20.4/lib/calabash-cucumber/http_helpers.rb:57:intimes' from /Users/admin/.calabash/sandbox/Gems/gems/calabash-cucumber-0.20.4/lib/calabash-cucumber/http_helpers.rb:57:in make_http_request' from /Users/admin/.calabash/sandbox/Gems/gems/calabash-cucumber-0.20.4/lib/calabash-cucumber/http_helpers.rb:33:inhttp' from /Users/admin/.calabash/sandbox/Gems/gems/calabash-cucumber-0.20.4/lib/calabash-cucumber/map.rb:88:in raw_map' from /Users/admin/.calabash/sandbox/Gems/gems/calabash-cucumber-0.20.4/lib/calabash-cucumber/map.rb:58:inmap' from /Users/admin/.calabash/sandbox/Gems/gems/calabash-cucumber-0.20.4/lib/calabash-cucumber/core.rb:149:in `query' from (irb):3 calabash-ios 0.20.4>

My project is connected with a iphone device. Is it possible to queries from a device. it is working while project is running with a simulator but not with a real device.

Can anyone solve my query?

Thanks in advance

bansalvarsha commented 7 years ago

@jmoody, @jonasmaturana can you please look into this

bansalvarsha commented 7 years ago

got the solution to use calabash console as $DEVICE_TARGET= DEVICE_ENDPOINT=http://:37265 BUNDLE_ID= calabash-iso console