vbauer / manet

Website screenshot service powered by Node.js, SlimerJS and PhantomJS
MIT License
576 stars 102 forks source link

Screenshot of Angularjs app has no async content #62

Open tkalfigo opened 8 years ago

tkalfigo commented 8 years ago

Same situation as in closed issue https://github.com/vbauer/manet/issues/34

It is an AngularJs app that uses C3js to build SVG charts. The page has no errors when loading on the browser. Tried both phantomjs and phantomjs2 (with 2 the delay option doesn't seem to by applied).

In the screenshot I see the basic layout (static assets) of the page, but not the dynamic/async content. Neither the angular rendered parts, nor the generated SVGs are present in the screenshot.

Tried with large delays (20000) even though the page normally loads in low single digit seconds. No luck either.

vbauer commented 8 years ago

@tkalfigo Could you please provide an example of URL to Manet server which I can test? Did you make tests on some public sites (or it is your internal project)?

tkalfigo commented 8 years ago

@vbauer Unfortunately it's an internal project. I run manet in debug mode though. Is there some part of that output that could be useful to you?

tkalfigo commented 8 years ago

Anyone facing the same issue? Any feedback?

vbauer commented 8 years ago

@tkalfigo Did you find something interesting? I tried to reproduce this problem on the following AngularJS application - http://todomvc.com/examples/angularjs, but everything looked fine.

Example: https://manet.herokuapp.com/?url=http%3A%2F%2Ftodomvc.com%2Fexamples%2Fangularjs%2F%23%2F

tkalfigo commented 8 years ago

Nope. No luck. Moved on to another solution using Xvfb + Chromium which works fine for now.

LorenzoBoccaccia commented 7 years ago

you can use a delay option to give the page enough time or use the selector option and wait for element to exist. I'm adding a 'complete' class to the body to signal the page is consistent, so use body.complete as selector and works fine