prof18 / RSS-Parser

A Kotlin Multiplatform library to parse a RSS Feed
Apache License 2.0
509 stars 129 forks source link

ClassCastException after updating #89

Closed minarja1 closed 3 years ago

minarja1 commented 3 years ago

Hello, I have updated a bunch of dependencies in my project, including:

and now I'm getting the following error whenever I try to parse any feed:

E/RSSSourceRepository$updateDB: java.lang.ClassCastException: kotlin.Unit cannot be cast to com.prof.rssparser.Channel
        at com.prof.rssparser.Parser$getChannel$2.invokeSuspend(Parser.kt:177)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

NOTE: This issue does not appear when I downgrade RSSParser to 3.1.2. Only in version 3.1.3 and up.

prof18 commented 3 years ago

I should have fixed it yesterday! 😅 https://github.com/prof18/RSS-Parser/commit/68dc46a4cf8b10334ef8c7c39acddf2cd0dfc0c1

I'm gonna release a new version of the library between today and tomorrow.

prof18 commented 3 years ago

I've just released the new version! (It could take some time before MavenCentral will show it)