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]: Can't use puppeteer-core
anymore due to error _projectRoot is undefined. Unable to create a BrowserFetcher
#8919
Comments
The bug got recently introduced with #8907 |
Thanks for the quick fix! |
I'm still seeing this issue when running on fly.io.
Here's the Dockerfile FROM node:slim
RUN apt-get update \
&& apt-get install curl gnupg -y \
&& curl --location --silent https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
&& apt-get update \
&& apt-get install google-chrome-stable -y --no-install-recommends \
&& apt-get remove google-chrome-stable -y \
COPY *.json ./
RUN npm install --frozen-lockfile
COPY . ./
CMD node index.js And launching puppeteer const browser = await puppeteer.launch({
headless: true,
args: [
// Required for Docker version of Puppeteer
'--no-sandbox',
'--disable-setuid-sandbox',
// This will write shared memory files into /tmp instead of /dev/shm,
// because Docker’s default for /dev/shm is 64MB
'--disable-dev-shm-usage',
]
}); And package.json version
|
@clarkmcc I believe you are missing the executablePath or channel when using puppeteer-core: |
Same issue with the env variable const browser = await puppeteer.launch({
executablePath: process.env.PUPPETEER_EXECUTABLE_PATH,
headless: true,
args: [
// Required for Docker version of Puppeteer
'--no-sandbox',
'--disable-setuid-sandbox',
// This will write shared memory files into /tmp instead of /dev/shm,
// because Docker’s default for /dev/shm is 64MB
'--disable-dev-shm-usage',
]
}); |
@clarkmcc what is the value of |
@OrKoN, apparently it's undefined. I thought it was provided by the Docker image I was using. Sorry for the false alarm, I'll keep noodling on the env variable/Docker image side of things. |
Bug description
I am using Puppeteer within WebdriverIO to run commands through DevTools. Unfortunately it is not possible anymore to use
puppeteer-core
only as utility to launch browser (chrome and firefox). However the docs clearly suggest that this is still possible:Steps to reproduce the problem:
cd /tmp && mkdir pptrtest && cd pptrtest
puppeteer-core
vianpm i puppeteer-core
node test.js
Puppeteer version
latest
Node.js version
18.6.0
npm version
8.5.5
What operating system are you seeing the problem on?
macOS
Relevant log output
The text was updated successfully, but these errors were encountered: