Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read properties of undefined (reading 'cache') on Channel Update #9696

Closed
pkdev08 opened this issue Jul 10, 2023 · 1 comment · Fixed by #9697
Closed

Cannot read properties of undefined (reading 'cache') on Channel Update #9696

pkdev08 opened this issue Jul 10, 2023 · 1 comment · Fixed by #9697

Comments

@pkdev08
Copy link
Contributor

pkdev08 commented Jul 10, 2023

Which package is this bug report for?

discord.js

Issue description

Randomly got this error thrown 5 times and those shards never reconnected, had to manually destroy them. Someone else in the support server reported a similar error. Might be due to new media channels?

TypeError: Cannot read properties of undefined (reading 'cache')
    at ChannelUpdateAction.handle (/home/test/node_modules/discord.js/src/client/actions/ChannelUpdate.js:17:54)
    at module.exports [as CHANNEL_UPDATE] (/home/test/node_modules/discord.js/src/client/websocket/handlers/CHANNEL_UPDATE.js:6:57)
    at WebSocketManager.handlePacket (/home/test/node_modules/discord.js/src/client/websocket/WebSocketManager.js:346:31)
    at WebSocketShard.onPacket (/home/test/node_modules/discord.js/src/client/websocket/WebSocketShard.js:493:22)
    at WebSocketShard.onMessage (/home/test/node_modules/discord.js/src/client/websocket/WebSocketShard.js:327:10)
    at callListener (/home/test/node_modules/ws/lib/event-target.js:290:14)
    at WebSocket.onMessage (/home/test/node_modules/ws/lib/event-target.js:209:9)
    at WebSocket.emit (node:events:513:28)
    at Receiver.receiverOnMessage (/home/test/node_modules/ws/lib/websocket.js:1184:20)
    at Receiver.emit (node:events:513:28)

Code sample

No response

Versions

discord.js 13.16.0
node js 18.16.1

Issue priority

Medium (should be fixed soon)

Which partials do you have configured?

User, Channel, GuildMember, Message, Reaction

Which gateway intents are you subscribing to?

Not applicable

I have tested this issue on a development release

No response

@pkdev08 pkdev08 changed the title Cannot read properties of undefined (reading 'cache') Cannot read properties of undefined (reading 'cache') on CHANNEL_UPDATE Jul 10, 2023
@pkdev08 pkdev08 changed the title Cannot read properties of undefined (reading 'cache') on CHANNEL_UPDATE Cannot read properties of undefined (reading 'cache') on Channel Update Jul 10, 2023
@Jiralite Jiralite self-assigned this Jul 10, 2023
@KevinNovak
Copy link
Contributor

+1, also having this issue on a large bot which causes some shards to hard-crash

@kodiakhq kodiakhq bot closed this as completed in #9697 Jul 11, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants