processTicksAndRejections (node:internal/process/task_queues:83:21) { errno: -4053, code: 'ENOTCONN', syscall: 'read' } #775
mehranranji
started this conversation in
General
Replies: 2 comments 1 reply
-
|
same issue here, on windows 11, node 20.8.0 |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
For me after running these 3 lines it works: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm encountering an issue while using Puppeteer and Spatie Browsershot to capture a screenshot from URL: (https://example.com).
Error Message:
The command ""C:\Program Files\nodejs/node" "F:\Projects\laravel\vendor\spatie\browsershot\src/../bin/browser.cjs" "{"url":"[example.com","action":"screenshot","options":{"type":"png","path":"F:\Projects\laravel.codal360channel.ir\storage\app/screenshots\report_1080826.png","args":["--user-data-dir=F:\Projects\laravel.codal360channel.ir\resources\chromedriver/userdata","--disable-setuid-sandbox","--no-sandbox"],"viewport":{"width":800,"height":600},"executablePath":"F:\Projects\laravel\resources\chromedriver/chromedriver.exe","newHeadless":true](https://codal.ir/Reports/Decision.aspx?sheetId=1&LetterSerial=pcerf05NHVElg5rCjSC%2Bcg%3D%3D&rt=4&let=6&ct=0&ft=-1%22,%22action%22:%22screenshot%22,%22options%22:%7B%22type%22:%22png%22,%22path%22:%22F:%5CProjects%5Claravel%5Cstorage%5Capp/screenshots%5Creport_1080826.png%22,%22args%22:%5B%22--user-data-dir=F:%5CProjects%5Claravel%5Cresources%5Cchromedriver/userdata%22,%22--disable-setuid-sandbox%22,%22--no-sandbox%22%5D,%22viewport%22:%7B%22width%22:800,%22height%22:600%7D,%22executablePath%22:%22F:%5CProjects%5Claravel%5Cresources%5Cchromedriver/chromedriver.exe%22,%22newHeadless%22:true)}}" failed. Exit Code: 1(General error) Working directory: F:\Projects\laravel\public Output: ================ Error Output: ================ node:events:505 throw er; // Unhandled 'error' event ^ Error: read ENOTCONN at tryReadStart (node:net:614:20) at Socket._read (node:net:625:5) at Socket.Readable.read (node:internal/streams/readable:487:10) at Socket.read (node:net:666:39) at new Socket (node:net:415:12) at Object.Socket (node:net:286:41) at createSocket (node:internal/child_process:328:14) at ChildProcess.spawn (node:internal/child_process:445:23) at Object.spawn (node:child_process:700:9) at new Process (F:\Projects\laravel\node_modules@puppeteer\browsers\lib\cjs\launch.js:113:56) Emitted 'error' event on Interface instance at: at Socket.onerror (node:readline:265:10) at Socket.emit (node:events:527:28) at emitErrorNT (node:internal/streams/destroy:157:8) at emitErrorCloseNT (node:internal/streams/destroy:122:3) at processTicksAndRejections (node:internal/process/task_queues:83:21) { errno: -4053, code: 'ENOTCONN', syscall: 'read' }my code:
Browsershot::url($this->url) ->setNodeBinary('C:\Program Files\nodejs/node') ->setUserDataDir(resource_path('chromedriver/userdata')) ->setCustomTempPath(resource_path('chromedriver/tmp')) ->setNpmBinary('C:\Users\mehra\AppData\Roaming\npm') ->setChromePath(resource_path('chromedriver/chromedriver.exe')) ->newHeadless() ->noSandbox() ->addChromiumArguments([ '--disable-setuid-sandbox', ]) ->save($this->screenshotPath());Beta Was this translation helpful? Give feedback.
All reactions