Skip to content

Errors thrown when inner frame is not available #966

Description

@jogger2510

My site runs a DNS blocker filtering the regex "betsonsport.ru", returning NXDOMAIN for any query. When trying to load content from this domain into a frame, regular browsers stay silent and display white space or a warning sign instead.

HtmlUnit throws an error that cannot be suppressed with all the error silencers. In my view, no connection attempt should be made at all.

Error snippet:
Mai 16, 2025 12:59:32 PM org.htmlunit.html.BaseFrameElement loadInnerPageIfPossible
SCHWERWIEGEND: IOException when getting content for iframe: url=[https://www.betsonsport.ru/banners/lend4.php]
javax.net.ssl.SSLHandshakeException: (certificate_unknown) PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:130)
at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:383)
at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:326)
at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:321)
at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.checkServerCerts(CertificateMessage.java:1326)
at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.onConsumeCertificate(CertificateMessage.java:1203)
at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.consume(CertificateMessage.java:1146)
at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:393)
at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:476)
at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:447)
at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:206)
at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:172)
at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1507)
at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1422)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:455)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:426)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:436)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:384)
at org.htmlunit.httpclient.HtmlUnitSSLConnectionSocketFactory.connectSocket(HtmlUnitSSLConnectionSocketFactory.java:176)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:376)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)
at org.htmlunit.HttpWebConnection.getResponse(HttpWebConnection.java:191)
at org.htmlunit.WebClient.getWebResponseOrUseCached(WebClient.java:1726)
at org.htmlunit.WebClient.loadWebResponseFromWebConnection(WebClient.java:1631)
at org.htmlunit.WebClient.loadWebResponse(WebClient.java:1556)
at org.htmlunit.WebClient.getPage(WebClient.java:485)
at org.htmlunit.WebClient.getPage(WebClient.java:402)
at org.htmlunit.html.BaseFrameElement.loadInnerPageIfPossible(BaseFrameElement.java:211)
at org.htmlunit.html.BaseFrameElement.loadInnerPage(BaseFrameElement.java:121)
at org.htmlunit.html.HtmlPage.loadFrames(HtmlPage.java:1898)
at org.htmlunit.html.HtmlPage.initialize(HtmlPage.java:267)
at org.htmlunit.WebClient.loadWebResponseInto(WebClient.java:701)
at org.htmlunit.WebClient.loadWebResponseInto(WebClient.java:575)
at org.htmlunit.WebClient.getPage(WebClient.java:493)
at org.htmlunit.WebClient.getPage(WebClient.java:402)
at org.htmlunit.WebClient.getPage(WebClient.java:538)
at org.htmlunit.WebClient.getPage(WebClient.java:520)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions