Puppeteer Crashing (Page Crashed!) inside Docker
Sometimes Puppeteer will throw weird crashes with output like:
this.emit('error', new Error('Page crashed!'));
The Fix:
When using Chromium and Puppeteer, Chromium will use the /dev/shm (Ramdisk) for rendering.
By default, Docker will only allocate 64MB for /dev/shm. You can bump up this value by adding "--shm-size=2gb" to your Docker "run" command, thus assigning /dev/shm a 2GB allowance. This can prevent Chromium and Puppeteer from crashing.
Written by Blitline Developers
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Puppeteer
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#