oppia: TypeError: Cannot read properties of undefined (reading 'replace')

This error occurred recently in production:

TypeError: Cannot read properties of undefined (reading 'replace')
    at c.transform (format-rte-preview.pipe.ts:35:17)
    at an.getTranslationSuggestionHeading (contributions-and-review.component.ts:255:38)
    at contributions-and-review.component.ts:231:23
    at Array.forEach (<anonymous>)
    at an.getTranslationContributionsSummary (contributions-and-review.component.ts:216:44)
    at an.getContributionSummaries (contributions-and-review.component.ts:412:19)
    at contributions-and-review.component.ts:498:34
    at e.invoke (zone.js:386:30)
    at Object.onInvoke (core.js:28580:33)
    at e.invoke (zone.js:385:36)

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

Contributor dashboard page.

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.

1 time in 4 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.

Additionally, see https://github.com/oppia/oppia/wiki/Contributor-dashboard for how to get started for developing for the contributor dashboard.

About this issue

  • Original URL
  • State: open
  • Created 9 months ago
  • Comments: 18 (17 by maintainers)

Most upvoted comments

Nope, I don’t think so. I only fixed issue related to calculation of html strings for rule inputs (We didn’t consider argument to be of type list of strings).

Thanks @Ash-2k3, that looks much better! I made some small edits, it should be good to use now.