Phantom won't open a url that is accessible (but will open it with fiddler running)

StackOverflow https://stackoverflow.com/questions/23349887

  •  11-07-2023
  •  | 
  •  

سؤال

I have a very simple phantom script that pretty much just opens a url and dumps the html to console (not actually, but I've narrowed the problem down to this):

page.open op.url, (status) ->
    console.log "opened #{op.url}"
    console.log page.evaluate -> document.all[0].outerHTML
    phantom.exit()

When the url is https://latestcommit-negotiate-demo.owex.com phantomjs just hangs and never invokes the page.open callback. The site definitely exists and I can hit its login page in any of a dozen different ways but not with phantom!

What's especially bizarre is that I want to see whats going on over the wire - so I open up fiddler and...it starts working. As long as fiddler is open my script works great. The second I close it, it hangs on page.open again.

This is phantom 1.9.7 and I'm invoking it with the --ignore-ssl-errors=true flag.

Short of "something something ssl?" I'm at the limit of my knowledge. What could be causing this?

هل كانت مفيدة؟

المحلول

The solution was that our server was not doing https via sslv2 but (surprisingly) via tlsv1. Fiddler was unwrapping the https envelope and rewrapping it with ssl. Adding a --ssl-protocol=any flag solved the issue.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top