haiyangwu / mediasoup-client-android

mediasoup android client side library https://mediasoup.org
MIT License
178 stars 107 forks source link

app crashing when minifyEnabled set true #83

Open hariuppi opened 8 months ago

hariuppi commented 8 months ago

this what I get when open the app using latest mediasoup client version io.github.haiyangwu:mediasoup-client:3.4.0 and target and compiled sdk 33

01 pc 00000000006e7760 /data/app/~~_kl2aYjO--6P9r5PyBpVfA==/com.tvisha.troopimpremise-1Etuk-R6ut3cc6h343UIWA==/lib/arm64/libmediasoupclient_so.so (BuildId: 7cf57eac3cd8ab34de7eaa79328e54cee64ea06e)

2023-10-31 20:33:25.904 24985-24985 DEBUG pid-24985 A #02 pc 00000000006e76f8 /data/app/~~_kl2aYjO--6P9r5PyBpVfA==/com.tvisha.troopimpremise-1Etuk-R6ut3cc6h343UIWA==/lib/arm64/libmediasoupclient_so.so (BuildId: 7cf57eac3cd8ab34de7eaa79328e54cee64ea06e) 2023-10-31 20:33:25.904 24985-24985 DEBUG pid-24985 A #03 pc 0000000000a8a730 /data/app/~~_kl2aYjO--6P9r5PyBpVfA==/com.tvisha.troopimpremise-1Etuk-R6ut3cc6h343UIWA==/lib/arm64/libmediasoupclient_so.so (BuildId: 7cf57eac3cd8ab34de7eaa79328e54cee64ea06e) 2023-10-31 20:33:25.904 24985-24985 DEBUG pid-24985 A #04 pc 0000000000a87768 /data/app/~~_kl2aYjO--6P9r5PyBpVfA==/com.tvisha.troopimpremise-1Etuk-R6ut3cc6h343UIWA==/lib/arm64/libmediasoupclient_so.so (BuildId: 7cf57eac3cd8ab34de7eaa79328e54cee64ea06e) 2023-10-31 20:33:25.904 24985-24985 DEBUG pid-24985 A #05 pc 0000000000521988 /data/app/~~_kl2aYjO--6P9r5PyBpVfA==/com.tvisha.troopimpremise-1Etuk-R6ut3cc6h343UIWA==/lib/arm64/libmediasoupclient_so.so (JNI_OnLoad+24) (BuildId: 7cf57eac3cd8ab34de7eaa79328e54cee64ea06e) 2023-10-31 20:33:25.904 24985-24985 DEBUG pid-24985 A #13 pc 0000000000c059fc /data/app/~~_kl2aYjO--6P9r5PyBpVfA==/com.tvisha.troopimpremise-1Etuk-R6ut3cc6h343UIWA==/oat/arm64/base.vdex (org.mediasoup.droid.MediasoupClient.+4) 2023-10-31 20:33:25.904 24985-24985 DEBUG pid-24985 A #20 pc 0000000000ad8bfc /data/app/~~_kl2aYjO--6P9r5PyBpVfA==/com.tvisha.troopimpremise-1Etuk-R6ut3cc6h343UIWA==/oat/arm64/base.vdex

when set the minifyEnabled true and shrinkResources true the crash exactly when initializing the MediasoupClient.initialize(applicationContext) this line.

hariuppi commented 7 months ago

fixed when set the minifyEnabled true by adding these two lines in proguard-rules.pro -keep class org.mediasoup.droid.* { ; } -keep class org.webrtc.* {;}