Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: #12182

Open
2 tasks
YoiMenn opened this issue Mar 30, 2024 · 5 comments
Open
2 tasks

[Bug]: #12182

YoiMenn opened this issue Mar 30, 2024 · 5 comments

Comments

@YoiMenn
Copy link

YoiMenn commented Mar 30, 2024

Minimal, reproducible example

const puppeteer = require("puppeteer");

function sleep(time) {
   return new Promise(function(resolve) { 
       setTimeout(resolve, time)
   });
}

async function open() {
	const browser = await puppeteer.launch({
		headless: false,
		defaultViewport: null,
		userDataDir: 'usdat'
	})
	const page = await browser.newPage();
	await page.goto("myweb.com")
	await page.waitForSelector('#qa-section-balance-info > div > section > section:nth-child(1) > div.o-layout__item.u-width-2of6 > p');
	await sleep(5000);
	
	while (true) {
		await page.reload();
		await page.waitForSelector('#qa-section-balance-info > div > section > section:nth-child(1) > div.o-layout__item.u-width-2of6 > p');
		await page.screenshot({path:'./ss.png'})
		await sleep(30000)
	}
};

open()

Error string

Uncaught Error: spawn UNKNOWN

Bug behavior

  • Flaky
  • PDF

Background

for screenshot my web

Expectation

I want to screenshot my web every 30 seconds, but when the script runs, I get an error message

Reality

Uncaught Error: spawn UNKNOWN
at ChildProcess.spawn (node:internal/child_process:421:11)
at Object.spawn (node:child_process:761:9)
at new Process (C:\Users\Administrator\Desktop\MitraBukalapak_Auto\node_modu
les@puppeteer\browsers\lib\cjs\launch.js:103:56)
at launch (C:\Users\Administrator\Desktop\MitraBukalapak_Auto\node_modules@
puppeteer\browsers\lib\cjs\launch.js:50:12)
at ChromeLauncher.launch (C:\Users\Administrator\Desktop\MitraBukalapak_Auto
\node_modules\puppeteer-core\lib\cjs\puppeteer\node\ProductLauncher.js:77:54)
at async REPL3:1:45 {
errno: -4094,
code: 'UNKNOWN',
syscall: 'spawn'

Puppeteer configuration file (if used)

No response

Puppeteer version

22.6.1

Node version

21.7.1

Package manager

npm

Package manager version

10.5.0

Operating system

Windows

Copy link

github-actions bot commented Mar 30, 2024

This issue has an outdated Puppeteer version: 22.6.1. Please verify your issue on the latest 22.6.2 version. Then update the form accordingly.


Analyzer run

@Dilldeo1992

This comment was marked as spam.

@github-actions github-actions bot added invalid and removed invalid labels Mar 31, 2024
@Dilldeo1992

This comment was marked as spam.

@Dilldeo1992

This comment was marked as spam.

@OrKoN
Copy link
Collaborator

OrKoN commented Apr 1, 2024

Not able to reproduce (after correcting the invalid URL). Try Windows-specific tips from https://pptr.dev/troubleshooting to see if nothing is missing on your system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants