-
-
Notifications
You must be signed in to change notification settings - Fork 295
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
[BUG] Calling _exit(1). Core file will not be generated. - Protocol error (Page.printToPDF): Target closed. #169
Comments
I'm too am seeing this same error Logging out what's happening in
The Page.printToPDF works fine, the first IO.read also is working while the second IO.read throws the error... I can add that on AWS in Lambda I don't see this very often but locally it happens often and seems to be "time" related. E.g. it works fine ones, then fails if I try again soon after but if I wait e.g. 5 minutes it works again. |
Solved for me (I think)... this seems to stem from external references (CSS and FONT) in the PUG template. I added a "waitUntil" as:
Now I can run it both in AWS and locally without issues! |
I tried with all `cklist instead. DevTools listening on ws://127.0.0.1:36019/devtools/browser/ |
@johncitak The image you're targeting is 8996x9578 pixels in size. That's 86 163 688 square pixels. 🤯 If you consider that each pixel will consume 4 bytes (one for each color + one alpha channel):
I'm ignoring any additional overhead from the PDF format. Seems like you've allocated enough memory (2048 MB) to your Lambda, but you're also trying to store this under Under Lambda This issue seems to be a duplicate of #61. The good news is that now you can make use of EFS with Lambda to overcome this limitation. 😉 PS: Sorry for the late reply. |
@alixaxel thank you for the response. So as I read from the other thread cache caps at 32MB and thats why it doesn't work. If I mount it with EFS and increase the cache size it should work. I tried with EFS before but I didn't point the cache to EFS. How can I set a custom path for cache? Thanks for all your help. |
Last I looked into this, you could override the default cache location in chromium with this environment variable: You can pass this into your |
Environment
chrome-aws-lambda
Version: 5.3.1puppeteer
/puppeteer-core
Version: 5.3.xnodejs12.x
Expected Behavior
Pdf should successfully be generated
Current Behavior
Protocol error (Page.printToPDF): Target closed.
Dumpio output: Calling _exit(1). Core file will not be generated.
I don't see any memory or space issues.
Steps to Reproduce
Possible Solution
I tried to pass different flags, clearing space, upping memory nothing has worked so far. I did go through previous issues but couldn't find anything an exact issue. I found an issue where lambda runs out of memory or space but I checked thats not the case here. This is the image that fails: https://linkpicture.com/q/LPic5f8efc8e8c8391884650102.png
The text was updated successfully, but these errors were encountered: