title: CasperJS has been redirected and then exited with status=fail (HTTP 302)
body: <p>CasperJS version 1.1.4 at /opt/casperjs, using phantomjs version 2.1.1. Running on centOS.</p>
  
  <p>Trying to get through authentication page which runs on ASP.net webforms, but after submit button click:</p>
  
  <pre><code>casper.then(function(){
  if (this.exists("#LoginTyreLink_LoginButton")) {
      this.echo("Login button found");
      this.click("#LoginTyreLink_LoginButton", function(){
          saveShot("login_button_clicked");
      });
  }
  });
  </code></pre>
  
  <p>I am getting the redirect cycle and timeout:</p>
  
  <pre><code>[debug] [phantom] Mouse event 'mouseup' on selector: #Loginsite_LoginButton
  [debug] [phantom] Mouse event 'click' on selector: #Loginsite_LoginButton
  [info] [phantom] Step anonymous 14/17: done in 3131ms.
  [info] [phantom] Step _step 15/17 https://site.brand.eu/link/ (HTTP 200)
  [info] [phantom] Step _step 15/17: done in 3155ms.
  [debug] [phantom] Navigation requested: url=https://site.brand.eu/link/Homepage.aspx, type=Other, willNavigate=true, isMainFrame=true
  [debug] [phantom] Navigation requested: url=https://site.brand.eu/link/Login.aspx, type=Other, willNavigate=true, isMainFrame=true
  [debug] [phantom] Navigation requested: url=https://site.brand.eu/link//Homepage.aspx, type=Other, willNavigate=true, isMainFrame=true
  [debug] [phantom] Navigation requested: url=https://site.brand.eu/link/Login.aspx, type=Other, willNavigate=true, isMainFrame=true
  [debug] [phantom] Navigation requested: url=https://site.brand.eu/link/Homepage.aspx, type=Other, willNavigate=true, isMainFrame=true
  [debug] [phantom] Navigation requested: url=https://site.brand.eu/link/Login.aspx, type=Other, willNavigate=true, isMainFrame=true
  [debug] [phantom] Navigation requested: url=https://site.brand.eu/link/Homepage.aspx, type=Other, willNavigate=true, isMainFrame=true
  [debug] [phantom] Navigation requested: url=https://site.brand.eu/link/Login.aspx, type=Other, willNavigate=true, isMainFrame=true
  [debug] [phantom] Navigation requested: url=https://site.brand.eu/link/Homepage.aspx, type=Other, willNavigate=true, isMainFrame=true
  [debug] [phantom] Navigation requested: url=https://site.brand.eu/link/Login.aspx, type=Other, willNavigate=true, isMainFrame=true
  [warning] [phantom] Loading resource failed with status=fail (HTTP 302): https://site.brand.eu/link/Login.aspx
  [debug] [phantom] Automatically injected includes/jquery-3.3.1.js client side
  [warning] [phantom] Casper.waitFor() timeout
  [error] [phantom] Wait timeout of 20000ms expired, exiting.
  Wait timeout of 20000ms expired, exiting.
  [debug] [phantom] Navigation requested: url=about:blank, type=Other, willNavigate=true, isMainFrame=true
  [debug] [phantom] url changed to "about:blank"
  </code></pre>
  
  <p>I've tried to run the script on my local machine - it succeded, but can not on my remote centOS machine.</p>
  
  <p>P.S.</p>
  
  <p>It was fine for over a year...</p>