-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
How can i disable puppeteer dev profile. #1791
Comments
That's impressive, thanks for sharing.
@bahattincinic i'm afraid there's no way to, at least none I'm aware of. Chrome needs some place to store profile data. if there's not enough space on the If you're short on disk space but have plenty of RAM, you can mount a tmpfs and use it for profile directories. |
@aslushnikov Thank you for your quick answer. When I checked Example Output:
Why puppeteer/chrome doesn't remove profile file after close it ? I don't want to create any file on lambda. is it possible to pass dummy/static profile file to puppeteer?
I'm not sure about it. Because AWS Lambda containers don’t have a
I think only |
@bahattincinic This seems to be the real issue. Is this the output of |
Yes,
I passed I upgraded chrome version to 64. but the result is still same. That's why I agree with you. it doesn't relate to profile file. When I analyzed this file, I saw the following output: (
Do you have any idea @aslushnikov? |
@aslushnikov We fixed this bug. When the problem occurred, OS copies binary (chrome binary) core dump to We realized that lambda was not the right choice. (RAM limits, Disk Limits, hard to debug, Shared Disk space, concurrency limits...) @aslushnikov Thanks for your great support. |
@bahattincinic can you share your code that you used to clear the /tmp folder? I've tried it a million different ways and still am constantly running into:
|
Here is my solution. The advantage of this is that you can run multiple puperteer instances in parallel. Because only the puppeteer_dev_profile of the current instance is deleted after the browser is closed. let fs = require('fs-extra');
const puppeteer = require('puppeteer');
let browser = await puppeteer.launch();
let chromeTmpDataDir = null;
// find chrome user data dir (puppeteer_dev_profile-XXXXX) to delete it after it had been used
let chromeSpawnArgs = browser.process().spawnargs;
for (let i = 0; i < chromeSpawnArgs.length; i++) {
if (chromeSpawnArgs[i].indexOf("--user-data-dir=") === 0) {
chromeTmpDataDir = chromeSpawnArgs[i].replace("--user-data-dir=", "");
}
}
// ...
browser.close();
if (chromeTmpDataDir !== null) {
fs.removeSync(chromeTmpDataDir);
}
process.exit(0); |
Hi @pixelport , I'm getting this error
|
Is there a solution to dev profiles not getting removed? This has been an ongoing issue for me for years now. |
I've been struggling with same issue.
It's not because of available disk space, because i have ~100GB free. |
Finally, you saved my life. I ran out of 100GB space because of this problem |
I've been facing the same issue with a node.js application that uses puppeteer while running in a container. Using the |
@The-East-Wind I already had that flag from before, which apparently has not prevented this issue. |
Dev profile files are not deleted in case of unhandled exceptions, so
|
Can anyone verify that the above try catch has solved the bloating of dev profiles in tmp folder? |
Environment:
Puppeteer version: 0.11.0
Platform / OS version: AWS Lambda
Node.js version: 6.10
Puppeteer Arguments
Hello,
We are using puppeteer on AWS Lambda. It handles over 10 million requests every month.
When we were trying to handle concurrent requests, puppeteer returned this error:
I tried to disable dev profile with the
--disable-dev-profile
argument. But it doesn't work.How can I do it?
The text was updated successfully, but these errors were encountered: