Hello,
with htmlunit trunk and the the following code:
package playground;
import java.io.IOException;
import java.net.MalformedURLException;
import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException;
import com.gargoylesoftware.htmlunit.NicelyResynchronizingAjaxController;
import com.gargoylesoftware.htmlunit.WebClient;
public class Playground {
public static void main(String[] args) throws FailingHttpStatusCodeException, MalformedURLException, IOException {
WebClient wc = new WebClient();
wc.getOptions().setJavaScriptEnabled(true);
wc.getOptions().setThrowExceptionOnFailingStatusCode(false);
wc.getOptions().setThrowExceptionOnScriptError(false);
wc.setAjaxController(new NicelyResynchronizingAjaxController());
wc.getPage("<REDACTED_URL>");
}
}
I end up in a deadlock. jstack dump attached.
It's a customer site and because of that I can't post the URL. I've tried solving the problem on my own unsuccessfully. Any more data you need (apart from the URL), or if there's anything I can do w/ regards to debugging, let me know.
Cheers,
Sebastian Cato
From a first look i guess you are simulating IE8 or at least a browser with JS_WINDOW_POST_MESSAGE_SYNCHRONOUS set. Correct?
Yes. I'm using the exact code above and
confirms that it is IE8 and JS_WINDOW_POST_MESSAGE_SYNCHRONOUS is set. Using a BrowserVersion like IE8 with JS_WINDOW_POST_MESSAGE_SYNCHRONOUS disabled does not lead to a deadlock.
Is it ok for you to switch off this feature or use a different browser?
Fixing the issues will not be that easy.
Yes, it works for me. Thank you!
Will leave the issue open for some time because the rule of your deadlock is a general problem we have in our code. Maybe i will wake up some day with an idea.