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

Failed to load URL happening with openTab but not open #309

Open
bradleygore opened this issue Sep 3, 2017 · 0 comments
Open

Failed to load URL happening with openTab but not open #309

bradleygore opened this issue Sep 3, 2017 · 0 comments

Comments

@bradleygore
Copy link

I know there are other open issues for the infamous Failed to load URL issue, however I'm not 100% sure this is or isn't related as what I'm seeing appears to be specifically related to opening some specific URLs in a new tab vs an existing window. I have a simple test script, using a URL accessible by anyone, provided in this gist.

Here are my specs:

OS Sierra 10.12.6

→ phantomjs -v
2.1.1

→ npm ls | grep horseman
├─┬ node-horseman@3.3.0

→ node -v
v6.10.0

→ npm -v
3.10.10

Example output when running the script in the gist above:

No Tab

→ DEBUG=horseman node ./horsemanTest.js
  horseman using PhantomJS from phantomjs module +0ms
  horseman .setup() creating phantom instance 1 +55ms
  horseman phantom created +759ms
  horseman phantom version 2.1.1 +16ms
  horseman page created +8ms
  horseman phantomjs onLoadFinished triggered success NaN +7ms
  horseman .open() http://techinfo.honda.com/rjanisis/content/rjxa_isisviewer_ui.aspx?v=&m=T2AD&k=pubs/sm/1/2/Contents/enu/61T2AD/GEN/SCT/SC/SYS/G006389_enu/web/html/G006389_enu&p=SM&t=H&model=ACCORD&year=2017&trim=&keyword=&path=&dbkey=61T2AD_G006389_enu&country=1&lang=0 +5ms
  horseman phantomjs onLoadFinished triggered success 1 +2s
  horseman .wait() 500 +4ms
  horseman .screenshot() ./horsemanReport.png +502ms
  horseman .close(). +4ms

With Tab

→ DEBUG=horseman node ./horsemanTest.js --tab
  horseman using PhantomJS from phantomjs module +0ms
  horseman .setup() creating phantom instance 1 +55ms
  horseman phantom created +764ms
  horseman phantom version 2.1.1 +16ms
  horseman page created +8ms
  horseman phantomjs onLoadFinished triggered success NaN +7ms
  horseman page created +8ms
  horseman phantomjs onLoadFinished triggered fail 1 +299ms
ERROR:  { Error: Failed to load url
    at checkStatus (/Users/bradley/Documents/projects/client/svc-lane-eadvisor/slea-webapps/web-scrapers/scrapers/honda-maint/node_modules/node-horseman/lib/index.js:292:16)
    at tryCatcher (/Users/bradley/Documents/projects/client/svc-lane-eadvisor/slea-webapps/web-scrapers/scrapers/honda-maint/node_modules/bluebird/js/release/util.js:16:23)
    at Function.Promise.attempt.Promise.try (/Users/bradley/Documents/projects/client/svc-lane-eadvisor/slea-webapps/web-scrapers/scrapers/honda-maint/node_modules/bluebird/js/release/method.js:39:29)
    at Object.loadFinishedSetup [as onLoadFinished] (/Users/bradley/Documents/projects/client/svc-lane-eadvisor/slea-webapps/web-scrapers/scrapers/honda-maint/node_modules/node-horseman/lib/index.js:290:43)
    at /Users/bradley/Documents/projects/client/svc-lane-eadvisor/slea-webapps/web-scrapers/scrapers/honda-maint/node_modules/node-phantom-simple/node-phantom-simple.js:636:30
    at Array.forEach (native)
    at IncomingMessage.<anonymous> (/Users/bradley/Documents/projects/client/svc-lane-eadvisor/slea-webapps/web-scrapers/scrapers/honda-maint/node_modules/node-phantom-simple/node-phantom-simple.js:617:17)
    at emitNone (events.js:91:20)
    at IncomingMessage.emit (events.js:185:7)
    at endReadableNT (_stream_readable.js:974:12)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)
  cause:
   Error: Failed to load url
       at checkStatus (/Users/bradley/Documents/projects/client/svc-lane-eadvisor/slea-webapps/web-scrapers/scrapers/honda-maint/node_modules/node-horseman/lib/index.js:292:16)
       at tryCatcher (/Users/bradley/Documents/projects/client/svc-lane-eadvisor/slea-webapps/web-scrapers/scrapers/honda-maint/node_modules/bluebird/js/release/util.js:16:23)
       at Function.Promise.attempt.Promise.try (/Users/bradley/Documents/projects/client/svc-lane-eadvisor/slea-webapps/web-scrapers/scrapers/honda-maint/node_modules/bluebird/js/release/method.js:39:29)
       at Object.loadFinishedSetup [as onLoadFinished] (/Users/bradley/Documents/projects/client/svc-lane-eadvisor/slea-webapps/web-scrapers/scrapers/honda-maint/node_modules/node-horseman/lib/index.js:290:43)
       at /Users/bradley/Documents/projects/client/svc-lane-eadvisor/slea-webapps/web-scrapers/scrapers/honda-maint/node_modules/node-phantom-simple/node-phantom-simple.js:636:30
       at Array.forEach (native)
       at IncomingMessage.<anonymous> (/Users/bradley/Documents/projects/client/svc-lane-eadvisor/slea-webapps/web-scrapers/scrapers/honda-maint/node_modules/node-phantom-simple/node-phantom-simple.js:617:17)
       at emitNone (events.js:91:20)
       at IncomingMessage.emit (events.js:185:7)
       at endReadableNT (_stream_readable.js:974:12)
       at _combinedTickCallback (internal/process/next_tick.js:74:11)
       at process._tickCallback (internal/process/next_tick.js:98:9),
  isOperational: true }
  horseman .close(). +4ms
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