nusmodifications / nusmodifications/nusmods

React crashing on module finder page with NotFoundError

Open
#720 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
689
Forks
364
Avg merge
7h 5m
Merged PRs (30d)
14

Description

Sentry report: https://sentry.io/nusmods/v3/issues/433349104/

NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
  at next (./js/middlewares/requests-middleware.js:23:12)
  at apply (./js/views/components/SearchBox.jsx:67:16)
...
(19 additional frame(s) were not displayed)

I suspect there's something to do with the async rendering shenanigans we're doing, which is interfering with React's virtual DOM reconciliation. Unfortunately reproducing this may be really difficult. Still, it's a hard crash which is really bad because it's probably going to WSOD the app.

Let's monitor this and see if it gets worse.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Sentry report and the stack locations in js/middlewares/requests-middleware.js and js/views/components/SearchBox.jsx. Investigate the module finder’s async rendering and attempt to reproduce the removeChild crash. Done means the crash is prevented or its cause is identified with coverage for the failing scenario.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.