You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which package is this bug report for? If unsure which one to select, leave blank
@crawlee/playwright (PlaywrightCrawler)
Issue description
When I run the "Getting started" crawler ("npm start"), I get this obscure error message related to a tool that is deprecated (WMIC) :
my-crawler@0.0.1 start
npm run start:dev
ERROR Memory snapshot failed.
spawn wmic.exe ENOENT
at ChildProcess._handle.onexit (node:internal/child_process:286:19)
at onErrorNT (node:internal/child_process:484:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
INFO PlaywrightCrawler: Starting the crawler.
node:internal/child_process:286
const err = new ErrnoException(exitCode, syscall);
^
Error: spawn wmic.exe ENOENT
at ChildProcess._handle.onexit (node:internal/child_process:286:19)
at onErrorNT (node:internal/child_process:484:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -4058,
code: 'ENOENT',
syscall: 'spawn wmic.exe',
path: 'wmic.exe',
spawnargs: [ 'PROCESS', 'GET', 'ProcessId,ParentProcessId,WorkingSetSize,Name' ]
}
Node.js v20.18.0
Code sample
// For more information, see https://crawlee.dev/import{PlaywrightCrawler}from'crawlee';// PlaywrightCrawler crawls the web using a headless// browser controlled by the Playwright library.constcrawler=newPlaywrightCrawler({// Use the requestHandler to process each of the crawled pages.asyncrequestHandler({ request, page, enqueueLinks, log, pushData }){consttitle=awaitpage.title();log.info(`Title of ${request.loadedUrl} is '${title}'`);// Save results as JSON to ./storage/datasets/defaultawaitpushData({ title,url: request.loadedUrl});// Extract links from the current page// and add them to the crawling queue.awaitenqueueLinks();},// Comment this option to scrape the full website.maxRequestsPerCrawl: 20,// Uncomment this option to see the browser window.// headless: false,});// Add first URL to the queue and start the crawl.awaitcrawler.run(['https://crawlee.dev']);
Package version
crawlee@3.12.1
Node.js version
v20.18.0
Operating system
Windows 11
Apify platform
Tick me if you encountered this issue on the Apify platform
I have tested this on the next release
No response
Other context
No response
The text was updated successfully, but these errors were encountered:
This worked as expected, without any error. I selected the getting started - typescript template. Then I rechecked with the javascript template and everything worked fine as well.
Now that I have added the path to wmic.exe (in my case, C:\Windows\System32\wbem) to my environment variables, it's working as expected.
You might want to include WMIC in the list of prerequisites in the "Setting up" section of your documentation, since it is deprecated for most Windows 11 users.
Anyway, thank you for your quick reply. I’m already enjoying the rest of the tutorial!
Which package is this bug report for? If unsure which one to select, leave blank
@crawlee/playwright (PlaywrightCrawler)
Issue description
When I run the "Getting started" crawler ("npm start"), I get this obscure error message related to a tool that is deprecated (WMIC) :
ERROR Memory snapshot failed.
spawn wmic.exe ENOENT
at ChildProcess._handle.onexit (node:internal/child_process:286:19)
at onErrorNT (node:internal/child_process:484:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
INFO PlaywrightCrawler: Starting the crawler.
node:internal/child_process:286
const err = new ErrnoException(exitCode, syscall);
^
Error: spawn wmic.exe ENOENT
at ChildProcess._handle.onexit (node:internal/child_process:286:19)
at onErrorNT (node:internal/child_process:484:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -4058,
code: 'ENOENT',
syscall: 'spawn wmic.exe',
path: 'wmic.exe',
spawnargs: [ 'PROCESS', 'GET', 'ProcessId,ParentProcessId,WorkingSetSize,Name' ]
}
Node.js v20.18.0
Code sample
Package version
crawlee@3.12.1
Node.js version
v20.18.0
Operating system
Windows 11
Apify platform
I have tested this on the
next
releaseNo response
Other context
No response
The text was updated successfully, but these errors were encountered: