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.

ClassCastException on new channel types

See original GitHub issue

When calling GuildBehavior.channels and colleting the resulting Flow, and the guild contains one of the new channel types, it throws a ClassCastException: java.lang.ClassCastException: class dev.kord.core.entity.channel.Channel$Companion$from$1 cannot be cast to class dev.kord.core.entity.channel.GuildChannel Probably because the new channels aren’t implemented and therefore are an anonymous Channel, which of course is not a GuildChannel.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
gdude2002commented, May 24, 2021

FTR, at least right now, users are encouraged to make use of the KordEx snapshots. I’ll get another stable release out once Kord hits Kotlin 1.5.

0reactions
BartAryscommented, May 24, 2021

kord-extensions:1.4.0-RC depends on a snaptshot from before the fix was applied (26 feb vs Apr13). This should be fixed (for cache at least) when the author updates their dependency and will be completely fixed in the next Kord release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to resolve a ClassCastException error message in ...
Double-click the channel to see which fields are being converted. The Output Data Type on the far right will appear in green for...
Read more >
Why am I getting this ClassCastException in my AsyncTask?
I declared an new AsyncTask<Void, Void, Void>() and for unknown reasons, I got the same exception as the OP. When I changed it...
Read more >
Fixing ClassCastException - YouTube
A ClassCastException occurs when you attempt to cast an object to a variable type that does not represent it. In this video, we...
Read more >
ClassCastException (Java Platform SE 7 ) - Oracle Help Center
Thrown to indicate that the code has attempted to cast an object to a subclass of which it is not an instance. For...
Read more >
ERROR:" java.lang.ClassCastException" while creating new ...
ERROR:" java.lang.ClassCastException" while creating new entity and when "SearchBeforeCreate" was configured in MDM ...
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