I usually use puppeteer for web crawling and I use Docker to run puppeteer.
I had to add a crawl item and when I modified the program and built and ran it on Docker, it did not work with the following error.
/node_modules/puppeteer/.local-chromium/linux-768783/chrome-linux/chrome: error while loading shared libraries: libXss.so.1: cannot open shared object file: No such file or directory TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
I was told that "libXss.so.1" is missing all of a sudden, even though it was fine when I built it just the other day...
Solution
As it turns out, the following article provided a solution.
The Dockerfile was created with reference to the following official information.
However, the article stated to install "google-chrome-unstable", which used to install "libXss.so.1" along with it, but it seems that it is no longer installed and instead "google- chrome-stable" instead.
Also, since "libXss.so.1" is included in "libxss1", the following can be added to the Dockerfile before installing "google-chrome-unstable" to work.
RUN apt-get update && apt-get install libxss1
Impressions, etc.
If you look up how to run Puppeteer in Docker, you will find the aforementioned official information, which is quite addictive...
I was a little reluctant to install the "unstable" version in the first place, so even if the problem is fixed, I will continue to install the "stable" version.
I have been using Puppeteer since version 1 and Node.js version 8, but I am ashamed to say that I continued to use it without upgrading.
I tried to upgrade before, but it was full of errors and I left it to deal with them when I needed to... but I was in such a hurry that I thought I finally had to upgrade....
Maybe I'll learn from this and find time to upgrade.