Comments (6)
Hm, I'll investigate later today guys... There's a failing example that's great!
from ferrum.
Related #13
from ferrum.
I’m getting this as well on the majority of sites. Only seemed to appear after upgrading from Ferrum 0.7 to 0.8. Didn’t change Chrome version or anything. Rolling back to Ferrum 0.7 fixed it.
Ubuntu Linux 18.04
Chromium 83.0.4093.0
Ruby 2.5.7
Ferrum 0.8
from ferrum.
I fixed Ferrum's code that throws the error, but for cycling objects there's nothing Ferrum can do you have to avoid them so instead of getting all articles
get what you need (content, images inside article, etc) and avoid returning article node because it's cyclic in JS world and cannot be passed to Ruby world.
from ferrum.
I'm porting my thingy from Selenium::Webdriver to Ferrum. It returns lots of nodes from JS but since it returns them in a single object it all becomes CyclicObject
that is impossible to inspect. I edit the cycled?
JS, using JSON.stringify
and currently I suppose it stucks on some injectedScript
that is probably by Ferrum itself and is recursive. Very hard to tell.
I'm debugging it for two days already. I wish there was CyclicReference
instead of CyclicObject
, similar to how Ruby's inspection works. Looks like the problem is that JS traversing and Ruby traversing are different processes. JS is capable to detect cycle but this information is needed in Ruby. Also the reduce_props
looks overcomplicated.
from ferrum.
Maybe my issue will be gone if somehow avoid returning the:
["object",
{"opener"=>nil,
"length"=>0,
"closed"=>false,
"location"=>
{"href"=>"https://www.google.com/",
thing that I don't even understand where it comes from into the object I return. I return a {...}
that I create on fly and so it can't be referred inside but somehow it is. Also if I dump the google.com page to a file and open it the issue does not happen. There is only one div on google.com page that causes it.
UPD: maybe it's because of jsaction
? Here is the output of:
[node.outerHTML, JSON.stringify(node, getCircularReplacer())];
This thing is invisible to outerHTML
but is visible to Ferrum's serializer. I think it is the cause of cycles.
UPD: ok, it's just a JS library https://github.com/google/jsaction that causes this:
effectively making Ferrum unable to serialize this node from JS to Ruby too because it gets replaced with CyclicObject
.
from ferrum.
Related Issues (20)
- Send Emulation commands to Page HOT 1
- Ferrum::BinaryNotFoundError when using docker for chrome HOT 1
- Can I allow Page.go_to take additional wait parameter?
- Cannot call `exit` from within `.on()` blocks HOT 2
- Exceptions within `.on()` blocks are mysteriously ignored HOT 1
- Browser start fails with JRuby on Windows
- Chrome error: "Unable to create temporary file" on Windows with JRuby HOT 1
- Errno::ECONNREFUSED on browser initialization HOT 3
- Headless new gives Ferrum::NoSuchPageError on screenshot HOT 2
- consider using === in network blacklist matching
- Doesn't work on ruby 3.2 HOT 1
- Saving via browser.mhtml and via cmd+S differs a lot on Youtube HOT 3
- Network.loadingFailed error preventing file from downloading HOT 13
- Conditionally Render Page header and footer template HOT 2
- browser.quit doesn't close session HOT 6
- Include type and stackTrace in logging for console API
- `wait_for_network_idle` failing due to pending requests on previous page HOT 1
- Remove `disable-gpu`default flag for Apple Silicon HOT 3
- authenticate current_user in ferrum browser
- Hang/Timeout in dialog HOT 9
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 ferrum.