TimeoutException after 5 minutes

Hello,

I have a test that generates and downloads a report. The problem is that sometimes generating the report takes longer than 5 minutes.

I get a TimeoutException in Chrome and it looks like it is generated after 5 minutes. Is there a default timeout in Katalon or in Chrome that I can change or does someone know how to bypass this issue?

Error message:
11:39:26.225 / 11:44:39.335 / 00:05:13.110
Reason:com.kms.katalon.core.exception.StepFailedException: Unable to navigate to ‘https:…’
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:64)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:26)
at com.kms.katalon.core.webui.keyword.builtin.NavigateToUrlKeyword.navigateToUrl(NavigateToUrlKeyword.groovy:83)
at com.kms.katalon.core.webui.keyword.builtin.NavigateToUrlKeyword.execute(NavigateToUrlKeyword.groovy:67)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:72)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.navigateToUrl(WebUiBuiltInKeywords.groovy:183)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$navigateToUrl$0.call(Unknown Source)
at Rapportage opvragen voor ppp.run(Rapportage opvragen voor ppp:46)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:337)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:328)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:307)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:299)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:233)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(TestSuiteExecutor.java:169)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:142)
at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:91)
at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:157)
at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
at TempTestSuite1576146988735.run(TempTestSuite1576146988735.groovy:36)
Caused by: org.openqa.selenium.TimeoutException: timeout
(Session info: chrome=78.0.3904.108)
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’
System info: host: ‘W10’, ip: ‘192’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_181’
Driver info: com.kms.katalon.selenium.driver.CChromeDriver
Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 78.0.3904.108, chrome: {chromedriverVersion: 77.0.3865.40 (f484704e052e0…, userDataDir: …\L…}, goog:chromeOptions: {debuggerAddress: localhost:52666}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: XP, platformName: XP, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify}
Session ID: 99f512610b086e4e5d4a3d80f97ec74d
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at com.kms.katalon.selenium.driver.CChromeDriver.execute(CChromeDriver.java:19)
at org.openqa.selenium.remote.RemoteWebDriver.get(RemoteWebDriver.java:277)
at org.openqa.selenium.remote.RemoteWebDriver$RemoteNavigation.to(RemoteWebDriver.java:857)
at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringNavigation.to(EventFiringWebDriver.java:569)
at com.kms.katalon.core.webui.keyword.builtin.NavigateToUrlKeyword$_navigateToUrl_closure1.doCall(NavigateToUrlKeyword.groovy:81)
at com.kms.katalon.core.webui.keyword.builtin.NavigateToUrlKeyword$_navigateToUrl_closure1.call(NavigateToUrlKeyword.groovy)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:20)
… 19 more

Hello @heugy
Its a little bit hard to understand what you’re exactly trying to do… Especially when you say downloads a report. Could you show us the script that you’re trying to run?

Hi Chistoph,

In fact is is very simple i go to a website and that website is rendering a report (xlsx file) (its a report server from Microsoft)

This is the script part what can take a long time:

WebUI.navigateToUrl(reportUrl + id + ‘&rs:Command=Render&rs:Format=EXCELOPENXML’)

sometimes the rendering takes longer than 5 minutes and than i get a timeout. If the report is ready in 5 minutes than the script works fine.

1 Like

You can handle this in one of two ways. I’ll give you the quick-and-dirty way first, then give you some food for thought on how you could approach this differently:

1.) Open Project > Settings > Execution, and adjust the default wait time:

As you can see, for me this is defaulted to 600 seconds (10 minutes). The label states “… when IE hangs…” but I believe this setting applies to all browsers, not just IE.

2.) It looks like you are actually hitting an API (not a “website” in the traditional sense). If this is the case, you would be much better served handling this as an API test. Please reference this:

If you’d like to go down that path (which is the best option, IMO), I can give you more details.

Hi Brandon_Hein,
I already tried to change the “Default wait time when IE hangs” but for me it does not solve my problem.
the second testing with an API: I don’t no if reporting server 2012 has an API to test this, i tried something with SOAP (i believe reporting server 2012 has no rest api) but I could not get a connection.

Alright if that setting doesn’t apply to chromedriver, then you can get the driver manually and manipulate the timeout before navigating to that url. Give this a try:

import java.util.concurrent.TimeUnit
import org.openqa.selenium.chrome.ChromeDriver
import com.kms.katalon.core.webui.driver.DriverFactory

ChromeDriver driver = DriverFactory.getWebDriver()
driver.manage().timeouts().pageLoadTimeout(10, TimeUnit.MINUTES)
driver.get("https:…")
1 Like