oppia: ValueError: Limit must be provided for question suggestions.

This error occurred recently in production:

 Traceback (most recent call last):
  File "/layers/google.python.pip/pip/lib/python3.8/site-packages/webapp2.py", line 604, in dispatch
    return method(*args, **kwargs)
  File "/workspace/core/controllers/acl_decorators.py", line 4404, in test_can_view_reviewable_suggestions
    return handler(self, target_type, suggestion_type, **kwargs)
  File "/workspace/core/controllers/suggestion.py", line 831, in get
    raise ValueError(
ValueError: Limit must be provided for question suggestions. 

Where did the error occur? Add the page the error occurred on. Contributor dashboard.

Handler: /getreviewablesuggestions/skill/add_question Frequency of occurrence Add details about how many times the error occurred within a given time period (e.g. the last week, the last 30 days, etc.). This helps issue triagers establish severity. 12 time in 13 days.

General instructions for contributors In general, the procedure for fixing server errors should be the following:

  • Analyze the code in the file where the error occurred and come up with a hypothesis for the reason.
  • Based on your hypothesis, determine a list of steps that reliably reproduce the issue (or confirm any repro instructions that have been provided). For example, if your hypothesis is that the issue arises due to a delay in a response from the backend server, try to change the code so that the backend server always has a delay, and see if the error then shows up 100% of the time on your local machine.
  • Explain your proposed fix, the logic behind it, and any other findings/context you have on this thread. You can also link to a debugging doc if you prefer.
  • Get your approach validated by an Oppia team member.
  • Make a PR that fixes the issue.

Debugging Doc https://docs.google.com/document/d/1grOgCHTiNvrTR7Vif5G7efg4WDnb8BMdaWma4MQWPtw/edit?usp=sharing

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Comments: 21 (19 by maintainers)

Commits related to this issue

Most upvoted comments

Thanks @masterboy376! That’s very clear, now we can try to solve this as a standard issue. Thanks for documenting the repro instructions!

Steps to reproduce:

  1. Login as a normal user, let us name it “A”.
  2. Logout “A”.
  3. Login as a test admin, let us name it “T”.
  4. Assign “T” following role:
    • Curriculum admin
    • Question admin
  5. Go to contributor admin dashboard
  6. Give “A” question reviewer rights
  7. Give “T” question submitter rights
  8. Go to activities tab of admin page.
  9. Load dummy new structures data, generate a dummy math classroom, generate dummy skill with questions, generate 22 (this number should be anything more than 11 so that the next page functionality triggers) dummy suggestion questions in “Skill1” (in the same order).
  10. Logout “T”.
  11. Login as “A”
  12. Go to review questions tab of contributor dashboard
  13. Select “Addition” topic in filter
  14. Click “next” button at the bottom
  15. Now error will occur in the console.

@seanlip @HardikGoyal2003 PTAL

Screenshot (185)

@HardikGoyal2003 @seanlip I apologize for the delay. I will document them by the end of the day.

Hi @HardikGoyal2003, please disregard my last comment (https://github.com/oppia/oppia/issues/19650#issuecomment-1979309785), I’d confused this issue with https://github.com/oppia/oppia/pull/19518. Sorry about that. So this might need some investigation on the local env.

Hi @HardikGoyal2003, test server is currently pointing to the older release currently (changes in this PR are not present) since we don’t want the deployed version to be a broken one.

But @HardikGoyal2003, in that case you need to follow https://github.com/oppia/oppia/issues/19650#issuecomment-1975252705. Reproduce it locally and/or analyze the code to understand what is happening.

Update from #19642 (thanks @HardikGoyal2003):

This error is generated in the fractions topic as it has many questions that need to be displayed on next page , so on clicking next page it is producing the error. It can be reproduced on https://www.oppiatestserver.org/contributor-dashboard .

Steps To Reproduce

  1. Login to the Contributor dashboard on oppiatestserver
  2. Then click on the review question under available tasks
  3. Select a fraction topic and click on next to see more questions

Screenshots/Videos

https://github.com/oppia/oppia/assets/135348086/7fffa5eb-af4e-4a19-a2f8-743870fcb580