It was working fine up until yesterday.
Full setup is Playwright in Express in a Docker container in Google Cloud Run. Preferably headful but I’d accept anything at this stage.
browserType.launch: Executable doesn't exist at /home/.cache/ms-playwright/chromium-1124/chrome-linux/chrome
╔═════════════════════════════════════════════════════════════════════════╗
║ Looks like Playwright Test or Playwright was just installed or updated. ║
║ Please run the following command to download new browsers: ║
║ ║
║ npx playwright install ║
║ ║
║ <3 Playwright Team ║
╚═════════════════════════════════════════════════════════════════════════╝
My original Dockerfile:
# Start from a base Node.js image
FROM node:latest
# Install necessary packages: XVFB and fonts
RUN apt-get update
&& apt-get install -y
xvfb
x11-xkb-utils
xfonts-100dpi
xfonts-75dpi
xfonts-scalable
x11-apps
clang
libdbus-1-3
libatk1.0-0
libatk-bridge2.0-0
libcups2
libatspi2.0-0
libxcomposite1
libxdamage1
libgbm1
libxkbcommon0
libasound2
&& apt-get clean
# Set display environment variable for XVFB
ENV DISPLAY=:99
# Create a working directory
WORKDIR /app
# Copy package.json and package-lock.json
COPY package*.json ./
# Install dependencies
RUN npm install
# Install Playwright browsers
RUN npx playwright install
# Copy the rest of the application code
COPY . .
# Expose the port your app runs on
EXPOSE 3000
# Run XVFB, then start your Express application
CMD xvfb-run --server-args="-screen 0 1024x768x24" node index.js
package.json: “playwright”: “^1.44.1”
index.js:
const { chromium } = require('playwright');
const browser = await chromium.launch({ headless: false });
I’ve tried:
- Zenika’s image using the Dockerfile provided
`FROM zenika/alpine-chrome:with-node
ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD 1
ENV PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/chromium-browser
WORKDIR /usr/src/app
COPY –chown=chrome package.json package-lock.json ./
RUN npm install
ENTRYPOINT [“tini”, “–“]`
-
Playwright browsers
-
using Node:14.10
-
executablePath = ‘usr/bin/chromium-browser’
and a lot of other minor variations.
ooovoflo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.