Problem/Motivation

\Drupal\FunctionalJavascriptTests\JSWebAssert::waitForHelper() catches \WebDriver\Exception\CurlExec and will retry when this occurs. There are situations however when an exception occurs while doing a waitForText() when a different exception will be thrown and we should probably retry.

ON a client project I'm seeing a lot of

    WebDriver\Exception\NoSuchElement: Element not found with xpath, //html
    
    no such element: Unable to locate element:
    {"method":"xpath","selector":"//html"}
      (Session info: headless chrome=89.0.4389.114)
      (Driver info: chromedriver=89.0.4389.23
    (61b08ee2c50024bab004e48d2b1b083cdbdac579-refs/branch-heads/4389@{#294}),platform=Linux
    5.4.0-1049-aws x86_64)

This tends to occur when the CI server is under load.

Steps to reproduce

Proposed resolution

Catch WebDriver\Exception\NoSuchElement and continue to wait.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#10 3246152-9.5.x-10.patch726 bytesalexpott
#3 3246152-3.patch764 bytesalexpott
#2 3246152-2.patch872 bytesalexpott

Comments

alexpott created an issue. See original summary.

alexpott’s picture

Status: Active » Needs review
StatusFileSize
new872 bytes
alexpott’s picture

StatusFileSize
new764 bytes

Rerolled.

vijaycs85’s picture

Definitely, this would allow covering other failed cases and additional retry.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Bug Smash Initiative

Patch or MR doesn't apply anymore
The last patch or MR doesn't apply to the target branch, please reroll the code so that it can be reviewed by the automated testbot.

smustgrave’s picture

Status: Needs work » Postponed (maintainer needs more info)

@alexpott

Was this resolved in #3315227: Drupal\Tests\views\FunctionalJavascript\Plugin\views\Handler\FilterTest is failing a lot at the moment?

If so can we close this as outdated or duplicate and move over credit.

alexpott’s picture

Version: 10.1.x-dev » 9.5.x-dev
Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new726 bytes

@smustgrave nope we just moved the code in that one... moving back to 9.5.x as this is a bug.

Status: Needs review » Needs work

The last submitted patch, 10: 3246152-9.5.x-10.patch, failed testing. View results

smustgrave’s picture

Status: Needs work » Reviewed & tested by the community

Thank you @alexpott for the follow up.

#11 appeared to be a random failure. Reran again with no issues.

Not sure if this will need tests will let the committer decide.

alexpott’s picture

Re tests - this one is very very hard to test.

  • xjm committed 90f669c0 on 10.1.x
    Issue #3246152 by alexpott, smustgrave, vijaycs85: \Drupal\...

  • xjm committed 80d0db0c on 10.0.x
    Issue #3246152 by alexpott, smustgrave, vijaycs85: \Drupal\...

  • xjm committed cc67eb18 on 9.5.x
    Issue #3246152 by alexpott, smustgrave, vijaycs85: \Drupal\...
xjm’s picture

Oh, this is excellent. I've seen this on DrupalCI as well and hopefully fixing it will reduce our random fail rate.

Committed to 10.1.x, and cherry-picked to 10.0.x and 9.5.x. Thanks!

xjm’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.