Skip to content

Clients can crash in various ways if comment is deleted that an inbox notification still references #1621

Closed as not planned
@nvie

Description

@nvie

Describe the bug

When you're displaying a list of inbox notifications and another user deletes the comment that is associated to that notification, the client can crash. Depending on exact setup and timing, this can fail in three ways:

Here are recordings of the three ways I could trigger an error and make one of the clients crash. These are three different stack traces:

First error (triggered manually)

bug1.mp4

Second error (triggered manually)

Screen.Shot.2024-05-21.at.13.46.23.mp4

Third error (triggered by CI)

Screen.Shot.2024-05-21.at.13.59.29.mp4

To Reproduce

I've replicated these bugs in our E2E test app. To manually reproduce it (for the first two errors):

  • Go to e2e/next-sandbox, run turbo run dev
  • Open http://localhost:3007/
  • Open "Inbox notifications (user 12)"
  • Open "Inbox notifications (user 7)" in another tab
  • Do what I did in the screen recordings

For the third error, make this one-line change, and simply run the test suite to see it happen.

Expected behavior

The clients should never crash, no matter how the app is used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions