Skip to content

Unlisted emoji name in emoji picker's recently used list crashes room UI #14575

@tassoevan

Description

@tassoevan

Description:

Before EmojiOne update, there was an emoji named :hot_dog:, now renamed as :hotdog:. Since it was in the recently used emoji list on emoji picker, the entire room template failed to render.

Steps to reproduce:

  1. Edit localStorage's entry emoji.recent to include an unlisted emoji name.
  2. Open a run with an enabled message box containing the emoji picker.

Expected behavior:

The room opens without errors; the invalid emoji is not listed in picker.

Actual behavior:

The whole room template fails to render.

Server Setup Information:

  • Version of Rocket.Chat Server: 1.1.0-develop (7ad3f25)
  • Operating System: Ubuntu 18.04.2
  • Deployment Method: from source code
  • Number of Running Instances: 1
  • DB Replicaset Oplog: Enabled
  • NodeJS Version: 8.11.4 - x64
  • MongoDB Version: 4.0.2

Relevant logs:

TypeError: Cannot read property 'emojiPackage' of undefined
    at Object.renderPicker (http://localhost:3000/app/app.js?hash=dd8ce6fd29508ea122276b8b62d4c23814560481:88541:58)
    at http://localhost:3000/app/app.js?hash=dd8ce6fd29508ea122276b8b62d4c23814560481:88176:52
    at Array.map (<anonymous>)
    at http://localhost:3000/app/app.js?hash=dd8ce6fd29508ea122276b8b62d4c23814560481:88174:52
    at Array.map (<anonymous>)
    at createEmojiList (http://localhost:3000/app/app.js?hash=dd8ce6fd29508ea122276b8b62d4c23814560481:88169:46)
    at http://localhost:3000/app/app.js?hash=dd8ce6fd29508ea122276b8b62d4c23814560481:88189:72
    at Array.forEach (<anonymous>)
    at createPickerEmojis (http://localhost:3000/app/app.js?hash=dd8ce6fd29508ea122276b8b62d4c23814560481:88189:14)
    at Blaze.TemplateInstance.<anonymous> (http://localhost:3000/app/app.js?hash=dd8ce6fd29508ea122276b8b62d4c23814560481:88427:3) undefined

Metadata

Metadata

Assignees

Labels

area: ui/uxRelated to UI/UX, frontend code, accessibility, and user interactiontype: bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions