Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

255
Views
Nightmare hangs on goto()

I have been recently working with NightmareJS and I am now having a problem. It seems as though whenever I try to load a page using Nightmare and wait for a selector to exist, it hangs on the goto call. I have the following code and the only thing printed to console is "loading".

nm = new Nightmare({show: false});

console.log("loading");

nm.goto("https://www.google.com")

.then(() => {
  return nm.wait(".gbqfba")
  .then(() => {
    console.log("search bar loaded, showing browser");
    nm.show();
  })
  .catch((err) => {
    console.log(err.toString());
  })
})
.catch(error => console.log('An error occurred:', error));

(the class 'gbqfba' is a hidden part of the search bar that I wait for so I know the bar is loaded)

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

nightmare.show() is no more a function and you need to set it during initialize.To view nightmare's renderer window, you need to pass

var nightmare = Nightmare({ show: true });

Also, you can turn on the Developer tools, so that you can manually check if document.querySelector(".gbqfba"); is working.

var nightmare = Nightmare({
   openDevTools: true,
   show: true
});
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!