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

Error when starting bot using zstd-stream compression #188

Open
davidffa opened this issue Aug 24, 2024 · 0 comments
Open

Error when starting bot using zstd-stream compression #188

davidffa opened this issue Aug 24, 2024 · 0 comments

Comments

@davidffa
Copy link
Contributor

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
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant