prof18/RSS-Parser

buzzsprout parse error

Muzafferus opened this issue · 3 comments

Describe the bug
When trying to parse buzzsprout podcast link then get crashes.

The link of the RSS Feed
Example: https://feeds.buzzsprout.com/2098639.rss

Crash detail

Xiaomi Redmi Note 8 Pro Android 11, API 30
FATAL EXCEPTION: DefaultDispatcher-worker-1
    Process: com.pod, PID: 5456
    org.xmlpull.v1.XmlPullParserException: Unexpected token (position:TEXT error code: 1020@1:17 in java.io.InputStreamReader@e485903) 
    	at com.android.org.kxml2.io.KXmlParser.next(KXmlParser.java:432)
    	at com.android.org.kxml2.io.KXmlParser.next(KXmlParser.java:313)
    	at com.prof.rssparser.core.CoreXMLParser.parseXML(CoreXMLParser.kt:358)
    	at com.prof.rssparser.enginecoroutine.CoroutineEngine$parseXMLFromString$2.invokeSuspend(CoroutineEngine.kt:27)
    	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:570)
    	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
    	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
    	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
    	Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@9d3a4ac, Dispatchers.IO]

Thanks for reporting!
The issue is on the website side. But HTTP errors weren't correctly handled in the library. It will be fixed in the next release!

Screenshot 2023-02-19 at 13 57 46

I have the same problem, on libraries v5.0.0., v5.0.1 and even v5.0.2. Could you please explane what might be causing it?

Code error:

W/System.err: org.xmlpull.v1.XmlPullParserException: Unexpected token (position:unknown @8:1 in java.io.InputStreamReader@3b006eb)
W/System.err: at com.android.org.kxml2.io.KXmlParser.next(KXmlParser.java:428)
W/System.err: at com.android.org.kxml2.io.KXmlParser.next(KXmlParser.java:313)
W/System.err: at com.prof.rssparser.core.CoreXMLParser.parseXML(CoreXMLParser.kt:365)
W/System.err: at com.prof.rssparser.enginecoroutine.CoroutineEngine$parseXML$2.invokeSuspend(CoroutineEngine.kt:22)
W/System.err: at com.prof.rssparser.enginecoroutine.CoroutineEngine$parseXML$2.invoke(Unknown Source:8)
W/System.err: at com.prof.rssparser.enginecoroutine.CoroutineEngine$parseXML$2.invoke(Unknown Source:4)
W/System.err: at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
W/System.err: at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:169)
W/System.err: at kotlinx.coroutines.BuildersKt.withContext(Unknown Source:1)
W/System.err: at com.prof.rssparser.enginecoroutine.CoroutineEngine.parseXML(CoroutineEngine.kt:21)
W/System.err: at com.prof.rssparser.Parser$getChannel$2.invokeSuspend(Parser.kt:190)
W/System.err: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
W/System.err: at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
W/System.err: at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
W/System.err: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
W/System.err: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
W/System.err: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)