So I want to start off with saying that notification on @mentions hasn't been working at all on our forum in public chat rooms. But it appears that the situation is now worse as specifically mentioning a user in public chat causes the forum to completely crash and reboot with the following error message:
2023-08-25T01:29:33.228Z [4567/1686462] - error: uncaughtException: Cannot read properties of undefined (reading 'displayname')
TypeError: Cannot read properties of undefined (reading 'displayname')
at Object.Mentions.notifyMessage [as method] (.../nodebb/node_modules/nodebb-plugin-mentions/library.js:195:73)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Object.fireActionHook [as action] (.../nodebb/src/plugins/hooks.js:211:4)
at async Hooks.fire (.../nodebb/src/plugins/hooks.js:132:17) {"date":"Fri Aug 25 2023 01:29:33 GMT+0000 (Coordinated Universal Time)","error":{},"exception":true,"os":{"loadavg":[0.92,0.71,0.42],"uptime":784611.42},"process":{"argv":["/usr/bin/node",".../nodebb/app.js"],"cwd":".../nodebb","execPath":"/usr/bin/node","gid":0,"memoryUsage":{"arrayBuffers":22579632,"external":30825859,"heapTotal":125403136,"heapUsed":109508072,"rss":198705152},"pid":1686462,"uid":0,"version":"v16.20.2"},"stack":"TypeError: Cannot read properties of undefined (reading 'displayname')\n at Object.Mentions.notifyMessage [as method] (.../nodebb/node_modules/nodebb-plugin-mentions/library.js:195:73)\n at processTicksAndRejections (node:internal/process/task_queues:96:5)\n at async Object.fireActionHook [as action] (.../nodebb/src/plugins/hooks.js:211:4)\n at async Hooks.fire (.../nodebb/src/plugins/hooks.js:132:17)","trace":[{"column":73,"file":".../nodebb/node_modules/nodebb-plugin-mentions/library.js","function":"Object.Mentions.notifyMessage [as method]","line":195,"method":"notifyMessage [as method]","native":false},{"column":5,"file":"node:internal/process/task_queues","function":"processTicksAndRejections","line":96,"method":null,"native":false},{"column":4,"file":".../nodebb/src/plugins/hooks.js","function":"async Object.fireActionHook [as action]","line":211,"method":"fireActionHook [as action]","native":false},{"column":17,"file":".../nodebb/src/plugins/hooks.js","function":"async Hooks.fire","line":132,"method":"fire","native":false}]}
2023-08-25T01:29:33.230Z [4567/1686462] - error: TypeError: Cannot read properties of undefined (reading 'displayname')
at Object.Mentions.notifyMessage [as method] (.../nodebb/node_modules/nodebb-plugin-mentions/library.js:195:73)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Object.fireActionHook [as action] (.../nodebb/src/plugins/hooks.js:211:4)
at async Hooks.fire (.../nodebb/src/plugins/hooks.js:132:17)
2023-08-25T01:29:33.231Z [4567/1686462] - info: [app] Shutdown (SIGTERM/SIGINT/SIGQUIT) Initialised.
2023-08-25T01:29:33.235Z [4567/1686462] - info: [app] Web server closed to connections.
2023-08-25T01:29:33.239Z [4567/1686462] - info: [app] Live analytics saved.
2023-08-25T01:29:33.256Z [4567/1686462] - info: [app] Database connection closed.
2023-08-25T01:29:33.257Z [4567/1686462] - info: [app] Shutdown complete.
[cluster] Child Process (1686462) has exited (code: 1, signal: null)
[cluster] Spinning up another process...
I'm happy to do as much debugging as needed to get this fixed and provide whatever information is needed. Below is the list of plugins we're using.
Active plugins:
* @nodebb/[email protected] (installed, enabled)
* [email protected] (installed, enabled)
* [email protected] (installed, enabled)
* [email protected] (installed, enabled)
* [email protected] (installed, enabled)
* [email protected] (installed, enabled)
* [email protected] (installed, enabled)
* [email protected] (installed, enabled)
* [email protected] (installed, enabled)
* [email protected] (installed, enabled)
* [email protected] (installed, enabled)
* [email protected] (installed, enabled)
* [email protected] (installed, enabled)
* [email protected] (installed, enabled)
* [email protected] (installed, enabled)
* [email protected] (installed, enabled)
* [email protected] (installed, enabled)
* [email protected] (installed, enabled)
* [email protected] (installed, enabled)
* [email protected] (installed, enabled)
* [email protected] (installed, enabled)
* [email protected] (installed, enabled)
* [email protected] (installed, enabled)
* [email protected] (installed, enabled)
* [email protected] (installed, enabled)
* [email protected] (installed, enabled)