Apify & CrawleeA&CApify & Crawlee
Powered by
sad-indigoS
Apify & Crawlee•4y ago•
2 replies
sad-indigo

Run Puppeteer docker locally (actor-node-puppeteer-chrome)

I am trying to run&debug my crawler locally, but keep getting following error:
Starting X virtual framebuffer using: Xvfb :99 -ac -screen 0 1280x720x16 -nolisten tcp
2022-11-17T12:30:00.521459905Z Executing main command
2022-11-17T12:30:01.435704710Z INFO  System info {"apifyVersion":"3.1.0","apifyClientVersion":"2.6.1","osType":"Linux","nodeVersion":"v18.7.0"}
2022-11-17T12:30:01.441091105Z INFO  asdfasdfasdf
2022-11-17T12:30:01.765972208Z INFO  PuppeteerCrawler: Starting the crawl
2022-11-17T12:30:02.002157773Z WARN  PuppeteerCrawler: Reclaiming failed request back to the list or queue. Failed to launch the browser process!
2022-11-17T12:30:02.002214809Z Failed to move to new namespace: PID namespaces supported, Network namespace supported, but failed: errno = Operation not permitted
2022-11-17T12:30:02.002222677Z [1117/123001.852772:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
2022-11-17T12:30:02.002225607Z [1117/123001.852956:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)
Starting X virtual framebuffer using: Xvfb :99 -ac -screen 0 1280x720x16 -nolisten tcp
2022-11-17T12:30:00.521459905Z Executing main command
2022-11-17T12:30:01.435704710Z INFO  System info {"apifyVersion":"3.1.0","apifyClientVersion":"2.6.1","osType":"Linux","nodeVersion":"v18.7.0"}
2022-11-17T12:30:01.441091105Z INFO  asdfasdfasdf
2022-11-17T12:30:01.765972208Z INFO  PuppeteerCrawler: Starting the crawl
2022-11-17T12:30:02.002157773Z WARN  PuppeteerCrawler: Reclaiming failed request back to the list or queue. Failed to launch the browser process!
2022-11-17T12:30:02.002214809Z Failed to move to new namespace: PID namespaces supported, Network namespace supported, but failed: errno = Operation not permitted
2022-11-17T12:30:02.002222677Z [1117/123001.852772:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
2022-11-17T12:30:02.002225607Z [1117/123001.852956:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)



My dockerfile:
FROM apify/actor-node-puppeteer-chrome:18

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 --chown=myuser . ./

CMD ./start_xvfb_and_run_cmd.sh && npm start --silent
FROM apify/actor-node-puppeteer-chrome:18

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 --chown=myuser . ./

CMD ./start_xvfb_and_run_cmd.sh && npm start --silent


Thanks for any help!
Apify & Crawlee banner
Apify & CrawleeJoin
This is the official developer community of Apify and Crawlee.
14,091Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?
Recent Announcements
ellativity

**Update to Store Publishing Terms and Acceptable Use Policy** Due to an influx of fraudulent reviews recently, Apify's Legal team has taken some actions to protect developers, customers, and Apify, by updating the Store Publishing Terms and Acceptable Use Policy. Please pay special attention to the updated terms in section 4 of the Store Publishing Terms here: https://docs.apify.com/legal/store-publishing-terms-and-conditions Additionally, please review the changes to section 2 of the Acceptable Use Policy here: https://docs.apify.com/legal/acceptable-use-policy If you have any questions, please ask them in <#1206131794261315594> so everyone can see the discussion. Thanks!

ellativity · 3w ago

ellativity

Hi @everyone I'm hanging out with the Creator team at Apify in https://discord.com/channels/801163717915574323/1430491198145167371 if you want to discuss Analytics and Insights!

ellativity · 4w ago

ellativity

2 things for <@&1092713625141137429> members today: 1. The Apify developer rewards program is open for registrations: https://apify.notion.site/developer-rewards This is the program where you will earn points for marketing activities. The rewards are still TBC, but the real purpose of the program is to help you structure your marketing activities and efforts. In the coming weeks, I will be populating that link with guides to help you identify the best ways to market your Actors, as well as scheduling workshops and office hours to help you create content and develop your own marketing strategy. 2. At 2PM CET (in about 80 minutes) there will be an office hour with the team behind Insights and Analytics, who want your feedback on how to improve analytics for you. Join us in https://discord.com/channels/801163717915574323/1430491198145167371 to share your ideas!

ellativity · 4w ago

Similar Threads

Page.goto never resolves in headful (using XVFB) using `apify/actor-node-puppeteer-chrome` Docker
brilliant-limeBbrilliant-lime / crawlee-js
3y ago
puppeteer_dev_chrome_profile
uniform-turquoiseUuniform-turquoise / crawlee-js
4y ago
Puppeteer actor dockerfile via nixpacks?
sacred-roseSsacred-rose / crawlee-js
3y ago
chromium issue in apify/actor-node-playwright-chrome:22
dual-salmonDdual-salmon / crawlee-js
2y ago