Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Intermittent failure on - 404 from Selenium server #572

bobsilverberg opened this Issue · 6 comments

4 participants


Most recent failure:

This seems to be an ongoing intermittent issue. The problem is that the call to selenium.get at is throwing an exception. I discussed this with @davehunt and the 404 that we see thrown in the stack trace isn't a 404 on the addons page, but rather a 404 from the Selenium server.

I will continue to discuss this with @davehunt, but if anyone has any feedback to share please add it to this issue.

Stack Trace:

self =
mozwebqa =

def test_that_version_information_is_displayed(self, mozwebqa):
    """Test for Litmus 9890."""
  details_page = Details(mozwebqa, 'Firebug')


self =
testsetup =
addon_name = 'Firebug'

def __init__(self, testsetup, addon_name=None):
    #formats name for url
    Base.__init__(self, testsetup)
    if (addon_name != None):
        self.addon_name = addon_name.replace(" ", "-")
        self.addon_name = re.sub(r'[^A-Za-z0-9\-]', '', self.addon_name).lower()
        self.addon_name = self.addon_name[:27]
      self.selenium.get("%s/addon/%s" % (self.base_url, self.addon_name))


self =
url = ''

def get(self, url):
        Loads a web page in the current browser session.
  self.execute(Command.GET, {'url': url})


self =
driver_command = 'get'
params = {'sessionId': u'1353385547764', 'url': ''}

def execute(self, driver_command, params=None):
        Sends a command to be executed by a command.CommandExecutor.

         - driver_command: The name of the command to execute as a string.
         - params: A dictionary of named parameters to send with the command.

          The command's JSON response loaded into a dictionary object.
    if not params:
        params = {'sessionId': self.session_id}
    elif 'sessionId' not in params:
        params['sessionId'] = self.session_id

    params = self._wrap_value(params)
    response = self.command_executor.execute(driver_command, params)
    if response:


self =
response = {'status': 404, 'value': ''}

def check_response(self, response):
        Checks that a JSON response from the WebDriver does not have an error.

         - response - The JSON response from the WebDriver server as a dictionary

        :Raises: If the response contains an error message.
    status = response['status']
    if status == ErrorCode.SUCCESS:
    exception_class = ErrorInResponseException
    if status == ErrorCode.NO_SUCH_ELEMENT:
        exception_class = NoSuchElementException
    elif status == ErrorCode.NO_SUCH_FRAME:
        exception_class = NoSuchFrameException
    elif status == ErrorCode.NO_SUCH_WINDOW:
        exception_class = NoSuchWindowException
    elif status == ErrorCode.STALE_ELEMENT_REFERENCE:
        exception_class = StaleElementReferenceException
    elif status == ErrorCode.ELEMENT_NOT_VISIBLE:
        exception_class = ElementNotVisibleException
    elif status == ErrorCode.INVALID_ELEMENT_STATE:
        exception_class = InvalidElementStateException
    elif status == ErrorCode.INVALID_SELECTOR \
            or status == ErrorCode.INVALID_XPATH_SELECTOR \
            or status == ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
        exception_class = InvalidSelectorException
    elif status == ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
        exception_class = ElementNotSelectableException
    elif status == ErrorCode.INVALID_COOKIE_DOMAIN:
        exception_class = WebDriverException
    elif status == ErrorCode.UNABLE_TO_SET_COOKIE:
        exception_class = WebDriverException
    elif status == ErrorCode.TIMEOUT:
        exception_class = TimeoutException
    elif status == ErrorCode.SCRIPT_TIMEOUT:
        exception_class = TimeoutException
    elif status == ErrorCode.UNKNOWN_ERROR:
        exception_class = WebDriverException
    elif status == ErrorCode.NO_ALERT_OPEN:
        exception_class = NoAlertPresentException
    elif status == ErrorCode.IME_NOT_AVAILABLE:
        exception_class = ImeNotAvailableException
    elif status == ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
        exception_class = ImeActivationFailedException
    elif status == ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
        exception_class = MoveTargetOutOfBoundsException
        exception_class = WebDriverException
    value = response['value']
    if type(value) is str:
        if exception_class == ErrorInResponseException:
            raise exception_class(response, value)
      raise exception_class(value)

E WebDriverException: Message: ''

.env/lib/python2.7/site-packages/selenium/webdriver/remote/ WebDriverException

@bobsilverberg had the same type of failure. A different test, but again a 404 from the Selenium server. I will continue to track these in this issue and perhaps this is something to discuss with #selenium?


These intermittent technical failures are no longer plaguing our tests thanks to @klrmn's pytest-rerunfailures plugin. I'm not sure if I should close this issue or not, though. Any thoughts from anyone on that?


@bobsilverberg is this issue stil valid or can it be closed?


@bobsilverberg @retornam any updates on this issue? can it be closed?


@bobsilverberg knows more about this than I do


I think this issue can be closet thanks to @klrmn 's rerunfauilures plugin.
@bobsilverberg I will close this. Reopen if you disagree

@AndreiH AndreiH closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.