title: phantomjs stuck at [DEBUG] WebPage - setupFrame ""
body: <p>Could you tell me why the following script doesn't work? PhantomJS gets stuck at </p>
  
  <blockquote>
    <p>[DEBUG] WebPage - setupFrame "".</p>
  </blockquote>
  
  <pre><code>// phantomjs --debug=true --ignore-ssl-errors=yes --ssl-protocol=any test.js &lt; data.json
  
  var page = require('webpage').create();
  var system = require('system');
  var input = JSON.parse(system.stdin.read(2000));
  
  console.log(JSON.stringify(input));
  
  //phantom.onConsoleMessage = function(msg){ console.log(msg); }
  
  page.onResourceError = function(resourceError) {
          page.reason = resourceError.errorString;
          page.reason_url = resourceError.url;
  };
  
  page.open(input.address, function(status){ 
  
      if (status !== 'success'){
          console.log("url: "+page.reason_url+"reason: "+page.reason);
          phantom.exit(1)
      }
  
      page.onLoadFinished = function(){
          input.cookies = page.cookies;
          console.log(JSON.stringify(input));
          phantom.exit();
      };
  
  });
  </code></pre>
  
  <p>data.json</p>
  
  <pre><code>{"cookies": [], "address": "https://google.com"}
  </code></pre>