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

Get a error when script try close a page #10

Merged
merged 1 commit into from
Apr 9, 2020

Conversation

Hector68
Copy link
Contributor

@Hector68 Hector68 commented Apr 9, 2020

✔ checkout - 210 items.                                                                                       14:07:06
(node:7825) UnhandledPromiseRejectionWarning: Error: Protocol error (Target.closeTarget): Target closed.
    at /node_modules/puppeteer/lib/Connection.js:74:56
    at new Promise (<anonymous>)
    at Connection.send (/node_modules/puppeteer/lib/Connection.js:73:12)
    at Page.close (/node_modules/puppeteer/lib/Page.js:1040:38)
    at Page.<anonymous> (/node_modules/puppeteer/lib/helper.js:112:23)
    at Object.checkout (/node_modules/magepack/lib/generate/collector/checkout.js:71:10)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async module.exports (/node_modules/magepack/lib/generate.js:23:13)
(node:7825) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:7825) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

1 method page.close() need be a await
2 in checkout first of all merge data, only then log a success notification

@krzksz krzksz merged commit 74d9446 into magesuite:master Apr 9, 2020
@krzksz
Copy link
Collaborator

krzksz commented Apr 9, 2020

Nice catch, thanks!

@krzksz
Copy link
Collaborator

krzksz commented Apr 9, 2020

Released in 2.2.1

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

Successfully merging this pull request may close these issues.

2 participants