Closed noahtkeller closed 7 years ago
It consistently fails when loading this resource in headless:
https://albertsons.mywebgrocer.com//Ajax/CustomerData/Get/98829CD9-7DC8-4B9E-AE3B-36E0944F5E9B?timestamp=1472571059737
Which returns the following
var CustomerData =
{"error":"","customerIdentified":false,"pseudoChainId":"3694327"}
OnCustomerDataReceived();
I updated the test script to try the following, but it did no good:
, webPreferences: {
webSecurity: false
}
Hm, I can't reproduce the issue with 2.6.1 on my headless setup.
I don't think it's a security problem, and what's truly unfortunate is that the code is the generic networking timeout. What version are you using on your headless setup, and how are you executing headlessly?
Starting with:
xvfb-run --server-args="-screen 0 1920x1080x24" node test.js
Versions:
nightmare 2.6.1
electron-prebuilt 1.3.4
node 6.3.1
&& node 4.4.4
Ubuntu 14.04.5 LTS
Are you still having trouble and have you tried 2.10.0? I am going to close this, but feel free to re-open if it's still an issue.
On some sites I have noticed that the .goto() call times out when visiting certain urls while running on headless linux.
I followed advice on another thread and setup xvfb on my ubuntu server, and when running scripts most succeed, however I have noticed that some sites appear to never load. I have set
DEBUG=nightmare*
and see that I receive 200 codes from the server, and I see it loads all the resources, it just doesn't ever finalize.Please see the attached script:
Test Script
This will always result in a a navigation timeout error. Change the link to almost any other site, such as http://google.com and it works fine. This issue is not apparent when running locally on OSX, even with xvfb.
Standard Output (working)
Headless Output (not working)