Oceanic
Oceanic copied to clipboard
Error when starting bot using zstd-stream compression
I'm using Oceanic v1.11.2 with zstd-stream compression enabled (with fzstd). When I start my test bot, it runs fine, but when I start the main bot (~ 150 guilds) it throws multiple JSON parsing errors in the console:
SyntaxError: Expected double-quoted property name in JSON at position 130484
at JSON.parse (<anonymous>)
at Shard.onWSMessage (/Users/david/Desktop/D4rkBot/node_modules/oceanic.js/lib/gateway/Shard.ts:483:47)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at Shard.onWSMessage (/Users/david/Desktop/D4rkBot/node_modules/oceanic.js/lib/gateway/Shard.ts:483:47)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
SyntaxError: Unterminated string in JSON at position 130486
at JSON.parse (<anonymous>)
at Shard.onWSMessage (/Users/david/Desktop/D4rkBot/node_modules/oceanic.js/lib/gateway/Shard.ts:483:47)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
WARN Non-consecutive sequence (7 -> 11)
SyntaxError: Unterminated string in JSON at position 130811
at JSON.parse (<anonymous>)
at Shard.onWSMessage (/Users/david/Desktop/D4rkBot/node_modules/oceanic.js/lib/gateway/Shard.ts:483:47)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
WARN Non-consecutive sequence (13 -> 15)
SyntaxError: Unterminated string in JSON at position 120241
at JSON.parse (<anonymous>)
at Shard.onWSMessage (/Users/david/Desktop/D4rkBot/node_modules/oceanic.js/lib/gateway/Shard.ts:483:47)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
WARN Non-consecutive sequence (31 -> 33)
(...)
Client options:
{
auth: process.env.TOKEN,
defaultImageFormat: 'png',
gateway: {
getAllUsers: true,
compress: "zstd-stream",
intents: [
'GUILDS',
'GUILD_MEMBERS',
'GUILD_EMOJIS_AND_STICKERS',
'GUILD_VOICE_STATES',
'GUILD_PRESENCES',
'GUILD_MESSAGES'
]
},
collectionLimits: {
messages: 10
}
}