question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Kord fails to deserialize a `GuildCreate` event with a unavailable guild

See original GitHub issue
Caused by: kotlinx.serialization.MissingFieldException: Fields [name, icon, owner_id, region, afk_channel_id, afk_timeout, verification_level, default_message_notifications, explicit_content_filter, roles, emojis, features, mfa_level, application_id, system_channel_id, system_channel_flags, rules_channel_id, vanity_url_code, description, banner, premium_tier, preferred_locale, public_updates_channel_id, nsfw_level, premium_progress_bar_enabled] are required for type with serial name 'dev.kord.common.entity.DiscordGuild', but they were missing at path: $.d
        at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:40)
        at kotlinx.serialization.encoding.AbstractDecoder.decodeSerializableValue(AbstractDecoder.kt:43)
        at kotlinx.serialization.encoding.AbstractDecoder.decodeSerializableElement(AbstractDecoder.kt:70)
        at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableElement(StreamingJsonDecoder.kt:111)
        at kotlinx.serialization.encoding.CompositeDecoder$DefaultImpls.decodeSerializableElement$default(Decoding.kt:537)
        at dev.kord.gateway.Event$DeserializationStrategy.getByDispatchEvent(Event.kt:167)
        at dev.kord.gateway.Event$DeserializationStrategy.deserialize(Event.kt:80)
        at dev.kord.gateway.Event$DeserializationStrategy.deserialize(Event.kt:48)
        at kotlinx.serialization.json.internal.PolymorphicKt.decodeSerializableValuePolymorphic(Polymorphic.kt:59)
        at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:38)
        ... 9 common frames omitted

Event Payload:

{"d": {"id": "989200553198375033", "unavailable": true}, "s": 27007, "t": "GUILD_CREATE", "op": 0}

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
HopeBaroncommented, Aug 17, 2022

A fix should be deployed on branch #627 – will keep you up to date

1reaction
HopeBaroncommented, Jun 25, 2022

Seems like a partial guild object – will look into it

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · kordlib/kord - GitHub
Contribute to kordlib/kord development by creating an account on GitHub. ... Kord fails to deserialize a GuildCreate event with a unavailable guild bug ......
Read more >
discord.js guildCreate and guildDelete not firing - Stack Overflow
This has worked fine for the 'ready' and 'interactionCreate' events, but for some reason my 'guildCreate' and 'guildDelete' events do not seem ...
Read more >
[Solved]-discord.js guildCreate.js event not firing-discord.js
Now in your callback, you try to do guild.channels.cache . guild is still undefined, so guild.channels is undefined, and therefore you get the...
Read more >
Problem with guildCreate - Code Help - Discord - Glitch Support
Hello, I'm making a Discord bot using Glitch Discord Bot Starter. I added a “guildCreate” event handler to hears.js which looks like this: ......
Read more >
kord - bytemeta
kord repo issues. ... Kotlin 1.7 fails with TimeMark error. MrPowerGamerBR ... Kord fails to deserialize a `GuildCreate` event with a unavailable guild....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found