Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call to .open() fails without an error #287

Open
emarthinsen opened this issue May 12, 2017 · 0 comments
Open

Call to .open() fails without an error #287

emarthinsen opened this issue May 12, 2017 · 0 comments

Comments

@emarthinsen
Copy link

Hi. I'm calling .open() to load a web page and about 50% of the time it fails without throwing an error. The promise chain just stops. Here's an example of the output I get from my app:

⨂ src (master)$: DEBUG='horseman*' BLUEBIRD_DEBUG=1 node local.js
  horseman using PhantomJS from $PATH +0ms
  horseman .setup() creating phantom instance 1 +237ms
  horseman .viewport() set 1440 undefined +12ms
  horseman phantom created +951ms
  horseman phantom version 2.1.1 +14ms
  horseman page created +9ms
  horseman phantomjs onLoadFinished triggered success NaN +8ms
  horseman .userAgent() set Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36 +13ms
Trying to open the Google page
  horseman .open() https://www.google.com/ +0ms
⨂ src (master)$:

And here's a copy of part of the code:

    horseman
      .setDefaults()

      .log('Trying to open the Google page')

      .open(GOOGLE_PAGE)
      .url()
      .then(url => { console.log(`URL: ${url}`); })

My chain of calls goes on for a bit after that and ultimately ends with a catch block. It never gets called.

Does anyone know why loading the page might be failing without an error? It's fine if it fails, I just need to be able to detect it and retry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant