Coder Social home page Coder Social logo

Comments (5)

gmetais avatar gmetais commented on June 20, 2024

There is a true problem with this kind of errors, only happening in PhantomJS and not on real browsers.
In this case, it's not the fault of the webpage, so YLT shouldn't give it a bad score.

The problem is, we can't detect if the error comes from PhantomJS. For this reason, I don't think adding a threshold is a solution. What if it's a webpage with many real errors? What if a SPA fails with only 1 error?

Detecting a white screen could be a solution, but even SPAs rarely fail on a completely white screen. Any other idea?

By the way, what MVC framework do you use?

from yellowlabtools.

stephanebachelier avatar stephanebachelier commented on June 20, 2024

@gmetais thanks for your comment. Indeed errors are only occuring in PhantomJS.

I've tested with 3 differents projects which are Single Page Application and all of them fail with white screen and at least one JS error. One is currently supporting old browsers and it is tested with PhantomJS, and served with https.

Is it possible to tweak some parameters like a timeout ?

For the score I would argue that a failure should not give a score at all, as lots of results are based on partial page loading, like the number of DOM elements, etc. But it's not about yellowlab.tools and more a PhantomJS issue or related to its configuration.

What do you think ?

from yellowlabtools.

gmetais avatar gmetais commented on June 20, 2024

Good morning Stephane :)

I've tested with 3 differents projects which are Single Page Application and all of them fail with white screen and at least one JS error.

I'm not very confident about coding a white image detector, not sure it is as easy as it seems... Do you have time to dig into this?

One is currently supporting old browsers and it is tested with PhantomJS, and served with https.

PhantomJS 2 should fix many of these JS errors. The "function.prototype.bind" error at least (ariya/phantomjs#10522). It's going to be implemented soon in Phantomas, than YLT.

What version of PhantomJS are you using for testing your project?

Is it possible to tweak some parameters like a timeout ?

Not sure I understand. Is it about making Phantomas wait a little more so your apps have enough time to retrieve the Ajax data?

For the score I would argue that a failure should not give a score at all, as lots of results are based on partial page loading, like the number of DOM elements, etc.

I agree with that if we have a reliable way to detect a failure.

from yellowlabtools.

stephanebachelier avatar stephanebachelier commented on June 20, 2024

@gmetais Good morning :)

Not sure about a white image detector too. It's clearly not an easy task. I'll need to dig into your codebase.

I know about the function.prototype.bind not supported by PhantomJS 1.9.x, which means no es5, or adding a polyfill for running in PhantomJS.

The project which is tested with PhantomJS is written in es4 and it works but with longer timeout to avoid PhantomJS returning an error. The JS errors shown into YellowLab are more about undefined function, which I think are scripts not fully downloaded.

from yellowlabtools.

stephanebachelier avatar stephanebachelier commented on June 20, 2024

@gmetais closing this issue. Maybe create another issue when a better idea will emerge :)

from yellowlabtools.

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.