oppia icon indicating copy to clipboard operation
oppia copied to clipboard

[Flake]: Node is either not clickable or not an HTMLElement

Open HardikGoyal2003 opened this issue 1 year ago • 1 comments

CI Test Type

Acceptance

Stacktrace

Suite error: Logged-in User
Message:
Error: Node is either not clickable or not an HTMLElement
Stack:
Error: Node is either not clickable or not an HTMLElement
    at ElementHandle.clickablePoint (/home/runner/work/oppia/oppia/node_modules/puppeteer/src/common/JSHandle.ts:522:13)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at ElementHandle.click (/home/runner/work/oppia/oppia/node_modules/puppeteer/src/common/JSHandle.ts:620:22)
    at DOMWorld.click (/home/runner/work/oppia/oppia/node_modules/puppeteer/src/common/DOMWorld.ts:462:5)
    at async Promise.all (index 1)
    at BaseUser.clickAndWaitForNavigation (/home/runner/work/oppia/oppia/core/tests/puppeteer-acceptance-tests/utilities/common/puppeteer-utils.ts:354:7)
    at BaseUser.navigateToExplorationEditorPage (/home/runner/work/oppia/oppia/core/tests/puppeteer-acceptance-tests/utilities/user/exploration-editor.ts:229:5)
    at UserContext.<anonymous> (/home/runner/work/oppia/oppia/core/tests/puppeteer-acceptance-tests/specs/logged-in-user/restart-or-continue-exploration-on-revisit.spec.ts:51:5)
No specs found
Finished in 21.172 seconds

Additional Information

No response

Occurrences

Occurred on: https://github.com/oppia/oppia/actions/runs/10430557606/job/28911944781?pr=20369

Debugging document link

No response

HardikGoyal2003 avatar Aug 18 '24 14:08 HardikGoyal2003

Also occurred here: https://github.com/oppia/oppia/actions/runs/10613488902/job/29420238946?pr=20544

mon4our avatar Aug 30 '24 07:08 mon4our

Another occurrence - https://github.com/oppia/oppia/actions/runs/10633592792/job/29482154948

Vir-8 avatar Aug 30 '24 14:08 Vir-8

Occurrence blocking merge queue - https://github.com/oppia/oppia/actions/runs/10644500072/job/29510229315

Vir-8 avatar Aug 31 '24 11:08 Vir-8

Happened again: https://github.com/Akhilesh-max/oppia/actions/runs/10886927981/job/30217269094?pr=31

Akhilesh-max avatar Sep 17 '24 09:09 Akhilesh-max

Occurred again: https://github.com/oppia/oppia/actions/runs/11885412266/job/33147539482?pr=20973

mon4our avatar Nov 18 '24 16:11 mon4our

This also happened here, but with a different origin (logged-out-user/visit-classroom-index-page): https://github.com/oppia/oppia/actions/runs/11931449141/job/33255442226

seanlip avatar Nov 20 '24 11:11 seanlip

Adding the occurrence from #20994 here (reported by @Vir-8, occurred on 23 September, 2024 -- https://github.com/oppia/oppia/actions/runs/10983609736/job/30493578782) since it looks like this particular flake can occur from different sources.

seanlip avatar Nov 20 '24 11:11 seanlip

Occurred again on: https://github.com/oppia/oppia/actions/runs/12096632190/job/33731693516

HardikGoyal2003 avatar Nov 30 '24 15:11 HardikGoyal2003

Occurred again on: https://github.com/oppia/oppia/actions/runs/12144085340/job/33889263145?pr=20973

mon4our avatar Dec 04 '24 07:12 mon4our

Occurred again: https://github.com/oppia/oppia/actions/runs/12292635403/job/34315748400?pr=21241

Blocking PR: https://github.com/oppia/oppia/pull/21241

