microsoft / playwright-java

Java version of the Playwright testing and automation library
https://playwright.dev/java/
Apache License 2.0
1.13k stars 205 forks source link

Gettign timeout error for page.navigate api #1594

Closed ThatYodaCoder closed 3 months ago

ThatYodaCoder commented 3 months ago

I am playwright V1.34.0 JAR in my project.

I am executing following code . But getting timeout error exception in page.navigate. But page.onResponse is showing 200 status code and also showing the html body

   page.onResponse(response -> log.info(("page.onResponse :: <<" + response.status() + " " + response.url() + " :: resp:" +response.text())));

    Response navigate = page.navigate( "some-url", new Page.NavigateOptions().setTimeout(90000)); 

Exception:


    com.microsoft.playwright.TimeoutError: Error {
  message='Timeout 90000ms exceeded.
=========================== logs ===========================
navigating to "some-url", waiting until "load"
============================================================
  name='TimeoutError
  stack='TimeoutError: Timeout 90000ms exceeded.
=========================== logs ===========================
navigating to "some-url", waiting until "load"
============================================================
    at ProgressController.run (/tmp/playwright-java-2681915607315639140/package/lib/server/progress.js:88:26)
    at Frame.goto (/tmp/playwright-java-2681915607315639140/package/lib/server/frames.js:521:23)
    at FrameDispatcher.goto (/tmp/playwright-java-2681915607315639140/package/lib/server/dispatchers/frameDispatcher.js:75:121)
    at DispatcherConnection.dispatch (/tmp/playwright-java-2681915607315639140/package/lib/server/dispatchers/dispatcher.js:312:46)
}
    at com.microsoft.playwright.impl.WaitableResult.get(WaitableResult.java:52)
    at com.microsoft.playwright.impl.ChannelOwner.runUntil(ChannelOwner.java:111)
    at com.microsoft.playwright.impl.Connection.sendMessage(Connection.java:126)
    at com.microsoft.playwright.impl.ChannelOwner.sendMessage(ChannelOwner.java:102)
    at com.microsoft.playwright.impl.FrameImpl.navigateImpl(FrameImpl.java:463)
    at com.microsoft.playwright.impl.PageImpl.lambda$navigate$45(PageImpl.java:836)
    at com.microsoft.playwright.impl.LoggingSupport.withLogging(LoggingSupport.java:47)
    at com.microsoft.playwright.impl.ChannelOwner.withLogging(ChannelOwner.java:87)
    at com.microsoft.playwright.impl.PageImpl.navigate(PageImpl.java:836)
    at com.microsoft.playwright.impl.PageImpl.navigate(PageImpl.java:42)
yury-s commented 3 months ago

This doesn't sound like a bug or feature request, please use our community resources for general questions. If you think this is a bug in Playwright, please open a new issue and follow the bug template.