Menu

#1813 about://blank is not supported, only about:blank is supported now.

2.23
closed
RBRi
None
1
2016-11-03
2016-08-24
No

This is the code:
WebClient client=new WebClient();
client.getOptions().setThrowExceptionOnFailingStatusCode(false);
client.getOptions().setThrowExceptionOnScriptError(false);
client.getPage("http://toutiao.com/a6321930090477568257");
The url http://toutiao.com/a6321930090477568257 can be opened with any browser but failed in htmlunit with error:
Exception in thread "main" java.lang.IllegalArgumentException: about://blank is not supported, only about:blank is supported now.
at com.gargoylesoftware.htmlunit.WebClient.makeWebResponseForAboutUrl(WebClient.java:1106)
at com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java:1231)
at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:347)
at com.gargoylesoftware.htmlunit.html.BaseFrameElement.loadInnerPageIfPossible(BaseFrameElement.java:184)
at com.gargoylesoftware.htmlunit.html.BaseFrameElement.loadInnerPage(BaseFrameElement.java:122)
at com.gargoylesoftware.htmlunit.html.HtmlPage.loadFrames(HtmlPage.java:1843)
at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:242)
at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:489)
at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:351)
at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:421)
at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:401)

Discussion

  • jason.dong

    jason.dong - 2016-08-24

    exception is shouldn't be threw when url starts with [about://blank].
    this exception should be catched and doing nothing.

     

    Last edit: jason.dong 2016-08-24
  • RBRi

    RBRi - 2016-08-24
    • status: open --> accepted
    • assigned_to: RBRi
     
  • RBRi

    RBRi - 2016-08-24

    fixed in SVN

     
  • RBRi

    RBRi - 2016-08-24
    • status: accepted --> closed
     
  • shawn

    shawn - 2016-11-03

    hi
    i download the last version of htmlunit 2.23
    and it still can't work
    i still get this bug while parsing this website
    any help?

     
  • RBRi

    RBRi - 2016-11-03

    Please try the latest snapshot

     

Log in to post a comment.