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
[PCR] ERROR: Failed to download Chromium after retry 3 times. #10
Comments
Just roll back puppeteer-core to the previous version 19.7.3 works well, guess puppeteer-core made some incompatible changes, I will check it ASAP |
very curious it works now |
Cant confirm that.
after clearing the yarn cache and reinstalling everything still results in the following error:
Downgrading to PCR 19.1.0 still solves the issue. If i can help you somehow by providing additional testing/information please feel free to let me know, im happy to collaborate. |
do you have a chance to try puppeteer: v19.7.5? In fact, we do not recommend using puppeteer-chromium-resolver + puppeteer, can you remove puppeteer from your package.json dependencies? or it's a upstream dependence? since puppeteer-chromium-resolver already depends on puppeteer-core (not puppeteer), so i guess maybe there are some uncertainty. welcome to provide more infomations thanks. |
Actually we only use Ill give it a try and let you know if that worked. Edit: I will try both cases and let you know how they worked. |
So:
Still somehow the |
could you please upload the codes or create a repository for your cases? so I can reproduce this problem locally. |
btw, it would be better if the following information can be provided |
Im on a MacBook Pro M1, 2020. As per the code: |
Sorry I cann't test on Mac OS, but test on Windows/WSL Linux Debian both are works. #14 176.8 [PCR] Chromium revision: 1095492
#14 176.8 [PCR] Not found local chromium
#14 176.8 [PCR] HEAD request: https://storage.googleapis.com/chromium-browser-snapshots/Linux_x64/1095492/chrome-linux.zip - true (343ms)
#14 176.8 [PCR] HEAD request: https://npmmirror.com/mirrors/chromium-browser-snapshots/Linux_x64/1095492/chrome-linux.zip - true (7627ms)
#14 176.8 [PCR] Downloading from: https://storage.googleapis.com ...
<= here should have error message if next download is another host, that means previous host failed download but nothing error or log output
#14 176.8 [PCR] Downloading from: https://npmmirror.com/mirrors ...
#14 176.8 [PCR] Retry Chromium downloading ...
#14 176.8 [PCR] Downloading from: https://storage.googleapis.com ...
#14 176.8 [PCR] Downloading from: https://npmmirror.com/mirrors ...
#14 176.8 [PCR] Retry Chromium downloading ...
#14 176.8 [PCR] Downloading from: https://storage.googleapis.com ...
#14 176.8 [PCR] Downloading from: https://npmmirror.com/mirrors ...
#14 176.8 [PCR] Retry Chromium downloading ...
#14 176.8 [PCR] Downloading from: https://storage.googleapis.com ...
#14 176.8 [PCR] Downloading from: https://npmmirror.com/mirrors ...
#14 176.8 [PCR] ERROR: Failed to download Chromium after retry 3 times. refer to source codes should be here: let failed = false;
const revisionInfo = await browserFetcher.download(options.revision, (downloadedBytes, totalBytes) => {
Util.showProgress(downloadedBytes, totalBytes);
}).catch((error) => {
failed = true;
Util.output(error, true);
});
if (failed || !revisionInfo) {
return;
} the only problem should be API browserFetcher.download was nothing return, and this is a puppeteer API const puppeteer = require('puppeteer-core');
createBrowserFetcher: (options) => {
return new puppeteer.BrowserFetcher(options);
}, There is a breaking change on this API BrowserFetcher before, see here puppeteer/puppeteer#8999 npm list puppeteer-core
// or npm list puppeteer (wrong case) thanks |
Found a new doubt is that the revision 1095492 you used is unnormal
the revision could be 1095492 if failed to get revision from puppeteer. It also proves that your Puppeteer is not installed normally getPuppeteerChromiumRevision: () => {
const revisions = puppeteer.PUPPETEER_REVISIONS;
if (revisions) {
return revisions.chromium;
}
return '1095492';
}, just update 1095492 to 1108766 and publish a new version puppeteer-chromium-resolver@19.3.0 |
Installed versions (as of the package.json files in node_modules): Ill try updating to puppeteer-chromium-resolver 19.3.0 now. |
After updating puppeteer-chromium-resolver to ^19.3.0 the installed versions (as of package.json files in node_modules) changed to: puppeteer: 19.17.4 Both puppeteer and puppeteer-core downgraded from 19.8.0 to 19.17.4. Anyways the error still persists
Im wondering why the logfile tells I'll try and create a isolated testcase to provide for you. Still i dont understand why PCR tries to download chromium at all.
in the docker build file so PCR should not download chromium at all (since i install it myself in the docker file so it works on AWS EC2 correctly). Can you tell me why PCR tries to download chromium at all? Shouldnt this whole process be skipped by setting |
checked the latest version should be 19.8.0 https://www.npmjs.com/package/puppeteer-core?activeTab=versions |
Im currently working on an isolated test case i can provide so you can have a look yourself and maybe find whats the problem. What would be the best approach to provide you with the case? |
yes great, I need reproduce this problem locally. |
Heres the testcase: https://github.com/NicerDicerPro/pcr-error-test I just created an empty next.js project, added the puppeteer, puppeteer-element2selector and puppeteer-chromium-resolver dependencies as well as the dockerfile. To build the docker worker you can just use |
just removed puppeteer, it's not required, could you please try again? Note that you installed version is "19.7.4" not "19.17.4"(this version is impossible) |
Yes you are correct, i misspelled, its I merged your pr, reinstalled the application and tried it again.
Is the docker worker build working for you when using my repo? |
Im tring to install docker to my local PC, need more time... |
No problem, im not in a hurry, please take all the time you need 👍 |
doing yarn worker-build now
|
seems that the docker build cannot be completed in my pc environment. it took a few hours to execute the run "RUN apk --no-cache add chromium" without any progress
then I try to remove "RUN apk --no-cache add chromium" and build again
still waiting for ... |
Thats odd, an average build is running for like 30-60 seconds on my machine before it reaches the error. |
Quick update from my end: If i can help you with any more information, please let me know! |
I have been testing the docker build in local but there is no new progress, probably because my local network env is very bad |
While we do have a AWS EC2 server which runs the docker container once its built, i cannot share credentials to that server (i actually don't even have the credentials). Im sorry i cant help you more here. |
could you please update new version puppeteer-chromium-resolver@19.3.1 and try again? |
I merged your PR. The docker file provided by you works for me too. Were still facing the same issue as from the beginning.
The problem from the beginning still exists: Anyways as said: I appreciate your effort in fixing my case but im afraid investigating this any further may be a big waste of time. |
thanks for the comments |
Oh well, maybe the problem then is simply the renaming of the env variable! Ill check and get back to you. |
With updating to puppeteer-chromium-resolver to 19.3.2 and renaming the env var to PUPPETEER_SKIP_DOWNLOAD everything works fine:
Thank you for your help and effort fixing this issue 🚀 I'll close this issue with this comment. |
After updating to puppeteer-chromium-resolver 19.2.0 i can no longer build my docker image with it because the
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD
env seems to be ignored.package.json:
Dockerfile
When building my docker container PCR tries to download docker, fails and the build of my docker container fails:
Even if the downloading of chromium would work, i did set
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD
so the download of chromium should not be happening.When switching back to
"puppeteer-chromium-resolver": "19.1.0"
everything works fine again.Did any undocumented changes regarding the
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD
happen or am i missing something?The text was updated successfully, but these errors were encountered: