Skip to content

Conversation

@mattc321
Copy link

Let's give users the chance to change the page timeout while generating. Pupeteer's default timeout is not always enough and can lead to false failures while generating.

@Meberem
Copy link

Meberem commented Aug 12, 2021

I would love to use this PR now. I am battling a very slow checkout page in dev (no idea why) but upping the timeout seems to do wonders. Thanks

@friendscottn
Copy link

friendscottn commented Aug 16, 2021

@Meberem you can try this to use the PR with the timeout:

npm uninstall -g magepack
npm install -g https://github.com/beebots/magepack.git

Also if that doesn't work out you can try throwing a --debug on your magepack generate command. This seems to increase the timeout on it's own.

@Meberem
Copy link

Meberem commented Aug 17, 2021

@Meberem you can try this to use the PR with the timeout:

npm uninstall -g magepack
npm install -g https://github.com/beebots/magepack.git

Also if that doesn't work out you can try throwing a --debug on your magepack generate command. This seems to increase the timeout on it's own.

Thank the linked repo/module works great with the --timeout option.

Weirdly I had an error

 ERROR  Failed to launch the browser process!                                                                                                                                                                                   10:57:50
[4211:4211:0817/105750.605590:ERROR:browser_main_loop.cc(1386)] Unable to open X display.


TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/master/docs/troubleshooting.md


  [4211:4211:0817/105750.605590:ERROR:browser_main_loop.cc(1386)] Unable to open X display.
  
  
  TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/master/docs/troubleshooting.md
  
  at onClose (/usr/lib/node_modules/magepack/node_modules/puppeteer/lib/Launcher.js:750:14)
  at ChildProcess.<anonymous> (/usr/lib/node_modules/magepack/node_modules/puppeteer/lib/Launcher.js:740:61)
  at ChildProcess.emit (events.js:327:22)
  at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)

When adding the --debug flag to either implementation. I suspect that is because I am running under WSL and no "window" can be opened.

Either way the PR does the trick, thanks!

Copy link
Collaborator

@krzksz krzksz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, thanks for giving back and contributing. Also, sorry it took me so much time to check this as I'm no longer involved into Magento projects.

Can you please adjust the code I mentioned and add the information about this option to the appropriate section in the README.md?

@mattc321 mattc321 requested a review from krzksz August 29, 2021 16:34
@cmorbitzer
Copy link

@krzksz Are there plans to merge this?

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.

5 participants