Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 254: page loading failed in PhantomJS #169

Closed
gmetais opened this issue Jun 15, 2016 · 9 comments
Closed

Error 254: page loading failed in PhantomJS #169

gmetais opened this issue Jun 15, 2016 · 9 comments

Comments

@gmetais
Copy link
Collaborator

gmetais commented Jun 15, 2016

The Error 254 happens on some website when PhantomJS is not able to open the page, for one of the following reasons:

  • the url is incorrect
  • the url is redirected with JavaScript to another url
  • the server's SSL certificate has a problem
  • other reasons we need to understand...

If you encounter this bug and would like to help finding the cause, please add a comment with the following template:

Webpage URL: http://www.ooshop.com/courses-en-ligne/Home.aspx
Tested device: desktop
Redirection: no
SSL certificate (if https): non applicable
Number of seconds before it crashes: more than 1 minute
Other information that could help debugging:

@gmetais
Copy link
Collaborator Author

gmetais commented Jun 15, 2016

I'm rewriting here an error from #140.

Webpage URL: https://www.americanfunds.com/advisor/
Tested device: desktop
Redirection: yes, a double redirection on this page when the user doesn't have any cookie
SSL certificate (if https): correct and not expired
Number of seconds before it crashes: approx. 30
Other information that could help debugging: ``

My note about the reported bug:

It seems that the test is failing because of a double redirection on this page when the user doesn't have any cookie.

First redirection : https://www.americanfunds.com/advisor/ --> https://www.americanfunds.com/advisor/public/authentication-0.htm?next=/advisor/

Second redirection : https://www.americanfunds.com/advisor/public/authentication-0.htm?next=/advisor/ --> https://www.americanfunds.com/advisor/

Phantomas doesn't like JavaScript redirections. If you can add the right cookie in the options, than it should work.

@ousamabenyounes
Copy link
Contributor

For information,
I got the same issue testing www.free.fr website

@steelfox
Copy link

steelfox commented Oct 25, 2016

Same issue with news.bbc.co.uk

@gmetais
Copy link
Collaborator Author

gmetais commented Oct 27, 2016

Same issue with news.bbc.co.uk

Thank you for reporting the error. I don't have a solution for you, I'm juste writing here what I found.

This is again an issue with redirections, which are badly handled by Phantomas.
On this WebPageTest waterfall we can see: http://www.webpagetest.org/result/161027_A0_2532e2a01759f3710b53142a070061f6/1/details/#waterfall_view_step1
Line 1: http://news.bbc.co.uk/ redirected to http://www.bbc.co.uk/news/
Line 2: http://www.bbc.co.uk/news/ redirected to http://www.bbc.co.uk/news
Line 19: http://www.bbc.co.uk/news redirected to http://www.bbc.com/news

When entering the last URL in YLT, the output is not an error 254 but 255, which is a progress. This error seem to occur when the page is too complex, with a lot of DOM access. PhantomJS runs out of memory and crashes with error 255. It works when I run YLT on my computer, which has more memory.

It looks like there is a massive use of $(window).height() and $(window).scrollTop() during page load and that could break YLT. It's probably a script that handles the lazyloading of images.

Do you work for the BBC? Can you confirm this?

@camlafit
Copy link
Contributor

camlafit commented Dec 7, 2016

Webpage URL: http://preprod.mywebsite (can send access private)
Tested device: desktop
Redirection: no
SSL certificate (if https): non applicable
Number of seconds before it crashes: immediatly
Other information that could help debugging:
Use vagrant package

Website is on Prestashop , prod version is OK. Difference beetween website is (htaccess by IP and cache, minification disabled )

@gmetais
Copy link
Collaborator Author

gmetais commented Dec 8, 2016

Thank you @camlafit. Can you please send me the private access information by email (my address is on my GitHub profile)?

@camlafit
Copy link
Contributor

camlafit commented Dec 8, 2016

Hi
Ok was a mistake on my case :/ I've not correctly set my htaccess authorization.

@uhlhosting
Copy link

Any plans to fix this? I have this with latest patch 1.13.4

@gmetais
Copy link
Collaborator Author

gmetais commented Jan 9, 2021

Should be fixed by #322.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants