oppia: [Flake]: Error: Completed goals section is empty

CI Test Type

Acceptance

Stacktrace

LOG: User superAdm has the blog admin role!
LOG: User curriculumAdm has the curriculum admin role!
LOG: Creator dashboard page is opened successfully.
LOG: Tutorial pop-up closed successfully.
LOG: Card content is updated successfully.
LOG: End Exploration interaction has been added successfully.
LOG: A simple exploration is created.
LOG: Exploration is saved successfully.
/tmp/tmp73g3Co/lib/python3.8/site-packages/elasticsearch/connection/base.py:200: ElasticsearchWarning: Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.17/security-minimal-setup.html to enable security.
  warnings.warn(message, category=ElasticsearchWarning)
ERROR:root:This app cannot send emails to users.
LOG: Creator dashboard page is opened successfully.
LOG: welcome modal not found: waiting for selector `button.e2e-test-dismiss-welcome-modal` failed: timeout 5000ms exceeded
LOG: Card content is updated successfully.
LOG: End Exploration interaction has been added successfully.
LOG: A simple exploration is created.
LOG: Exploration is saved successfully.
/tmp/tmp73g3Co/lib/python3.8/site-packages/elasticsearch/connection/base.py:200: ElasticsearchWarning: Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.17/security-minimal-setup.html to enable security.
  warnings.warn(message, category=ElasticsearchWarning)
ERROR:root:This app cannot send emails to users.
LOG: Subtopic Negative Numbers is created.
LOG: Created Math classroom.
LOG: Updated Math classroom.
LOG: Added Algebra I topic to the Math classroom.
LOG: Published Math classroom.
LOG: Story Test Story 1 is created.
LOG: Chapter Test Chapter 1 is created.
LOG: Chapter Test Chapter 2 is created.

Spec started : Logged-in User should be able to replay a completed or incomplete exploration or collection, learn something new, manage goals, and see completed lesson in the respective sections.
LOG: Exploration has completed successfully
LOG: Page rendered fully.
LOG: Goal "Algebra I" added.
LOG: Page rendered fully.
LOG: Exploration has completed successfully
LOG: Page rendered fully.
LOG: Page rendered fully.
-> Failed [ Took 79.127 seconds ]


Failures:
1. Logged-in User should be able to replay a completed or incomplete exploration or collection, learn something new, manage goals, and see completed lesson in the respective sections.
Message:
Error: Completed goals section is empty
Stack:
Error: Completed goals section is empty
    at /home/runner/work/oppia/oppia/core/tests/puppeteer-acceptance-tests/utilities/user/logged-in-user.ts:1178:15
    at BaseUser.expectCompletedGoalsToInclude (/home/runner/work/oppia/oppia/core/tests/puppeteer-acceptance-tests/utilities/user/logged-in-user.ts:1175:5)
    at UserContext.<anonymous> (/home/runner/work/oppia/oppia/core/tests/puppeteer-acceptance-tests/specs/logged-in-user/manage-goals-progress-and-lessons-from-learner-dashboard.spec.ts:119:7)

1 specs, 1 failures

Additional Information

Test Name: manage-goals-progress-and-lessons-from-learner-dashboard

Occurrences

I have noticed this 2 times.

https://github.com/oppia/oppia/actions/runs/10486538403/job/29046463928?pr=20853

Debugging document link

No response

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 115 (81 by maintainers)

Commits related to this issue

Most upvoted comments

@omgupta-iitk Sorry, I was busy today.

I will still be busy next few days.

@HardikGoyal2003 can you PTAL, or ask for help to person having knowledge here, on my behalf. Thanks!

@omgupta-iitk Sorry, I was busy the last few days. I think @seanlip agrees with point 3, and I do too. Just want you to make sure that fixing this flake doesn’t introduce new ones. This is because one call is made when _addNewCard() is called and the other when the state changes.

We can only merge these calls if A (call _addNewCard()) implies B (state is changed) and B implies A. I am still unsure, as I haven’t had time to look at the front-end side more deeply.

Also, @omgupta-iitk I am assuming you are taking up this issue and working on this actively. So, I will focus on other things. But please feel free to ask for any help. I will still stay updated on this issue and add contributions whenever required.

Thanks @omgupta-iitk and @jayam04 for discussing this issue. I took a quick look at this and TBH I’m not sure what exactly the point of disagreement is. You all seem to agree on the later point 1, AFAICT.

@seanlip I am sorry if it was conveyed in that way. I neither disagreed with Om then, nor do I agree with his solution now. This is because of reason I gave above (I haven’t looked at fornt-end deeply).

Thanks @omgupta-iitk and @jayam04 for discussing this issue. I took a quick look at this and TBH I’m not sure what exactly the point of disagreement is. You all seem to agree on the later point 1, AFAICT.

Yes, let’s go with approach 3 and drop mark_story_as_completed() if it’s never going to be called directly from the frontend. We should handle the story/topic completion in the backend as part of marking an exploration as completed.

Also @jayam04 I don’t think @ndb.transactional is the way to go in this case since different handlers are being called. So don’t worry about investigating that.

Happened again: https://github.com/oppia/oppia/actions/runs/12452725159/job/34762355194?pr=21509

FYI these two failures are for mobile view – might be worth zeroing in on that. Log is below:

FAIL core/tests/puppeteer-acceptance-tests/specs/logged-in-user/manage-goals-progress-and-lessons-from-learner-dashboard.spec.ts (348.914 s)
  Logged-in User
    ✕ should be able to replay a completed or incomplete exploration or collection, learn something new, manage goals, and see completed lesson in the respective sections. (75818 ms)

  ● Logged-in User › should be able to replay a completed or incomplete exploration or collection, learn something new, manage goals, and see completed lesson in the respective sections.

    Completed goals section is empty

      1188 |       .waitForSelector(completedGoalsTopicNameSelector)
      1189 |       .catch(() => {
    > 1190 |         throw new Error('Completed goals section is empty');
           |               ^
      1191 |       });
      1192 |
      1193 |     const completedGoals = await this.page.$$eval(

      at utilities/user/logged-in-user.ts:1190:15
      at BaseUser.expectCompletedGoalsToInclude (utilities/user/logged-in-user.ts:1187:5)
      at Object.<anonymous> (specs/logged-in-user/manage-goals-progress-and-lessons-from-learner-dashboard.spec.ts:119:7)