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

Add puppeteer to whitelist #41

Open
sungshon opened this issue Oct 11, 2019 · 4 comments
Open

Add puppeteer to whitelist #41

sungshon opened this issue Oct 11, 2019 · 4 comments
Labels
enhancement New feature or request maybe

Comments

@sungshon
Copy link
Owner

I would love to make puppeteer available to add-on devs, instead of the horrible little phantomjs module that is currently available.

I'll just write my thoughts about this here until I get to a point where this is actually doable.

Why move away from phantomjs?

  • it's old, abandoned and doesn't work efficiently on all sites
  • does not support ES 5/6 (although we have logic that adds a shim for them if polyfill is set to true

Why did we even use it in the first place then?

  • because the phantomjs binary is 40-50mb, while the bundled chromium of puppeteer is a staggering 300mb
  • because it still works in many scenarios

What would be the solution to this mess?

The solution would be to use prebuilt chromium binaries that were built with headless_shell. This would (hopefully) drastically reduce it's size.

But puppeteer has no setting to get headless_shell prebuilts, and building chromium myself for all OSs would most probably be a hellish task, not to mention the fact that it would not be trustworthy, it should be gotten from an official source.

One issue thread seems to suggest there are official headless_shell builds, example:
https://storage.googleapis.com/chromium-browser-snapshots/Linux_x64/583214/headless-shell.zip

Related issues on puppeteer:
puppeteer/puppeteer#3155
puppeteer/puppeteer#3140
puppeteer/puppeteer#3027
puppeteer/puppeteer#500

@sungshon sungshon added the enhancement New feature or request label Oct 11, 2019
@sungshon
Copy link
Owner Author

sungshon commented Feb 7, 2020

Adding puppeteer will cause the same issues that phantomjs is currently causing for Android:
#51

So I'll probably drop this ticket soon.

@sungshon sungshon added the maybe label Feb 7, 2020
@sungshon
Copy link
Owner Author

sungshon commented Feb 14, 2020

An update on this:

The solution would be to use prebuilt chromium binaries that were built with headless_shell. This would (hopefully) drastically reduce it's size.

Puppeteer currently uses Chromium revision 722234, and headless_shell only has prebuilts for Linux. So using the headless build is still not a solution, and probably won't be a solution for the near future either.

Chromium prebuilt links:

@sungshon
Copy link
Owner Author

I've changed my mind, will try to replace phantomjs with puppeteer.

Check this comment for details: #51 (comment)

@sungshon
Copy link
Owner Author

I've changed my mind again, we can't reproduce the puppeteer API to work remotely efficiently. So I won't add puppeteer to PimpMyStremio, but will leave this ticket open for now in case things change again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request maybe
Projects
None yet
Development

No branches or pull requests

1 participant