mx-puppet-discord crashing #152

Closed
opened 2022-06-11 18:57:17 +00:00 by a · 4 comments
Owner

mx-puppet-discord is broken again, as expected (since it breaks all the freaking time). This is the error message:

Jun 11 13:55:44 exozyme sh[353656]: /usr/lib/node_modules/mx-puppet-discord/node_modules/@mx-puppet/better-discord.js/src/client/actions/MessageCreate.js:11
Jun 11 13:55:44 exozyme sh[353656]:       const existing = channel.messages.cache.get(data.id);
Jun 11 13:55:44 exozyme sh[353656]:                                         ^
Jun 11 13:55:44 exozyme sh[353656]: TypeError: Cannot read properties of undefined (reading 'cache')
Jun 11 13:55:44 exozyme sh[353656]:     at MessageCreateAction.handle (/usr/lib/node_modules/mx-puppet-discord/node_modules/@mx-puppet/better-discord.js/src/client/actions/MessageCreate.js:11:41)
Jun 11 13:55:44 exozyme sh[353656]:     at module.exports [as MESSAGE_CREATE] (/usr/lib/node_modules/mx-puppet-discord/node_modules/@mx-puppet/better-discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js>
Jun 11 13:55:44 exozyme sh[353656]:     at WebSocketManager.handlePacket (/usr/lib/node_modules/mx-puppet-discord/node_modules/@mx-puppet/better-discord.js/src/client/websocket/WebSocketManager.js:391:31)
Jun 11 13:55:44 exozyme sh[353656]:     at WebSocketShard.onPacket (/usr/lib/node_modules/mx-puppet-discord/node_modules/@mx-puppet/better-discord.js/src/client/websocket/WebSocketShard.js:451:22)
Jun 11 13:55:44 exozyme sh[353656]:     at WebSocketShard.onMessage (/usr/lib/node_modules/mx-puppet-discord/node_modules/@mx-puppet/better-discord.js/src/client/websocket/WebSocketShard.js:308:10)
Jun 11 13:55:44 exozyme sh[353656]:     at WebSocket.onMessage (/usr/lib/node_modules/mx-puppet-discord/node_modules/ws/lib/event-target.js:132:16)
Jun 11 13:55:44 exozyme sh[353656]:     at WebSocket.emit (node:events:527:28)
Jun 11 13:55:44 exozyme sh[353656]:     at Receiver.receiverOnMessage (/usr/lib/node_modules/mx-puppet-discord/node_modules/ws/lib/websocket.js:1047:20)
Jun 11 13:55:44 exozyme sh[353656]:     at Receiver.emit (node:events:527:28)
Jun 11 13:55:44 exozyme sh[353656]:     at Receiver.dataMessage (/usr/lib/node_modules/mx-puppet-discord/node_modules/ws/lib/receiver.js:517:14)
Jun 11 13:55:44 exozyme sh[353656]: Node.js v18.3.0
Jun 11 13:55:44 exozyme systemd[1]: mx-puppet-discord.service: Main process exited, code=exited, status=1/FAILURE
mx-puppet-discord is broken again, as expected (since it breaks all the freaking time). This is the error message: ``` Jun 11 13:55:44 exozyme sh[353656]: /usr/lib/node_modules/mx-puppet-discord/node_modules/@mx-puppet/better-discord.js/src/client/actions/MessageCreate.js:11 Jun 11 13:55:44 exozyme sh[353656]: const existing = channel.messages.cache.get(data.id); Jun 11 13:55:44 exozyme sh[353656]: ^ Jun 11 13:55:44 exozyme sh[353656]: TypeError: Cannot read properties of undefined (reading 'cache') Jun 11 13:55:44 exozyme sh[353656]: at MessageCreateAction.handle (/usr/lib/node_modules/mx-puppet-discord/node_modules/@mx-puppet/better-discord.js/src/client/actions/MessageCreate.js:11:41) Jun 11 13:55:44 exozyme sh[353656]: at module.exports [as MESSAGE_CREATE] (/usr/lib/node_modules/mx-puppet-discord/node_modules/@mx-puppet/better-discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js> Jun 11 13:55:44 exozyme sh[353656]: at WebSocketManager.handlePacket (/usr/lib/node_modules/mx-puppet-discord/node_modules/@mx-puppet/better-discord.js/src/client/websocket/WebSocketManager.js:391:31) Jun 11 13:55:44 exozyme sh[353656]: at WebSocketShard.onPacket (/usr/lib/node_modules/mx-puppet-discord/node_modules/@mx-puppet/better-discord.js/src/client/websocket/WebSocketShard.js:451:22) Jun 11 13:55:44 exozyme sh[353656]: at WebSocketShard.onMessage (/usr/lib/node_modules/mx-puppet-discord/node_modules/@mx-puppet/better-discord.js/src/client/websocket/WebSocketShard.js:308:10) Jun 11 13:55:44 exozyme sh[353656]: at WebSocket.onMessage (/usr/lib/node_modules/mx-puppet-discord/node_modules/ws/lib/event-target.js:132:16) Jun 11 13:55:44 exozyme sh[353656]: at WebSocket.emit (node:events:527:28) Jun 11 13:55:44 exozyme sh[353656]: at Receiver.receiverOnMessage (/usr/lib/node_modules/mx-puppet-discord/node_modules/ws/lib/websocket.js:1047:20) Jun 11 13:55:44 exozyme sh[353656]: at Receiver.emit (node:events:527:28) Jun 11 13:55:44 exozyme sh[353656]: at Receiver.dataMessage (/usr/lib/node_modules/mx-puppet-discord/node_modules/ws/lib/receiver.js:517:14) Jun 11 13:55:44 exozyme sh[353656]: Node.js v18.3.0 Jun 11 13:55:44 exozyme systemd[1]: mx-puppet-discord.service: Main process exited, code=exited, status=1/FAILURE ```
a added the
bug
label 2022-06-11 18:57:17 +00:00
a added this to the (deleted) project 2022-06-11 18:57:19 +00:00
Author
Owner
It's been reported upstream too: https://gitlab.com/mx-puppet/discord/mx-puppet-discord/-/issues/207
Author
Owner

Attempting the fix suggested upstream causes the bridge to not crash but it also can't send messages to the Discord side (since that library is the buggy one). For now I modified to systemd service to auto-restart mx-puppet-discord if it crashes, which is a really bad solution but there's not much we can do about it.

Attempting the fix suggested upstream causes the bridge to not crash but it also can't send messages to the Discord side (since that library is the buggy one). For now I modified to systemd service to auto-restart mx-puppet-discord if it crashes, which is a really bad solution but there's not much we can do about it.
a closed this issue 2022-06-11 19:39:49 +00:00
Author
Owner

Reopening since that solution above isn't a long-term fix.

Reopening since that solution above isn't a long-term fix.
a reopened this issue 2022-06-11 19:47:37 +00:00
Author
Owner

Well it seems to work every few runs so I guess we'll just have to go with this "solution" for now and hope it gets fixed by upstream soon.

Well it seems to work every few runs so I guess we'll just have to go with this "solution" for now and hope it gets fixed by upstream soon.
a closed this issue 2022-06-11 19:49:28 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: exozyme/exozyme#152
No description provided.