3

I am encountering "stack level too deep (SystemStackError) " error each time an assertion is failing, no matter what is the actual :timeout_message

The following examples of code are just two of the many ones that rises above mentioned error each time an assertion is failing:

 def wait_and_touch(element)
    when_element_exists(element, :timeout => 10, :timeout_message => "[#{element}] element was not identified")
  end

  def check_user_message(usr)
    usr_array = usr.gsub(",", " ").split
    usr_array.each do |item|
      f_name = @test_data.get_first_name(item)
      wait_for(:timeout => 5, :timeout_message => "[FAIL] The message from #{f_name} should be displayed as unread!") {
        query(panel_1_msg_cell + " descendant view {text CONTAINS '#{f_name}'}", :font).first.include? 'Roboto-Black' }
    end
  end

I am currently using calabash -v 0.20.0 version with ruby-2.3.1 [ x86_64 ], OS X El Capitan, -v 10.11.6

Any idea why is this happening?

Thank you

Razvan
  • 33
  • 4
  • 1
    Please provide a stack trace or just a snippet of one. I think the overflow is due to the `embed` method being called too many times. – jmoody Nov 02 '16 at 09:08

1 Answers1

2

I believe you are calling include Calabash::Cucumber::Operations somewhere. You should not need to include Operations anywhere in your code.

jmoody
  • 2,480
  • 1
  • 16
  • 22
  • Update: @jmoody, you were right, by removing `include Calabash::Cucumber::Operations` from some pages, the error is no longer happening. Thanks a lot, it really helped me. – Razvan Nov 08 '16 at 20:20