Comments (12)
@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.
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.
@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.
Hi @TemaMix do you use windows too?
from cuprite.
@route Nope, I have launched it inside Mac OS or Linux inside Docker.
from cuprite.
I just merged one fix related to this issue, could you try using cuprite from master? Does it resolve the issue?
from cuprite.
@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.
What browser version do you use? I've never seen it failing that constantly ;)
from cuprite.
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.
@TemaMix just out of curiosity did you try Chromium or other versions?
from cuprite.
@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.
@TemaMix no problem, glad it worked!
from cuprite.
Related Issues (20)
- ReferenceError: _cuprite is not defined HOT 7
- Cuprite.scrollIntoViewport does not properly handle elements hidden by overlays HOT 1
- How to use Cuprite with a remote browser (browserless/chrome) HOT 1
- BUG: select actions does not trigger "input" events (only "change" event) on select inputs/dropdowns
- Proxy does not get set
- How do I debug the behavior of this gem?
- Cuprite does not appear to support `evaluate_script` HOT 1
- Setting a color input doesn't fire the change or input events
- Process forking causing cuprite/ferrum to never exit HOT 1
- 500 error, possibly related to web sockets with Ferrum
- Race condition leading to `Argument should belong to the same JavaScript world as target object` HOT 2
- What the best way to play with multiple/new windows or tabs? HOT 1
- fill_in with empty string does not call addEventListener('input') HOT 1
- Visibility issue upon replacing hidden nodes (Race condition)
- keydown event sent without key property HOT 5
- Obsolete nodes are not refreshed when using Capybara's #within and/or #synchronize HOT 2
- Release that references ferrum 0.14.0
- Scraping Blocked on Indeed Site HOT 1
- Capybara::Cuprite::InvalidSelector
- Loading all JS files from asset pipeline and packs folder for testing with capybara/rspec
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cuprite.