These are chat archives for rosshinkley/nightmare

18th
May 2017
finjo
@finjo
May 18 2017 11:17
Hi, we're experiencing random issues using wait(fn). The function sometimes does not get executed and wait times out (even though manually executing the function returns true). Any advice?
johnferro
@johnferro
May 18 2017 13:47
@finjo The first thing I would check is that the function isn't depending on any particular element being present that might be there when you execute it manually but isn't there when nightmare executes it. I would find it very strange that the function doesn't get executed at all, it seems more likely that it does get executed but doesn't appear that way
johnferro
@johnferro
May 18 2017 13:53
@awilson28 If you have nightmare running in display node you can have the web console open and see any errors coming from the page there (or setup nightmare event listeners: https://github.com/segmentio/nightmare#extract-from-the-page)
finjo
@finjo
May 18 2017 14:31
@johnferro we increased the waitTimeout to 60000 so we could execute the function (in the webconsole of electron), during the time that nightmare is waiting.
It returned true while nightmare was still waiting.
we also added a console.log statement to the wait function.
In the instances where nightmare timed out, no output could be obseverd (in the webconsole of electron)
In the instances where nightmare did not time out, the output could be obseverd (in the webconsole of electron)
This led us to believe that sometimes the wait function is not executed
johnferro
@johnferro
May 18 2017 17:55
@finjo Ah interesting. Do you have any relevant code that you can share? Also what versions of nightmare/electron are you using?