Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Querying webviews results in timeouts - AKA NSLog output can cause apps to become unresponsive. #550

Closed
renatorodrigues opened this issue Oct 9, 2014 · 10 comments

Comments

@renatorodrigues
Copy link

I'm using Calabash 0.11.0 and testing on the iPad Retina 8.0 simulator and most of my tests that perform queries on webviews are returning the following error:
Retrying.. HTTPClient::ReceiveTimeoutError: (execution expired)

Any idea of what is causing this?

@jmoody
Copy link
Contributor

jmoody commented Oct 9, 2014

We need more information. Can you provide the queries you are trying? A sample app? Maybe some screenshots?

@nfrydenholm
Copy link

@renatorodrigues is it similar to what I've written about here https://groups.google.com/forum/#!searchin/calabash-ios/css/calabash-ios/e5QAtyf30aA/ezPmpk-PeD8J

Does all queries fail, or just "*" and "p" like I have discovered so far. I haven't dived more into it, since I was lucky enough to work around it for the moment. @krukow has tried to reproduce using "my" html without luck.

@axhossain
Copy link

I am also getting timeout, not sure if this is related to this same case...

Feature: Ensure Case Conversation actions

Scenario: Add a note to case # features/case_conversation.feature:3
Given I am signed into the application # features/step_definitions/generic_steps.rb:11
Timeout waiting for elements: UIWebView css:'.nomargin-bottom' (Calabash::Cucumber::WaitHelpers::WaitError)
./features/step_definitions/generic_steps.rb:20:in /^I am signed into the application$/' features/case_conversation.feature:4:inGiven I am signed into the application'
And I go to the conversation view of a case # features/step_definitions/case_detail_steps.rb:1
Then I should be able to add a note to the case # features/step_definitions/case_conversation_steps.rb:1
Couldn't find the Menu button (Calabash::Cucumber::WaitHelpers::WaitError)
/Users/ahossain/.rvm/gems/ruby-2.1.2/gems/calabash-cucumber-0.11.0/lib/calabash-cucumber/wait_helpers.rb:404:in screenshot_and_retry' /Users/ahossain/.rvm/gems/ruby-2.1.2/gems/calabash-cucumber-0.11.0/lib/calabash-cucumber/wait_helpers.rb:111:inrescue in wait_for'
/Users/ahossain/.rvm/gems/ruby-2.1.2/gems/calabash-cucumber-0.11.0/lib/calabash-cucumber/wait_helpers.rb:102:in wait_for' /Users/ahossain/.rvm/gems/ruby-2.1.2/gems/calabash-cucumber-0.11.0/lib/calabash-cucumber/wait_helpers.rb:156:inwait_poll'
/Users/ahossain/Desktop/github/Regression-suite/features/ios/pages/case_filter_screen.rb:40:in find_menu_icon' /Users/ahossain/Desktop/github/Regression-suite/features/step_definitions/login_steps.rb:79:in/^I log out of the app$/'
/Users/ahossain/.rvm/gems/ruby-2.1.2/gems/cucumber-1.3.17/lib/cucumber/core_ext/instance_exec.rb:36:in cucumber_instance_exec' /Users/ahossain/.rvm/gems/ruby-2.1.2/gems/cucumber-1.3.17/lib/cucumber/rb_support/rb_step_definition.rb:97:ininvoke'
/Users/ahossain/.rvm/gems/ruby-2.1.2/gems/cucumber-1.3.17/lib/cucumber/step_match.rb:25:in invoke' /Users/ahossain/.rvm/gems/ruby-2.1.2/gems/cucumber-1.3.17/lib/cucumber/runtime/support_code.rb:60:ininvoke'
/Users/ahossain/.rvm/gems/ruby-2.1.2/gems/cucumber-1.3.17/lib/cucumber/rb_support/rb_world.rb:52:in step' /Users/ahossain/Desktop/github/Regression-suite/features/support/global_hooks.rb:2:inAfter'

@krukow
Copy link
Contributor

krukow commented Nov 7, 2014

I've now been able to reproduce this in the WordPress app: https://github.com/calabash/x-platform-example

@krukow
Copy link
Contributor

krukow commented Nov 9, 2014

@renatorodrigues @nfrydenholm this was fixed in WordPress with server version 0.11.4. Could you confirm?

@krukow
Copy link
Contributor

krukow commented Nov 27, 2014

Some details about this.

With Xcode 6.1 (and the corresponding version of instruments and UIAutomation), a bug has been introduced by Apple which only occurs if the app is being automated using UIAutomation (which Calabash uses under the hood).

It's a really nasty one too: If the application logs too much information the UIAutomation process (and app) will freeze.

By default Calabash would log certain data using NSLog when using webView queries (e.g. webView css:'a') this would sometimes cause the app to lock up because of this bug.

With release 0.11.5.pre2 this logging has been removed. That's why they were able to proceed with this build.

Could you try updating to this version?

One key thing to note: This might still occur if the Application happens to log too much data using the NSLog facility. So if they encounter this again, they should look at what the application logs.

@jmoody
Copy link
Contributor

jmoody commented Mar 27, 2015

@jmoody jmoody closed this as completed Mar 27, 2015
@jmoody jmoody changed the title Querying webviews results in timeouts Querying webviews results in timeouts - AKA NSLog output can cause apps to become unresponsive. Mar 27, 2015
@skhanam
Copy link

skhanam commented Apr 12, 2016

hi there,
am seeing the timeout errors its not even the web view its native

@sanity @reinstall
Scenario: Obtaining more information # features/01signin.feature:5
Given I am on the first experience screen # features/step_definitions/signin_steps.rb:1
Timeout waiting for elements: (Calabash::Cucumber::WaitHelpers::WaitError)
./features/step_definitions/signin_steps.rb:3:in /^I am on the first experience screen$/' features/01signin.feature:6:inGiven I am on the first experience screen'

am on Xcode 7.3 iOS 9.3 calabash 0.18.2 can someone tell why am encountering this issue

@jmoody
Copy link
Contributor

jmoody commented Apr 12, 2016

@skhanam

am seeing the timeout errors its not even the web view its native

Why did you post this here? The title of the issue is WebView. How is this related to your app, which is native? This issue is also closed and nearly a year old.

Please post your question on Stack Overflow or one the Calabash iOS forum.

Include more details in your post. We have to see the step definition - the short answer to your question is that view you are waiting for is not visible.

@skhanam
Copy link

skhanam commented Apr 12, 2016

@jmoody i stumbled upon this issue while searching for similar issues. hence posted. i think it would be worth disabling comments .. have brought it up on forums. hope to see a reply from experts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants