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

PhantomJS fails to run bundle.js in beta15 #349

Closed
n1313 opened this issue Mar 10, 2017 · 15 comments
Closed

PhantomJS fails to run bundle.js in beta15 #349

n1313 opened this issue Mar 10, 2017 · 15 comments
Labels
Milestone

Comments

@n1313
Copy link
Collaborator

n1313 commented Mar 10, 2017

This example https://github.com/ariya/phantomjs/blob/master/examples/rasterize.js when run against a documentation that is generated by beta15 produces a screenshot of a blank template page, and produces a correct screenshot of rendered documentation if it is generated by beta14. I don't see any errors in the output (I've added a page.onConsoleMessage handler and I see my test console.log call). Judging by the time it takes to do so in beta14, the javascript bundle is not executed in beta15 (the rasterize script takes the screenshot immediately and exits, and adding a 20 second timeout doesn't help). I'm using phantomjs 2.1.1 (globally installed, prebuilt).

@n1313
Copy link
Collaborator Author

n1313 commented Mar 10, 2017

This can be reproduced in the rsg repo:

  1. checkout beta14

  2. npm i, npm run compile, npm start

  3. $ phantomjs rasterize.js http://localhost:6060/ output.png
    => good screenshot

  4. checkout latest code from next

  5. npm i, npm run compile, npm start

  6. $ phantomjs rasterize.js http://localhost:6060/ output.png
    => empty page

By repeating this for every commit in beta15 I have found that the problem is introduced by a change somewhere in the recent markdown refactoring commit.

@sapegin
Copy link
Member

sapegin commented Mar 10, 2017

Maybe markdown-to-jsx itself has something that doesn’t work in PhantomJS. This kind of regressions are very annoying. Do you have any ideas how we can test that?

@sapegin sapegin added the bug label Mar 10, 2017
@sapegin sapegin added this to the 5.0.0 milestone Mar 10, 2017
@sapegin
Copy link
Member

sapegin commented Mar 10, 2017

Or maybe it’s includes?

@sapegin
Copy link
Member

sapegin commented Mar 10, 2017

What do you think about eslint-plugin-compat?

@n1313
Copy link
Collaborator Author

n1313 commented Mar 10, 2017

Sorry, I have no clue.

If you want to test compatibility with phantomjs, then you could take screenshots of the docs as a part of the test suite and compare them to a previous state (with backstopjs, for example).

@sapegin
Copy link
Member

sapegin commented Mar 10, 2017

Sounds complicated ;-/ though we already try to run builds with PhantomJS to check if they work.

@n1313
Copy link
Collaborator Author

n1313 commented Mar 10, 2017 via email

@sapegin
Copy link
Member

sapegin commented Mar 10, 2017

It will fail in case of JS error but that’s all it can ;-|

@n1313
Copy link
Collaborator Author

n1313 commented Mar 10, 2017 via email

@sapegin
Copy link
Member

sapegin commented Mar 10, 2017

At least to reduce number of bug reports from you ;-)

@sapegin
Copy link
Member

sapegin commented Mar 10, 2017

OK eslint-plugin-compat is nice to have but it only found fetch in one of examples ;-£

@sapegin
Copy link
Member

sapegin commented Mar 10, 2017

I’ve even tried to add something like Chrome 11 to browserslist ;-?

@sapegin
Copy link
Member

sapegin commented Mar 11, 2017

Yup, it was includes ;-?

sapegin added a commit that referenced this issue Mar 11, 2017
@sapegin sapegin closed this as completed Mar 11, 2017
@n1313
Copy link
Collaborator Author

n1313 commented Mar 13, 2017

I'm afraid phantom-js has its own set of ideas of things worthy of support, and does not match any other "real" browser. I have found it to behave closer to an IE10 or something like that, to be honest.

Thanks for the fix!

@sapegin
Copy link
Member

sapegin commented Mar 15, 2017

Out in 5.0.0-rc.1.

sapegin added a commit that referenced this issue Mar 29, 2017
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

2 participants