FAIL core/tests/puppeteer-acceptance-tests/specs/logged-out-user/check-all-user-flow-of-partner.spec.ts (26.872 s)
  Partner
    ✕ should be able to navigate to partnerships page when started from home page and open the partnerships form in partnerships page. (10543 ms)

  ● Partner › should be able to navigate to partnerships page when started from home page and open the partnerships form in partnerships page.

    Node is either not clickable or not an HTMLElement

      1654 |     const languageDropdownElement = await this.page.$(languageDropdown);
      1655 |     if (languageDropdownElement) {
    > 1656 |       await languageDropdownElement.click();
           |       ^
      1657 |     }
      1658 |     await this.clickOn(languageOption);
      1659 |     // Here we need to reload the page again to confirm the language change.

      at ElementHandle.clickablePoint (../../../node_modules/puppeteer/src/common/JSHandle.ts:[536](https://github.com/oppia/oppia/actions/runs/12292635403/job/34315748400?pr=21241#step:11:537):13)
          at runMicrotasks (<anonymous>)
      at ElementHandle.click (../../../node_modules/puppeteer/src/common/JSHandle.ts:620:22)
      at LoggedOutUser.changeSiteLanguage (utilities/user/logged-out-user.ts:1656:7)
      at LoggedOutUser.clickPartnerWithUsButtonInAboutPageInGivenLanguage (utilities/user/logged-out-user.ts:2329:5)
      at Object.<anonymous> (specs/logged-out-user/check-all-user-flow-of-partner.spec.ts:61:7)

TARishabh avatar Dec 13 '24 05:12 TARishabh

Occurred again on: https://github.com/oppia/oppia/actions/runs/12320667736/job/34391386862

HardikGoyal2003 avatar Dec 14 '24 09:12 HardikGoyal2003

Occurred again on: https://github.com/oppia/oppia/actions/runs/12372742426/job/34532655800?pr=20973

mon4our avatar Dec 17 '24 15:12 mon4our

This failure seems to arise in multiple contexts. For the curriculum admin CUJ, I managed to reproduce it locally. Here is a video:

https://github.com/user-attachments/assets/a1c1acef-7e3b-48e9-b2d6-1b5fb5da6674

The error happens in the classroom admin page, at await this.clickOn(uploadClassroomImageButton); in updateClassroom() in curriculum-admin.ts. I think it happens because there are two clickOn() calls in succession and both actually refer to the same element, so sometimes, after the first click, the modal will close and the button will disappear. I fixed it by removing one of them. Will create a PR shortly.

seanlip avatar Dec 19 '24 08:12 seanlip

Note: most of the errors reported here pertain to the classroom admin page issue.

There are 3 other errors with a similar message but that occur on other pages. (Some of the earlier logs have been deleted so I cannot inspect them.) They are listed below. I will file new issues for them to track them since they are not actually the same error as this one (but the method of solution for this one might provide inspiration for solving them too).


  1. The very first one in this thread, which is likely due to the goto() in navigateToCreatorDashboardPage()
Suite error: Logged-in User
Message:
Error: Node is either not clickable or not an HTMLElement
Stack:
Error: Node is either not clickable or not an HTMLElement
    at ElementHandle.clickablePoint (/home/runner/work/oppia/oppia/node_modules/puppeteer/src/common/JSHandle.ts:522:13)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at ElementHandle.click (/home/runner/work/oppia/oppia/node_modules/puppeteer/src/common/JSHandle.ts:620:22)
    at DOMWorld.click (/home/runner/work/oppia/oppia/node_modules/puppeteer/src/common/DOMWorld.ts:462:5)
    at async Promise.all (index 1)
    at BaseUser.clickAndWaitForNavigation (/home/runner/work/oppia/oppia/core/tests/puppeteer-acceptance-tests/utilities/common/puppeteer-utils.ts:354:7)
    at BaseUser.navigateToExplorationEditorPage (/home/runner/work/oppia/oppia/core/tests/puppeteer-acceptance-tests/utilities/user/exploration-editor.ts:229:5)
    at UserContext.<anonymous> (/home/runner/work/oppia/oppia/core/tests/puppeteer-acceptance-tests/specs/logged-in-user/restart-or-continue-exploration-on-revisit.spec.ts:51:5)
No specs found
Finished in 21.172 seconds
  1. This one: https://github.com/oppia/oppia/actions/runs/12144085340/job/33889263145?pr=20973 reported by @mon4our 2 weeks ago:

Suite error: Exploration Editor
Message:
Error: Node is either not clickable or not an HTMLElement
Stack:
Error: Node is either not clickable or not an HTMLElement
    at ElementHandle.clickablePoint (/home/runner/work/oppia/oppia/node_modules/puppeteer/src/common/JSHandle.ts:522:13)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at ElementHandle.click (/home/runner/work/oppia/oppia/node_modules/puppeteer/src/common/JSHandle.ts:620:22)
    at DOMWorld.click (/home/runner/work/oppia/oppia/node_modules/puppeteer/src/common/DOMWorld.ts:462:5)
    at BaseUser.addResponsesToTheInteraction (/home/runner/work/oppia/oppia/core/tests/puppeteer-acceptance-tests/utilities/user/exploration-editor.ts:1086:9)
    at UserContext.<anonymous> (/home/runner/work/oppia/oppia/core/tests/puppeteer-acceptance-tests/specs/exploration-editor/manage-exploration-misconceptions.spec.ts:113:5)
No specs found
  1. This one reported by @TARishabh last week: https://github.com/oppia/oppia/issues/20856#issuecomment-2540590805
[datastore] Dec 12, 2024 6:21:51 PM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
[datastore] INFO: Detected HTTP/2 connection.
FAIL core/tests/puppeteer-acceptance-tests/specs/logged-out-user/check-all-user-flow-of-partner.spec.ts (26.872 s)
  Partner
    ✕ should be able to navigate to partnerships page when started from home page and open the partnerships form in partnerships page. (10543 ms)

  ● Partner › should be able to navigate to partnerships page when started from home page and open the partnerships form in partnerships page.

    Node is either not clickable or not an HTMLElement

      1654 |     const languageDropdownElement = await this.page.$(languageDropdown);
      1655 |     if (languageDropdownElement) {
    > 1656 |       await languageDropdownElement.click();
           |       ^
      1657 |     }
      1658 |     await this.clickOn(languageOption);
      1659 |     // Here we need to reload the page again to confirm the language change.

      at ElementHandle.clickablePoint (../../../node_modules/puppeteer/src/common/JSHandle.ts:[536](https://github.com/oppia/oppia/actions/runs/12292635403/job/34315748400?pr=21241#step:11:537):13)
          at runMicrotasks (<anonymous>)
      at ElementHandle.click (../../../node_modules/puppeteer/src/common/JSHandle.ts:620:22)
      at LoggedOutUser.changeSiteLanguage (utilities/user/logged-out-user.ts:1656:7)
      at LoggedOutUser.clickPartnerWithUsButtonInAboutPageInGivenLanguage (utilities/user/logged-out-user.ts:2329:5)
      at Object.<anonymous> (specs/logged-out-user/check-all-user-flow-of-partner.spec.ts:61:7)

Test Suites: 1 failed, 1 total
Tests:       1 failed, 1 total

seanlip avatar Dec 19 '24 08:12 seanlip

Update: filed #21472 and #21473 to track cases 1 and 3 above.

I'm not filing case 2 because it occurred on a PR by @mon4our that migrated the exploration editor and it is conceivable that that PR introduced the issue. So it's not clear that it appears in develop. (/cc @HardikGoyal2003 too)

seanlip avatar Dec 19 '24 08:12 seanlip