3

I am getting Net::ReadTimeout error when using visit methods in a cucumber feature. Unfortunately, I am not able to reproduce this issue on my local system, it only intermittently fail on semaphore. We are using 20 parallel threads in semaphore. The weired thing is I can see the screen shot of the page using capybara screenshot but still get the timeout error

Here is the test

RSpec.feature do
  step 'that I have created a questionnaire' do
    safe_visit '/somesite' # getting error on this line sometime
    fill_in 'name', with: 'punit'
  end
end

We are using rutabaga which is wrapper over turnip gem and allow to run features as rspecs.

What I have already tried (and did not work):

  1. Increase timeout to 120 and retries Net::ReadTimeout (Net::ReadTimeout) Selenium Ruby
  2. Add the selenium driver desired capabilities Getting Net::ReadTimeout: visiting a website in Ruby Capybara Cucumber

NOTE: Please dont mark this as a duplicate of any other question because I have done a lot of search for quite a few days and then posted this question. Also one key difference in my issue is it is flakey and only happened rarely.

Please let me know in comment if I need any more info is needed.

punitcse
  • 717
  • 7
  • 27
  • I have a similar problem ... timeout appears to happen after ~10 minutes since the webdriver is connected. Do you observe similar pattern? – L.R. Oct 30 '20 at 08:01
  • 1
    I realise this is quite old now, but are you familiar with this? https://docs.semaphoreci.com/essentials/debugging-with-ssh-access/ To start with I would try this, if it fails, look at the Rails log and see how long the request is taking to respond. If it succeeds, run it over and over, something like ``for i in `seq 1 100`; do ; done`` – matthew.tuck Jun 04 '21 at 06:05

0 Answers0