Skip to content

Conversation

@sergey-fedosimov
Copy link

$ magepack generate --cms-url="https://example.com/" --category-url="https://example.com/category.html" --product-url="https://example.com/some-product-page.html"

ℹ Collecting bundle modules in the browser.                                                                                                                                                                                                       11:55:23
ℹ Collecting modules for bundle "category".                                                                                                                                                                                                       11:55:23
✔ Finished collecting modules for bundle "category".                                                                                                                                                                                              11:55:36
ℹ Collecting modules for bundle "cms".                                                                                                                                                                                                            11:55:36
✔ Finished collecting modules for bundle "cms".                                                                                                                                                                                                   11:55:47
ℹ Collecting modules for bundle "product".                                                                                                                                                                                                        11:55:47
✔ Finished collecting modules for bundle "product".                                                                                                                                                                                               11:55:59
ℹ Collecting modules for bundle "checkout".                                                                                                                                                                                                       11:55:59

 ERROR  Execution context was destroyed, most likely because of a navigation.                                                                                                                                                                     11:56:11

  at rewriteError (/usr/local/lib/node_modules/magepack/node_modules/puppeteer/lib/ExecutionContext.js:167:15)
  at runMicrotasks (<anonymous>)
  at processTicksAndRejections (node:internal/process/task_queues:94:5)
  at async ExecutionContext._evaluateInternal (/usr/local/lib/node_modules/magepack/node_modules/puppeteer/lib/ExecutionContext.js:120:56)
  at async ExecutionContext.evaluate (/usr/local/lib/node_modules/magepack/node_modules/puppeteer/lib/ExecutionContext.js:48:12)
  at async Object.checkout (/usr/local/lib/node_modules/magepack/lib/generate/collector/checkout.js:82:21)
  at async module.exports (/usr/local/lib/node_modules/magepack/lib/generate.js:24:13)
  -- ASYNC --
  at ExecutionContext.<anonymous> (/usr/local/lib/node_modules/magepack/node_modules/puppeteer/lib/helper.js:111:15)
  at DOMWorld.evaluate (/usr/local/lib/node_modules/magepack/node_modules/puppeteer/lib/DOMWorld.js:112:20)
  at runMicrotasks (<anonymous>)
  at processTicksAndRejections (node:internal/process/task_queues:94:5)
  -- ASYNC --
  at Frame.<anonymous> (/usr/local/lib/node_modules/magepack/node_modules/puppeteer/lib/helper.js:111:15)
  at Page.evaluate (/usr/local/lib/node_modules/magepack/node_modules/puppeteer/lib/Page.js:860:43)
  at Page.<anonymous> (/usr/local/lib/node_modules/magepack/node_modules/puppeteer/lib/helper.js:112:23)
  at Object.checkout (/usr/local/lib/node_modules/magepack/lib/generate/collector/checkout.js:82:32)
  at runMicrotasks (<anonymous>)
  at processTicksAndRejections (node:internal/process/task_queues:94:5)
  at async module.exports (/usr/local/lib/node_modules/magepack/lib/generate.js:24:13)

@krzksz
Copy link
Collaborator

krzksz commented Mar 6, 2021

Hey @sergey-fedosimov, thanks for contribution!

Can you explain a bit the issue we are trying to fix here? Originally, my idea for waiting for networkidle0 was to catch all of the modules that are loaded on the page and I don't think we should throw it out, at least at the places where it comes before await collectModules(page);.

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