Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ANR happening on some Android 11/12 devices after calling PlayKitManager.loadPlayer #781

Open
4 of 5 tasks
dmotpan opened this issue Apr 13, 2022 · 5 comments
Open
4 of 5 tasks
Assignees

Comments

@dmotpan
Copy link

dmotpan commented Apr 13, 2022

Prerequisites
  • Have you checked for duplicate issues: yes
  • Which Player version are you using: 4.9.0 -> 4.22.0
  • Can you reproduce the issue with our latest release version: No, but I can see that PlayKitManager.loadPlayer is calling MediaSupport.checkWidevineModular which triggers the same native code.
  • Can you reproduce the issue with the latest code from master: -
  • What devices and OS versions are you using: OnePlus 8/8T/8Pro (Android 11) , Samsung S20 FE (Android 12), Moto g9 (Android 11)

According to our Crashlytics, there multiple ANRs happening when trying to load the player on different devices. Most often it's OnePlus 8/8T/8Pro (Android 11) , Samsung S20 FE (Android 12), Moto g9 (Android 11)

Expected behavior

PlayKitManager.loadPlayer initializes the player

Actual behavior

An ANR occurs when trying to initialize the player

  • Unfortunately, I don't have any of the devices where the ANR happens, so I'm providing the log from Crashlytics.
Console output
#00 pc 0x9b2b4 libc.so 
#01 pc 0x57de0 libc.so 
#02 pc 0x87dbc libhidlbase.so 
#03 pc 0x8326c libhidlbase.so 
#04 pc 0x7c7d0 libhidlbase.so 
#05 pc 0x7d83c libhidlbase.so 
#06 pc 0x4b590 libhidlbase.so 
#07 pc 0x4e320 libhidlbase.so 
#08 pc 0x3b61c [email protected] 
#09 pc 0x22730 libmediadrm.so 
#10 pc 0x2256c libmediadrm.so 
#11 pc 0x671cc libhidlbase.so 
#12 pc 0x83288 libhidlbase.so 
#13 pc 0x7699c libhidlbase.so 
#14 pc 0x772f8 libhidlbase.so 
#15 pc 0x21648 libmediadrm.so 
#16 pc 0x154f4 libmediadrm.so 
#17 pc 0x15674 libmediadrm.so 
#18 pc 0x21478 libmediadrm.so 
#19 pc 0x51a48 libmedia_jni.so 
       at android.media.MediaDrm.isCryptoSchemeSupportedNative(MediaDrm.java)
       at android.media.MediaDrm.isCryptoSchemeSupported(MediaDrm.java:174)
       at com.kaltura.playkit.player.MediaSupport$WidevineModularUtil.checkWidevineModular(MediaSupport.java:285)
       at com.kaltura.playkit.player.MediaSupport$WidevineModularUtil.access$000(MediaSupport.java:274)
       at com.kaltura.playkit.player.MediaSupport.checkWidevineModular(MediaSupport.java:121)
       at com.kaltura.playkit.player.MediaSupport.initializeDrm(MediaSupport.java:96)
       at com.kaltura.playkit.PlayKitManager.loadPlayer(PlayKitManager.java:58)
       at com.kaltura.playkit.PlayKitManager.loadPlayer(PlayKitManager.java:71)
@GouravSna
Copy link
Contributor

I remember that other people were facing this issue and now it is trimmed down. AFA I remember, it was some platform issue. I will recommend to take the latest Playkit version.
If possible, try checking the DRM availability and open DRM session in user's devices using our utility app https://play.google.com/store/apps/details?id=com.kaltura.kalturadeviceinfo

Please let us know if you still face issue in the latest version.

-Thanks

@GouravSna GouravSna self-assigned this May 2, 2022
@dmotpan
Copy link
Author

dmotpan commented Jun 6, 2022

@GouravSna we upgraded the library version to 4.22.0 in our project and after analysing the data I can confirm that the ANR is still happening.

@GouravSna
Copy link
Contributor

@dmotpan Thanks for coming back.

I will request you to capture the Device ADB bug report. I can see somehow this error is coming from platform level here but need more info in order to report it to either ExoPlayer or Android Platform.

May I know the impact is low now after upgrading to v4.22.0 or it is getting worse ?

@dmotpan
Copy link
Author

dmotpan commented Jun 8, 2022

@GouravSna unfortunately, we cannot reproduce the ANR on our side so I cannot provide the device ADB bug report.

The impact after upgrading v4.22.0 looks to be at the same level as it was in the older version.

As far as I can see the last readable calls are
at android.media.MediaDrm.isCryptoSchemeSupportedNative(MediaDrm.java) at android.media.MediaDrm.isCryptoSchemeSupported(MediaDrm.java:174)
from the android.media so it seems the issue is in the Android Platform code.

However, it looks like the ANR happens when trying to check for DRM, so I was wondering if adding a flag like enableDrm to the playkit is an option?

@GouravSna
Copy link
Contributor

Hi @dmotpan , We will take a look internally about your suggestion. We will keep you posted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants