Skip to content

Crash on attempting @-mention starting with "a" or "e" #4422

@gnprice

Description

@gnprice

This repro works on v27.158 (the current beta) and I believe on current master as well:

  • Go to a compose box.
  • Type @a, or @e.
  • The app's UI disappears and the app just shows a white screen.

The culprit is the fake user-like data that our autocomplete code generates for the @all and @everyone mentions, and that data's interaction with UserAvatarWithPresenceById, which is passed a user ID and expects that user ID to belong to an actual user.

Instead, when we're handling such fake data, we should simply return an empty React element like null in place of the avatar.

(Also we can probably do better than writing this in terms of fake pseudo-users in the first place. But that's a bigger refactor.)

Metadata

Metadata

Assignees

Labels

P1 high-prioritya-compose/sendCompose box, autocomplete, camera/upload, outbox, sendingsevere: crashThe app quits, or stops responding.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions