[random failure] Curl error thrown for http in JSWebAssertTest

Created on 29 March 2023, about 1 year ago
Updated 19 June 2023, about 1 year ago

First time I've seen this particular random failure https://www.drupal.org/pift-ci-job/2629301 β†’

1) Drupal\FunctionalJavascriptTests\Tests\JSWebAssertTest::testJsWebAssert
WebDriver\Exception\CurlExec: Curl error thrown for http POST to http://chromedriver-jenkins-drupal-patches-175432:9515/session/3d49e65f913131440b1a261ae7b7ebd0/execute with params: {"script":"return arguments[0].getAttribute(\"id\")","args":[{"ELEMENT":"0.49279528092055735-44"}]}

Retries: 10 and last result:
{"sessionId":"3d49e65f913131440b1a261ae7b7ebd0","status":10,"value":{"message":"stale element reference: element is not attached to the page document\n  (Session info: headless chrome=106.0.5249.103)\n  (Driver info: chromedriver=106.0.5249.61 (511755355844955cd3e264779baf0dd38212a4d0-refs/branch-heads/5249@{#569}),platform=Linux 4.9.0-0.bpo.6-amd64 x86_64)"}}

Steps to reproduce

In another issue πŸ“Œ [Ignore] In space (and/or this issue), no one can hear patches scream VI Closed: outdated , far, far away, I reproduced the first error and took screenshots when the assertion fails. That looks like this:

Or in fact any number in that text except for the wanted 1100.

So the assertion is done whilst the DOM-manipulation through JavaScript isn't finished.
Which is number 2 on the list of why the "stale element"-stuff happens:

The failure can only happen for two reasons:
1. The element under test is removed from the DOM.
2. The page changed whilst after getting the element under test.

Proposed resolution

Many moons ago, when we were on some faster testbot servers, the assertion would be called when the DOM-manipulation was long done.

However, nowadays stuff goes slower, so we need to assert the elements _after_ the JS-magic is done.

πŸ› Bug report
Status

Fixed

Version

9.5

Component
BaseΒ  β†’

Last updated 11 minutes ago

Created by

πŸ‡¦πŸ‡ΊAustralia acbramley

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024