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

Fix timeout error for requests blocked by phantomjs #217

Merged
merged 4 commits into from
Jan 18, 2014
Merged

Fix timeout error for requests blocked by phantomjs #217

merged 4 commits into from
Jan 18, 2014

Conversation

stefanjudis
Copy link
Contributor

For this page I noticed the behaviour of constant failing of phantomas.

The reason was, that phantomjs blocks one request and phantomas never counts this request as done.
Result is constant timeout failing.

Referenced issue: stefanjudis/grunt-phantomas#21

@ghost ghost assigned macbre Jan 18, 2014
if (entry.isBlocked) {
return;
} else {
phantomas.emit('abort', entry, res);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's worth logging this failed request details for debugging purposes as this can indicate problems on PhantomJS side or on the server.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed.
Shall I investigate a bit more or do you want do it yourself?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stefanjudis: please add logging of request URL.

I assume that this issue can be reproduced by:

phantomas --url http://www.nicola-zanon.com/

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, just tested on the URL above. Works fine, no timeouts (using PhantomJS v1.9.2 / the latest phantomas dev version). Can you post stderr when running in --verbose mode on Gist?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@macbre
Copy link
Owner

macbre commented Jan 18, 2014

👍

macbre added a commit that referenced this pull request Jan 18, 2014
Fix timeout error for requests blocked by phantomjs
@macbre macbre merged commit 1b0e044 into macbre:master Jan 18, 2014
@macbre
Copy link
Owner

macbre commented Jan 19, 2014

This fix does not work well with base64 encoded data:

Blocked request by phantomjs: <data:image/png;base64,iVBORw0...>

Will fix it as a part of #216

@stefanjudis
Copy link
Contributor Author

👍

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

Successfully merging this pull request may close these issues.

2 participants