livekit / client-sdk-android

LiveKit SDK for Android
https://docs.livekit.io
Apache License 2.0
165 stars 64 forks source link

Proguard rules need to be updated - ClassNotFoundException: android.gov.nist.javax.sdp.parser.AttributeFieldParser #313

Closed dcarr622 closed 8 months ago

dcarr622 commented 8 months ago

Describe the bug With version 1.5.0, the included proguard rules no longer produce a working build with R8

To Reproduce Attempt to use LiveKit in an app with R8 enabled

De-obfuscated stack trace:

java.lang.ClassNotFoundException: android.gov.nist.javax.sdp.parser.AttributeFieldParser
    at java.lang.Class.classForName(Native Method)
    at java.lang.Class.forName(Class.java:536)
    at java.lang.Class.forName(Class.java:467)
    at android.gov.nist.javax.sdp.parser.ParserFactory.getParser(SourceFile:7)
    at android.gov.nist.javax.sdp.parser.ParserFactory.<clinit>(SourceFile:20)
    at android.gov.nist.javax.sdp.parser.SDPAnnounceParser.parse(SourceFile:22)
    at io.livekit.android.room.PeerConnectionTransport.android.javax.sdp.SdpFactory.createSessionDescription(SourceFile:334)
                                                    createAndSendOffer
    at io.livekit.android.room.PeerConnectionTransport$negotiate$1.invokeSuspend(SourceFile:39)
    at io.livekit.android.room.PeerConnectionTransport$negotiate$1.io.livekit.android.room.PeerConnectionTransport$negotiate$1.invoke(SourceFile:13)
                                                                invoke
    at io.livekit.android.util.CoroutineUtilKt$debounce$1$1.invokeSuspend(SourceFile:49)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(SourceFile:9)
    at kotlinx.coroutines.DispatchedTask.run(SourceFile:114)
    at kotlinx.coroutines.ResumeUndispatchedRunnable.kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(SourceFile:34)
                                                  run$bridge
    at kotlinx.coroutines.scheduling.TaskImpl.run(SourceFile:3)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(SourceFile:94)
                                                            kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask
                                                            kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker
                                                            run
Caused by: java.lang.ClassNotFoundException: android.gov.nist.javax.sdp.parser.AttributeFieldParser

Device Info:

Adding keep rules for these classes fixes the issue