Skip to end of metadata
Go to start of metadata

Description

You'll see this error when Sauce Labs doesn't receive a response from Selenium or Appium to your script's last command in more than five minutes (the default duration for the timeout). Without this timeout, any tests in which the Selenium, Appium server, or browser crashes would keep running forever, consuming all test minutes available in your account.

Cause

There are a few potential causes for this error.

  • The most common causes for this error are either unresponsive JavaScript in your application, or a bug in Selenium/Appium
  • A less common, but still possible cause, is Selenium or Appium legitimately needing more than five minutes to run your command
  • This error will also be thrown if the browser crashes during your test

How to Resolve

  • If the issue is Selenium needing more than five minutes to run your command, you can use the commandTimeout desired capability to have Sauce wait longer for your command to execute. You can find out more about this desired capability in the Timeouts section of the Test Configuration Options topic.
  • If the cause is a browser crash, the easiest way to check is to watch the video of the test. If this is the case, you may be able to resolve the error by removing memory-hungry commands from your test script, like fetching the page source or taking screenshots with Selenium.
  • No labels

1 Comment

  1. Causes

    This also happens if the browser crashes; You can often tell by watching the video.  It seems (but this is anecdata) that this is more likely with tests that have done a lot of Selenium-initiated screenshotting or fetching the page source, especially if they're doing so over and over.  My theory based on exactly no evidence is that this exhausts the memory on the box?

    SafariDriver falls over by itself because it's garbage.

    Resolution

    • If the browser has crashed, you may be able remove memory-hungry commands like fetching the page source or taking Screenshots with Selenium