Giter VIP home page Giter VIP logo

Comments (9)

route avatar route commented on May 13, 2024

Yea that's weird, do you js_errors: true set?

from cuprite.

sfcgeorge avatar sfcgeorge commented on May 13, 2024

Yep that's what I mean, I get this issue with js_errors: true, with js_errors: false the spec passes fine. Or with the rescue it passes as well.

As it's just 1 page it could be something specific to our app, but I thought I'd open the issue in case anyone else gets the same error and googles it.

from cuprite.

ximus avatar ximus commented on May 13, 2024

i think i had such a cryptic mutex error myself. I had tracked it down. The issue for me occurred when the page took longer to load than the cuprite timeout configured, then it would throw such an error.

It's a little far for me to remember well, but I had reproduced it by create a fresh rails app, then putting an infinite sleep in a controller action then trying to load that action using cuprite.

from cuprite.

route avatar route commented on May 13, 2024

@ximus mind creating a repo so I could take a look?

from cuprite.

ximus avatar ximus commented on May 13, 2024

https://github.com/ximus/cuprite-mutex-error-poc

from cuprite.

route avatar route commented on May 13, 2024

@ximus @sfcgeorge I removed all possible deadlocks in the last release. Code is no longer uses plain Ruby mutex and condition var, we now use concurrent-ruby primitives, more over there's always timeout (5 seconds by default) for slow responses. Could you guys please check again that massive refactoring?

from cuprite.

route avatar route commented on May 13, 2024

@ximus I ran your application locally and it worked fine on both my machines:

Failures:

  1) test test
     Failure/Error: visit root_path
     
     Capybara::Cuprite::JavaScriptError:
       Error: foo error
           at HTMLDocument.<anonymous> (http://127.0.0.1:33605/:16:11)
     # ./spec/features/test_spec.rb:5:in `block (2 levels) in <top (required)>'

Finished in 6.37 seconds (files took 0.40761 seconds to load)
1 example, 1 failure

Failed examples:

rspec ./spec/features/test_spec.rb:4 # test test

Mutex was fully eliminated from cuprite, if you guys could check that this error doesn't exist anymore I would appreciate it. Thanks!

from cuprite.

ximus avatar ximus commented on May 13, 2024

confirmed that toggling from 0.6.0 to 0.7.0 does fix the error. I know get:

1) test test
     Failure/Error: visit root_path

     Ferrum::TimeoutError:
       Timed out waiting for response. It's possible that this happened because something took a very long time (for example a page load was slow). If so, setting the :timeout option to a higher value might help.
     # ./spec/features/test_spec.rb:5:in `block (2 levels) in <top (required)>'

interesting note. I initially wasn't able to reproduce this. Then I tried downgrading to the ruby version I used during my initial POC. Turns out I can't reproduce the original error at ruby 2.6.3 but only when i used 2.5.1. Anyways, irrelevant now that mutexes are gone.

from cuprite.

route avatar route commented on May 13, 2024

Thanks I'm glad it worked!

from cuprite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.