-
Notifications
You must be signed in to change notification settings - Fork 9
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
Impossible to use lighthouse-batch-parallel #9
Comments
Is this fix published? I still have the same issue. Steps to reproduce:
FROM justinribeiro/lighthouse
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1
USER root
RUN npm i lighthouse-batch-parallel -g
USER chrome Base image is this one: https://hub.docker.com/r/justinribeiro/lighthouse — it works perfectly for a single page.
And nothing works then:
UPD: Same issue when trying to install from GitHub. Lighthouse itself runs ok using this command |
Hi @bryzgaloff,
You could see that I utilize lighthouse-batch-parallel/worker.js Lines 39 to 41 in b3a913f
and from the document of puppeteer :
In @JulienHeiduk 's case, he used this module on GCP environment, and after he manually did:
the problem is solved. I didn't know if he had any preset on GCP that causes the omission of chromium installation or he also ran it with the docker container. Sry that I didn't test this module on GCP or with Docker before, I would appreciate any of your further feedback. Also, I am not sure about the reason and context for your use of the base image, this module would install the lighthouse module itself: lighthouse-batch-parallel/package.json Lines 20 to 24 in b3a913f
to discuss with your UPD, as I remember, the lighthouse CLI uses the 'chrome-launcher' to find an existing chrome core in your OS. This module with puppeteer would download its own chromium anyway (if you don't set an environment variable to skip it). When I design it, I want to avoid the situation that users don't have any existing chromium on their device. It's a bit complicated for me to think in your scenario. If there is already a workable chromium from your base image, maybe you could find it and try to set it to PUPPETEER_EXECUTABLE_PATH |
@Carr1005 thank you for your reply. I have decided to go with another solution using Lighthouse for CI purposes. But I have tried to use your tool within Docker with no success, here are two attempts that I have made:
Both fail with the following error:
This error can be avoided if |
@bryzgaloff, thanks for your feedback! Seems the well integration with docker is worthy to be done, I'll try it asap. If you are willing to share your dockerfile or related scripts with gist, that would be a big help :) Also if you would still like to give it a last try, I am thinking of adding The first line of the error message just suggests avoiding the installation of puppeteer to avoid the permission problem for making a directory as a destination for download. But we DO want to download it.
There was a thread discussing the same error messages you got while installing puppeteer. TMALSS, I think it's about the behavior with different roles using |
@bryzgaloff, just for your information, I look into the Dockerfile of justinribeiro/lighthouse, you can see that it downloads a Chorme Application for Linux directly: Like I said before, the lighthouse CLI would use 'chorme-launcher' to search for an existing chrome in the file system. So that's why that image can work without the problem we have here. I am still not sure about what you tried to achieve by this:
What I can suggest is you can also follow the pattern of that Dockerfile to download the chrome directly and utilize |
Hi @Carr1005 thank you for extra details. As I have mentioned, I have decided to go with another solution. But still tried yours to help you :) Unfortunately, installing your tool on top of pure
My Idea was to use ready-to-use image with lighthouse (justinribeiro/lighthouse) assuming it has all dependencies properly installed and install your tool on top of that as a simple wrapper. However, looks like that does not work due to some reason. In general, I highly recommend you to put some effort to make your awesome tool work with Docker. Thank you! |
@bryzgaloff, thank you so much for the try! I am sorry that it took your time but didn't help you. I'll make this tool work with docker asap. Again, thanks for pointing out the problems which give me the chance to make this tool better. |
I try to use the package but I have an issue. Have you already had this kind of issue? I am looking for the solution to fix it.
The text was updated successfully, but these errors were encountered: