These are chat archives for rosshinkley/nightmare

19th
Jul 2016
Sammy Yu
@sammyyu
Jul 19 2016 00:20
hi guys. I have a weird problem on CentOS 7 with xvfb. I have a nightmare nodejs program which launches multiple electron instances. Some of the electron processes crash intermittently in libGL.so.1.2.0 (which I don't mind that much as long as I can relaunch). I have a series of chained calls, but .catch() doesn't seem to see the crash (it seems like the node process thread just hangs). Is there a way to catch this?
Rick Medina
@rickmed
Jul 19 2016 01:08
@sammyyu what is the size of the vm? what is the provider/host?
Rick Medina
@rickmed
Jul 19 2016 01:14
node will only catch errors within the node script or processes spawn from the script. Things I'd check: I have the correct xvfb related packages installed to run it on centOS, dev/shm size, overall vm memory, the last two specially in terms of how electron instances are being ran
Jimmy Latour
@labodudev
Jul 19 2016 08:18
Hi everybody
Can i extract request response after click on input button ? This input button send a XHR . I just wanna check the response of this request. Thanks
Gediminas Bivainis
@bivainis
Jul 19 2016 13:52
Hey, I've just realized that there aren't any alerts/confirms/prompts in electron. Is it possible to somehow detect them with nightmare? Let's say I have an angular app where button click fires a confirm dialog, asking me if I really want to delete an item. How would I simulate 'ok' or 'cancel' in this case? I think phantomjs has window.onAlert method, but can't find anything for nightmare.
Ross Hinkley
@rosshinkley
Jul 19 2016 17:07
@sammyyu possibly silly question: are you running with DEBUG?
@labodudev hm, i don't know if you'd be able to get at the response directly... you might have better luck putting your requests through a proxy and looking at the response there
@gebidesign the alert, prompt and confirm boxes are all taken care of by the stock preload
you should be able to subscribe to them with .on() using the page event
if you need them to behave differently, you'll need to write your own preload