These are chat archives for rosshinkley/nightmare

26th
Oct 2016
Sagi
@saginadir
Oct 26 2016 12:26
Hi guys, I am breaking my head, I am looking for something similar to casperjs ability:
casper.on('resource.received', function(resource) {
    casper.echo(resource.url);
});
jomcat
@jomcat
Oct 26 2016 15:34
@Siilwyn Haha I ran your code and never again :-) It crashed... Big time! When I went to the page in question the speaker icon kept rotating and I could do a few things with dev tools but then my whole machine hung. I tried a few more URLs on jukebox.today and got the same result. I only started with Node/Nightmare this week so I'm afraid I'm not much help beyond telling you that you're not mad... It does crash! (Node 6, latest nightmare running on Win10 64. )
Selwyn
@Siilwyn
Oct 26 2016 16:45
@jomcat thank you very much for confirming it on Windows!
It seems like a serious error that's caused by a regression since it did work before.
Rob Brackett
@Mr0grog
Oct 26 2016 17:29
@saginadir You can use the did-get-response-details event: https://gitter.im/rosshinkley/nightmare?at=57c9f7f3928ae0e73471f774
Rob Brackett
@Mr0grog
Oct 26 2016 18:42

@Siilwyn The "circular structure" issue was likely fixed by segmentio/nightmare#747

…but you should create an issue on GitHub for the hang

Sagi
@saginadir
Oct 26 2016 19:49
@Mr0grog did-get-response-details worked like a charm!! - Spent like 4 hours looking for this today, even wrote a casperjs fallback ( which is bad )
Rob Brackett
@Mr0grog
Oct 26 2016 21:34
@saginadir No problem! Could you close the issue in Github if that worked for you?
Rob Brackett
@Mr0grog
Oct 26 2016 21:49
@Siilwyn pretty sure your hang is related to the capturing of console.log calls. Not sure if it broke as a result of a change in Electron (hanging when it can’t serialize something across IPC) or a change in what the actual site (jukebox.today) is logging. Either way, even though it’s not due to a change in Nightmare, Nightmare should probably be hardened against it.
But you should file on Github, where the issue can actually be fixed