revoltchat / revite

Revolt client built with Preact.
https://app.revolt.chat
GNU Affero General Public License v3.0
849 stars 198 forks source link

bug: chat channel crashes when mouse hovers over chat message after account deletion #979

Open sabs21 opened 1 month ago

sabs21 commented 1 month ago

What happened?

What happened?

This is very situational, but I managed to get Revolt Desktop to encounter a crash when hovering my mouse over any message within a chat channel that I've posted in before. In addition, each username is replaced with < Unknown User >.

I was able to reproduce this in the web app (Chrome) and Revolt Desktop.

Repro Steps 1) Make sure you're logged into an account. 2) Log out of your account. 3) Register a new account, then log into that account. 4) After logging into that account, proceed to delete the account (Settings > Mark Account for Deletion). 5) Once the account has been deleted and you land on the sign in page, log into the account you were logged into at step 1. 6) Open up a text channel that you've previously posted in before. You will encounter the bug explained above.

A restart of the Revolt client fixes this, so there's a workaround to get things working again.

After hovering my mouse over a chat message revolt_chat_crash

Before hovering mouse over a chat message (Note this screenshot is taken on a local instance)

image

Branch

Production (app.revolt.chat)

Commit hash

00e6ead (master) Nightly 1.0.1 Native: 1.0.6 API: 0.7.14 revolt.js: 6.0.17

What browsers are you seeing the problem on?

Chrome, Other (please specify in the "What happened" form)

Relevant log output

Revolt has crashed. Here's the error:
TypeError: Cannot read properties of null (reading '_id')
    at http://localhost:3001/src/components/common/messaging/bars/MessageOverlayBar.tsx:73:54
    at http://localhost:3001/node_modules/.vite/deps/mobx-react-lite.js?v=0805f018:362:14
    at http://localhost:3001/node_modules/.vite/deps/mobx-react-lite.js?v=0805f018:317:19
    at trackDerivedFunction (http://localhost:3001/node_modules/.vite/deps/chunk-QERINEML.js?v=0805f018:1434:18)
    at Reaction2.track (http://localhost:3001/node_modules/.vite/deps/chunk-QERINEML.js?v=0805f018:1828:18)
    at useObserver (http://localhost:3001/node_modules/.vite/deps/mobx-react-lite.js?v=0805f018:315:12)
    at _.observerComponent [as constructor] (http://localhost:3001/node_modules/.vite/deps/mobx-react-lite.js?v=0805f018:361:12)
    at _.O [as render] (http://localhost:3001/node_modules/.vite/deps/chunk-WS2CDYOW.js?v=0805f018:257:15)
    at j (http://localhost:3001/node_modules/.vite/deps/chunk-WS2CDYOW.js?v=0805f018:182:134)
    at w (http://localhost:3001/node_modules/.vite/deps/chunk-WS2CDYOW.js?v=0805f018:82:7)
This error has been automatically reported.

Desktop

PWA