Skip to content

TimedPromise timed out after 500 ms: stacktrace: from click in selenium #2234

@jtnord

Description

@jtnord

I'm having an issue with clicking on a button in some very narrow circumstance from Selenium.

The button is a form save button (it's submits a form but via javascript so is not a submit button) so we use WebElement.click()
Everything pretty works as expected. However there is a case where if one element in the form currently has focus then when it looses focus it does some client side javascript validation to show / clear an inline warning.

The problem we have is that in this case the click on the "save" never appears to happen. If we sleep after the button.click and perform another click on the same WebElement (object reference) then things work.

This issue only occurs in Firefox, not Chrome.
enabling debug logs in selenium/geckodriver shows the following

1756225604628   webdriver::server       DEBUG   <- 200 OK {"value":true}
1756225604630   webdriver::server       DEBUG   -> POST /session/c6803ae7-2a49-45f8-8b52-08de41f8ed82/element/b78fc7c6-28c0-424e-8942-13cfbd4ff548/click {
  "id": "b78fc7c6-28c0-424e-8942-13cfbd4ff548"
}
1756225604630   Marionette      DEBUG   0 -> [0,443,"WebDriver:ElementClick",{"id":"b78fc7c6-28c0-424e-8942-13cfbd4ff548"}]
1756225605134   RemoteAgent     WARN    TimedPromise timed out after 500 ms: stacktrace:
TimedPromise/<@chrome://remote/content/shared/Sync.sys.mjs:448:24
TimedPromise@chrome://remote/content/shared/Sync.sys.mjs:432:10
interaction.flushEventLoop@chrome://remote/content/marionette/interaction.sys.mjs:465:10
webdriverClickElement@chrome://remote/content/marionette/interaction.sys.mjs:218:33
1756225605185   Marionette      DEBUG   0 <- [1,443,null,{"value":null}]

firefox: 142.0.1 (64-bit) (windows 11)
geckodriver: 0.36.0 (a3d508507022 2025-02-24 15:57 +0000)

Steps to reproduce.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions