louisdck
02/07/2025, 6:16 PM2025-02-07T18:07:53.704Z browserType.launchPersistentContext: Target page, context or browser has been closed
2025-02-07T18:07:53.705Z Browser logs: <launching> /home/myuser/pw-browsers/chrome --disable-field-trial-config ...
2025-02-07T18:07:53.708Z <launched> pid=36
2025-02-07T18:07:53.709Z [pid=36][err] Old Headless mode has been removed from the Chrome binary.
Haven't changed anything about the default Dockerfile, here it is:
Dockerfile
FROM apify/actor-node-playwright-chrome:20 AS builder
RUN npm ls crawlee apify puppeteer playwright
COPY --chown=myuser package*.json ./
RUN npm install --include=dev --audit=false
COPY --chown=myuser . ./
RUN npm run build
FROM apify/actor-node-playwright-chrome:20
RUN npm ls crawlee apify puppeteer playwright
COPY --chown=myuser package*.json ./
RUN npm --quiet set progress=false \
&& npm install --omit=dev --omit=optional \
&& echo "Installed NPM packages:" \
&& (npm list --omit=dev --all || true) \
&& echo "Node.js version:" \
&& node --version \
&& echo "NPM version:" \
&& npm --version \
&& rm -r ~/.npm
COPY --from=builder --chown=myuser /home/myuser/dist ./dist
COPY --chown=myuser . ./
CMD ./start_xvfb_and_run_cmd.sh && npm run start:prod --silent
`
https://cdn.discordapp.com/attachments/1337487080527368212/1337487080883879936/message.txt?ex=67a79f69&is=67a64de9&hm=e4ef15995627e61c76d1500067a54b9c9bba151e22962842b9b6aee2cf04f29b&Hall
02/07/2025, 6:16 PMazzouzana
02/07/2025, 10:24 PMheadless: "new" ?louisdck
02/08/2025, 11:02 AMjavascript
const crawler = new PlaywrightCrawler({
proxyConfiguration: profileProxyConfiguration,
headless: 'new',
requestHandler: async ({ page, request }) => {
But the headless field is a boolean, not a string, so I get this error:
browserType.launchPersistentContext: headless: expected boolean, got stringazzouzana
02/08/2025, 1:15 PMpackage.json or is it *? (I believe you shouldn't use * as it would install a version that might be incompatible with your setup)serge_vdw
02/10/2025, 12:54 PMlouisdck
02/10/2025, 2:56 PM