Git Product home page Git Product logo

Comments (12)

route avatar route commented on July 24, 2024

@niezbop That's very rare intermittent issue, which is not possible by all means. I couldn't catch it locally but if you could catch it with CUPRITE_DEBUG=true env turned on it would be great, because Chrome should return at least one default target. Looks like race condition in Chrome.

from cuprite.

route avatar route commented on July 24, 2024

I think I'm gonna close it for now as it doesn't look like an issue in cuprite, though if you catch it especially with debug option again please submit the log file. Thank you!

from cuprite.

TemaMix avatar TemaMix commented on July 24, 2024

@route I wonder if you could possibly help me or give some advice. It seems I have a similar issue with a gem is based on the cuprite 0.6.0. And I have some tests where this issue appears regularly. When I run this with CUPRITE_DEBUG=true I have got the following result:

$ CUPRITE_DEBUG=true bundle exec rspec --seed 123  ./spec/browser_crawler_spec.rb
  with max_pages option specified
I, [2019-05-26T11:30:18.377566 #68999]  INFO -- : Visiting http://127.0.0.1:51081


>>> {"method":"Target.getTargets","params":{},"id":1}
    <<< {"id":1,"result":{"targetInfos":[]}}


>>> {"method":"Target.getTargets","params":{},"id":2}
    <<< {"id":2,"result":{"targetInfos":[]}}
F, [2019-05-26T11:30:18.645286 #68999] FATAL -- : undefined method `first' for nil:NilClass 
F, [2019-05-26T11:18:00.013574 #68930] FATAL -- : undefined method `first' for nil:NilClass 
ruby-2.6.1/gems/cuprite-0.6.0/lib/capybara/cuprite/browser/targets.rb:9:in `initialize'
ruby-2.6.1/gems/cuprite-0.6.0/lib/capybara/cuprite/browser.rb:241:in `new'
ruby-2.6.1/gems/cuprite-0.6.0/lib/capybara/cuprite/browser.rb:241:in `targets'
ruby-2.6.1/lib/ruby/2.6.0/forwardable.rb:224:in `page'
ruby-2.6.1/lib/ruby/2.6.0/forwardable.rb:224:in `visit'
ruby-2.6.1/gems/cuprite-0.6.0/lib/capybara/cuprite/driver.rb:31:in `visit' 

/spec/browser_crawler_spec.rb:49

Maybe, I do something wrong, but such errors appear constantly.
If you have time you can take a look at the code here and also take a look at the failed spec file here.

I hope it helps you find a solution.

Please let me know if you have other questions or concerns. Thank you!

from cuprite.

route avatar route commented on July 24, 2024

Hi @TemaMix do you use windows too?

from cuprite.

TemaMix avatar TemaMix commented on July 24, 2024

@route Nope, I have launched it inside Mac OS or Linux inside Docker.

from cuprite.

route avatar route commented on July 24, 2024

I just merged one fix related to this issue, could you try using cuprite from master? Does it resolve the issue?

from cuprite.

TemaMix avatar TemaMix commented on July 24, 2024

@route, Thank you for your rapidly answer.
I rerun tests from cuprite (master). However, the previous error is disappeared, but another error has appeared:

>>> {"method":"Target.getTargets","params":{},"id":4}
    <<< {"id":4,"result":{"targetInfos":[]}}
F, [2019-06-03T22:45:55.219225 #87709] FATAL -- : No target browser available 
 /Users/artemrumiantcev/.rvm/gems/ruby-2.6.1/bundler/gems/cuprite-8bde777fa687/lib/capybara/cuprite/browser/targets.rb:118:in `targets'
/Users/artemrumiantcev/.rvm/gems/ruby-2.6.1/bundler/gems/cuprite-8bde777fa687/lib/capybara/cuprite/browser/targets.rb:13:in `initialize'
/Users/artemrumiantcev/.rvm/gems/ruby-2.6.1/bundler/gems/cuprite-8bde777fa687/lib/capybara/cuprite/browser.rb:241:in `new'
/Users/artemrumiantcev/.rvm/gems/ruby-2.6.1/bundler/gems/cuprite-8bde777fa687/lib/capybara/cuprite/browser.rb:241:in `targets'
/Users/artemrumiantcev/.rvm/rubies/ruby-2.6.1/lib/ruby/2.6.0/forwardable.rb:224:in `page'
/Users/artemrumiantcev/.rvm/rubies/ruby-2.6.1/lib/ruby/2.6.0/forwardable.rb:224:in `visit'
/Users/artemrumiantcev/.rvm/gems/ruby-2.6.1/bundler/gems/cuprite-8bde777fa687/lib/capybara/cuprite/driver.rb:31:in `visit'
/Users/artemrumiantcev/.rvm/gems/ruby-2.6.1/gems/capybara-3.22.0/lib/capybara/session.rb:276:in `visit'

from cuprite.

route avatar route commented on July 24, 2024

What browser version do you use? I've never seen it failing that constantly ;)

from cuprite.

TemaMix avatar TemaMix commented on July 24, 2024

I use Chrome with Version 74.0.3729.169 (Official Build) (64-bit). I have seen a capybara issue regarding Chrome 74 (teamcapybara/capybara#2181) and rerun tests with these options: --enable-features=NetworkService,NetworkServiceInProcess, but errors are the same.

from cuprite.

route avatar route commented on July 24, 2024

@TemaMix just out of curiosity did you try Chromium or other versions?

from cuprite.

TemaMix avatar TemaMix commented on July 24, 2024

@route Thank you for your advice. It is worked! Hm, I will wait for the next Chrome version if it is one way.

from cuprite.

route avatar route commented on July 24, 2024

@TemaMix no problem, 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.