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

QuerySelector check missing on page.evaluate #47

Open
videki opened this issue Mar 1, 2022 · 0 comments
Open

QuerySelector check missing on page.evaluate #47

videki opened this issue Mar 1, 2022 · 0 comments

Comments

@videki
Copy link

videki commented Mar 1, 2022

With docusaurus v2, autogenerated sidebars on the last page the selector gets empty, but the eval has no check for that:

`
node:internal/process/promises:246
triggerUncaughtException(err, true /* fromPromise */);
^

Error: Evaluation failed: DOMException: Failed to execute 'querySelectorAll' on 'Document': The provided selector is empty.
at puppeteer_evaluation_script:3:46
at ExecutionContext._evaluateInternal (/Users/.../node_modules/puppeteer/lib/ExecutionContext.js:122:13)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async ExecutionContext.evaluate (/Users/.../node_modules/puppeteer/lib/ExecutionContext.js:48:12)
at async /Users/.../node_modules/mr-pdf/lib/utils.js:122:13
-- ASYNC --
at ExecutionContext. (/Users/.../node_modules/puppeteer/lib/helper.js:111:15)
at DOMWorld.evaluate (/Users/.../node_modules/puppeteer/lib/DOMWorld.js:112:20)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
-- ASYNC --
at Frame. (/Users/.../node_modules/puppeteer/lib/helper.js:111:15)
at Page.evaluate (/Users/.../node_modules/puppeteer/lib/Page.js:860:43)
at Page. (/Users/.../node_modules/puppeteer/lib/helper.js:112:23)
at /Users/.../node_modules/mr-pdf/lib/utils.js:122:24
at Array.map ()
at Object.generatePDF (/Users/.../node_modules/mr-pdf/lib/utils.js:119:26)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
`

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

No branches or pull requests

1 participant