-
Notifications
You must be signed in to change notification settings - Fork 307
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
First job always fails #479
Comments
As the error in the image tell, seem like the So maybe your job is to wait for this element, then re-check if its selector is correct or not |
Thanks for replying, but the element doesn't appear because puppeteer cluster can't seem to go to a different URL that has that element for the first job. But it can for subsequent jobs. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
Thanks to anyone who can help me with this, but whenever I run my script, the first job always fails to go to the target page.
The other jobs work fine enough.
I load the jobs based on the values inside a CSV file.
`const inputFilePath = 'PNPresetTemplateIds.csv';
const outputFilePath = 'done.csv';
try {
dataArray = fs.readFileSync(inputFilePath) //prod
//dataArray = fs.readFileSync('staging-ct-id.csv') //staging
.toString('UTF8')
.split(/\r?\n/);
} catch(e) {
console.log('Error:', e.stack);
}`
... //load the tasks from a file dataArray.forEach(presetTemplateId => { cluster.queue(presetTemplateId); });
is running a foreach on the dataArray a code smell?
Any help or information would be greatly appreciated. Thanks.
The text was updated successfully, but these errors were encountered: