title: Java PhantomJS NETWORK_ERR XMLHttpRequest Exception 101
body: <p>I'm trying to get the page <a href="https://secure.twitch.tv/login" rel="nofollow noreferrer">https://secure.twitch.tv/login</a> with PhantomJS in Java using Selenium, but on the driver.get(...) I always get crashed with this error. I've tried implementing this:</p>
  
  <pre><code>String [] phantomJsArgs = {"--web-security=no", "--ignore-ssl-errors=yes"};
  desireCaps.setCapability(PhantomJSDriverService.PHANTOMJS_GHOSTDRIVER_CLI_ARGS, phantomJsArgs);
  </code></pre>
  
  <p>But that doesn't seem to make a difference. Does anyone know a workaround?</p>
  
  <p>Here is some code:</p>
  
  <pre><code>private void setup(){
          DesiredCapabilities desireCaps = new DesiredCapabilities();
          desireCaps.setCapability(PhantomJSDriverService.PHANTOMJS_EXECUTABLE_PATH_PROPERTY, "C:\\Users\\Scott\\workspace\\Twitch Bot v2\\libs\\phantomjs.exe");
          desireCaps.setCapability("takesScreenshot", true);
          String [] phantomJsArgs = {"--disable-web-security"};
          desireCaps.setCapability(PhantomJSDriverService.PHANTOMJS_GHOSTDRIVER_CLI_ARGS, phantomJsArgs);
          driver = new PhantomJSDriver(desireCaps); 
          //driver = new HtmlUnitDriver();
      }
  </code></pre>
  
  <p>This is what the console is printing out when I try to grab the twitch page.</p>
  
  <p><img src="https://i.stack.imgur.com/4saDi.png" alt="This is what the console prints out when I try to get the twitch link."></p>