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

Avoid exception under PhantomJS #110

Closed
wants to merge 1 commit into from

Conversation

aleen42
Copy link

@aleen42 aleen42 commented Jan 25, 2022

Recently, I tried to import web-streams-polyfill and found that we could not define the property name of a function as configurable under PhantomJS. (REF: ariya/phantomjs#13895)

To avoid the exception when testing under PhantomJS, I hope we can add try...catch to wrap them.

@jimmywarting
Copy link

jimmywarting commented Jan 25, 2022

PhantomJS is pretty much dead now.
It's a old headless browser that no real user have ever used and was solo created for developers to automate & scrape stuff.
it don't get any more updates and are now archived/suspended for a long time now

ppl should just stop using it and switch to puppeteer instead.

@aleen42
Copy link
Author

aleen42 commented Jan 25, 2022

OK, it seems better to migrate from PhantomJS to Puppeteer or Microsoft's playwright.

@MattiasBuelens
Copy link
Owner

Yeah, I don't think we should try to support PhantomJS in 2022. Their last release was 6 years ago, see ariya/phantomjs@acded5f.

While adding a try..catch or two might be enough to get it to work today, I can't guarantee that future versions of the polyfill will continue to work. For that, I'd need to set up automated testing for PhantomJS, but I wouldn't be able to re-use the existing Playwright setup for modern browsers from #96. So it'd be a lot of effort for a dead fake browser. 😛

Thanks for investigating though! 🙏

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.

None yet

3 participants