'Failed to launch the browser process! Ubuntu
Solution 1:[1]
Possibly due to missing Ubuntu dependency
Install all the required dependencies for Puppeteer with the following command.
sudo apt-get install -y libgtk2.0-0 libgtk-3-0 libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb libgbm-dev
Solution 2:[2]
The answer is in the error msg:
Missing X server or $DISPLAY
You can only run chrome in headless mode by default on the server as it doesn't have a display screen. That's why you get the error.
headless: false,
line should be either removed or modified to:
headless: true,
There are alternative ways to fake headful mode on the server, but it heavily depends on your environment what works for you and these are non-stable workaround solutions. e.g.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | MC Naveen |
| Solution 2 | theDavidBarton |

