[HtmlUnit] [htmlunit:bugs] #2017 The application freezes after webClient.getPage() is called
RBRi via HtmlUnit-develop <[email protected]> Fri, 10 Mar 2023 18:52:24 -0000
| Newsgroups | gmane.comp.java.htmlunit.devel |
|---|---|
| Message-ID | </p/htmlunit/bugs/2017/2dc1353066ed9d0b9bc968d085a77d132fa6c034.bugs@htmlunit.p.sourceforge.net> |
This is a multi-part message in MIME format.
--===============4731103358637348983==
Content-Type: multipart/related; boundary="===============5796565435275850492=="
This is a multi-part message in MIME format.
--===============5796565435275850492==
Content-Type: multipart/alternative; boundary="===============7830189542116467715=="
MIME-Version: 1.0
--===============7830189542116467715==
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
seems to work now with the upcomming 3.0.0 release.
---
** [bugs:#2017] The application freezes after webClient.getPage() is called**
**Status:** open
**Group:** 2.35.0
**Created:** Thu Jun 13, 2019 10:42 AM UTC by anton.grinenko
**Last Updated:** Thu Jun 13, 2019 10:42 AM UTC
**Owner:** nobody
**Attachments:**
- [htmlunit_issue.png](https://sourceforge.net/p/htmlunit/bugs/2017/attachment/htmlunit_issue.png) (63.7 kB; image/png)
Hi,
Here is a simpe code to reproduce the issue:
~~~
public static void main(String[] args) throws IOException {
final WebClient webClient = new WebClient(BrowserVersion.CHROME);
webClient.getOptions().setThrowExceptionOnFailingStatusCode(true);
webClient.getOptions().setJavaScriptEnabled(true);
webClient.getOptions().setActiveXNative(true);
webClient.getOptions().setAppletEnabled(false);
webClient.getOptions().setCssEnabled(true);
webClient.getOptions().setDoNotTrackEnabled(true);
webClient.getOptions().setGeolocationEnabled(false);
webClient.getOptions().setPopupBlockerEnabled(true);
webClient.getOptions().setPrintContentOnFailingStatusCode(true);
webClient.getOptions().setThrowExceptionOnScriptError(true);
webClient.getOptions().setUseInsecureSSL(true);
webClient.getCookieManager().setCookiesEnabled(true);
webClient.getOptions().setRedirectEnabled(true);
HtmlPage page = webClient.getPage("https://new.santehnika-online.ru/product/unitaz_podvesnoy_gustavsberg_estetic_hygienic_flush_chernyy/");
final String pageAsText = page.asText();
System.out.println("====>>>> page: " + pageAsText);
webClient.close();
}
~~~
The application freezes at webClient.getPage(...) call. Also I see with jvisualvm that memory grows.
---
Sent from sourceforge.net because [email protected] is subscribed to https://sourceforge.net/p/htmlunit/bugs/
To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.
--===============7830189542116467715==
MIME-Version: 1.0
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: 7bit
<div class="markdown_content"><p>seems to work now with the upcomming 3.0.0 release.</p>
<hr/>
<p><strong> <a class="alink" href="https://sourceforge.net/p/htmlunit/bugs/2017/">[bugs:#2017]</a> The application freezes after webClient.getPage() is called</strong></p>
<p><strong>Status:</strong> open<br/>
<strong>Group:</strong> 2.35.0<br/>
<strong>Created:</strong> Thu Jun 13, 2019 10:42 AM UTC by anton.grinenko<br/>
<strong>Last Updated:</strong> Thu Jun 13, 2019 10:42 AM UTC<br/>
<strong>Owner:</strong> nobody<br/>
<strong>Attachments:</strong></p>
<ul>
<li><a class="" href="https://sourceforge.net/p/htmlunit/bugs/2017/attachment/htmlunit_issue.png">htmlunit_issue.png</a> (63.7 kB; image/png)</li>
</ul>
<p>Hi,</p>
<p>Here is a simpe code to reproduce the issue:</p>
<div class="codehilite"><pre><span></span><code><span class="nt">public</span><span class="w"> </span><span class="nt">static</span><span class="w"> </span><span class="nt">void</span><span class="w"> </span><span class="nt">main</span><span class="o">(</span><span class="nt">String</span><span class="cp">[]</span><span class="w"> </span><span class="nt">args</span><span class="o">)</span><span class="w"> </span><span class="nt">throws</span><span class="w"> </span><span class="nt">IOException</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="err">final</span><span class="w"> </span><span class="err">WebClient</span><span class="w"> </span><span class="err">webClient</span><span class="w"> </span><span class="err">=</span><span class="w"> </span><span class="err">new</span><span class="w"> </span><span class="err">WebClient(BrowserVersion.CHROME)</span><span class="p">;</span>
<span class="w"> </span><span class="err">webClient.getOptions().setThrowExceptionOnFailingStatusCode(true)</span><span class="p">;</span>
<span class="w"> </span><span class="err">webClient.getOptions().setJavaScriptEnabled(true)</span><span class="p">;</span>
<span class="w"> </span><span class="err">webClient.getOptions().setActiveXNative(true)</span><span class="p">;</span>
<span class="w"> </span><span class="err">webClient.getOptions().setAppletEnabled(false)</span><span class="p">;</span>
<span class="w"> </span><span class="err">webClient.getOptions().setCssEnabled(true)</span><span class="p">;</span>
<span class="w"> </span><span class="err">webClient.getOptions().setDoNotTrackEnabled(true)</span><span class="p">;</span>
<span class="w"> </span><span class="err">webClient.getOptions().setGeolocationEnabled(false)</span><span class="p">;</span>
<span class="w"> </span><span class="err">webClient.getOptions().setPopupBlockerEnabled(true)</span><span class="p">;</span>
<span class="w"> </span><span class="err">webClient.getOptions().setPrintContentOnFailingStatusCode(true)</span><span class="p">;</span>
<span class="w"> </span><span class="err">webClient.getOptions().setThrowExceptionOnScriptError(true)</span><span class="p">;</span>
<span class="w"> </span><span class="err">webClient.getOptions().setUseInsecureSSL(true)</span><span class="p">;</span>
<span class="w"> </span><span class="err">webClient.getCookieManager().setCookiesEnabled(true)</span><span class="p">;</span>
<span class="w"> </span><span class="err">webClient.getOptions().setRedirectEnabled(true)</span><span class="p">;</span>
<span class="w"> </span><span class="err">HtmlPage</span><span class="w"> </span><span class="err">page</span><span class="w"> </span><span class="err">=</span><span class="w"> </span><span class="err">webClient.getPage("</span><span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">new</span><span class="o">.</span><span class="n">santehnika-online</span><span class="o">.</span><span class="n">ru</span><span class="o">/</span><span class="n">product</span><span class="o">/</span><span class="n">unitaz_podvesnoy_gustavsberg_estetic_hygienic_flush_chernyy</span><span class="o">/</span><span class="s2">");</span>
<span class="s2"> final String pageAsText = page.asText();</span>
<span class="s2"> System.out.println("</span><span class="o">====>>>></span><span class="w"> </span><span class="kc">page</span><span class="o">:</span><span class="w"> </span><span class="err">"</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">pageAsText</span><span class="p">);</span>
<span class="w"> </span><span class="err">webClient.close()</span><span class="p">;</span>
<span class="w"> </span><span class="p">}</span>
</code></pre></div>
<p>The application freezes at webClient.getPage(...) call. Also I see with jvisualvm that memory grows.</p>
<hr/>
<p>Sent from sourceforge.net because [email protected] is subscribed to <a href="https://sourceforge.net/p/htmlunit/bugs/">https://sourceforge.net/p/htmlunit/bugs/</a></p>
<p>To unsubscribe from further messages, a project admin can change settings at <a href="https://sourceforge.net/p/htmlunit/admin/bugs/options.">https://sourceforge.net/p/htmlunit/admin/bugs/options.</a> Or, if this is a mailing list, you can unsubscribe from the mailing list.</p></div>
--===============7830189542116467715==--
--===============5796565435275850492==--
--===============4731103358637348983==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--===============4731103358637348983==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
HtmlUnit-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop
--===============4731103358637348983==--