jitsi / jitsi-meet

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
https://jitsi.org/meet
Apache License 2.0
23.09k stars 6.71k forks source link

Android app crashes on Android 12 due to some PendingIntent usage requirements #12506

Closed mvasl closed 1 year ago

mvasl commented 1 year ago

Description:

I am using Jitsi Meet Android app, latest build from google play store as of now, on a Samsung Galaxy Fold 4 running OneUI 4.1.1, Android 12. Jitsi Meet app crashes immediately after I launch it with an exception like the one below in logcat.

11-03 17:22:26.119  1241  1328 W FA      : Service disabled
11-03 17:22:26.120  1241  1241 D MainActivity: LIBRE_BUILD=false
11-03 17:22:26.120  1241  1241 D MainActivity: Initializing Google Services
11-03 17:22:26.121  1467  1467 I SurfaceFlinger: [7ce7790 org.jitsi.meet/org.jitsi.meet.MainActivity#0] FrameRatePriority: 1
11-03 17:22:26.121  1467  1467 I Layer   : id=21969 removedFromDrawingState Surface(name=4fbc713 StatusBar)/@0x4584c0c - animation-leash of insets_animation#0 (158)
11-03 17:22:26.121  1467  1467 I Layer   : id=21970 removedFromDrawingState Surface(name=3f04d40 NavigationBar0)/@0x26445be - animation-leash of insets_animation#0 (158)
11-03 17:22:26.121  3576  3576 W AppTransitionAnimatorImpl: onAnimationStart - APP IN
11-03 17:22:26.121  1467  1467 I Layer   : id=21971 removedFromDrawingState Surface(name=b433f5f Taskbar)/@0xc5ee20c - animation-leash of insets_animation#0 (158)
11-03 17:22:26.121  1467  1467 I SurfaceFlinger: id=21969 Removed Surface(name=4fbc713 StatusBar)/@0x4584c0c - animation-leash of insets_animation#0 (158)
11-03 17:22:26.121  1467  1467 I SurfaceFlinger: id=21970 Removed Surface(name=3f04d40 NavigationBar0)/@0x26445be - animation-leash of insets_animation#0 (158)
11-03 17:22:26.121  1467  1467 I SurfaceFlinger: id=21971 Removed Surface(name=b433f5f Taskbar)/@0xc5ee20c - animation-leash of insets_animation#0 (158)
11-03 17:22:26.121  1467  1467 I Layer   : id=21969 Destroyed Surface(name=4fbc713 StatusBar)/@0x4584c0c - animation-leash of insets_animation#0
11-03 17:22:26.122  1467  1467 I Layer   : id=21970 Destroyed Surface(name=3f04d40 NavigationBar0)/@0x26445be - animation-leash of insets_animation#0
11-03 17:22:26.122  1467  1467 I Layer   : id=21971 Destroyed Surface(name=b433f5f Taskbar)/@0xc5ee20c - animation-leash of insets_animation#0
11-03 17:22:26.122  1241  1337 D CompatibilityChangeReporter: Compat change id reported: 160794467; UID 10383; state: ENABLED
11-03 17:22:26.122  1467  1467 W Scheduler: No mode changed params found, not dispatching cached mode.
11-03 17:22:26.122  1241  1337 E AndroidRuntime: FATAL EXCEPTION: GoogleApiHandler
11-03 17:22:26.122  1241  1337 E AndroidRuntime: Process: org.jitsi.meet, PID: 1241
11-03 17:22:26.122  1241  1337 E AndroidRuntime: java.lang.IllegalArgumentException: org.jitsi.meet: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
11-03 17:22:26.122  1241  1337 E AndroidRuntime: Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
11-03 17:22:26.122  1241  1337 E AndroidRuntime:    at android.app.PendingIntent.checkFlags(PendingIntent.java:382)
11-03 17:22:26.122  1241  1337 E AndroidRuntime:    at android.app.PendingIntent.getActivityAsUser(PendingIntent.java:465)
11-03 17:22:26.122  1241  1337 E AndroidRuntime:    at android.app.PendingIntent.getActivity(PendingIntent.java:451)
11-03 17:22:26.122  1241  1337 E AndroidRuntime:    at android.app.PendingIntent.getActivity(PendingIntent.java:415)
11-03 17:22:26.122  1241  1337 E AndroidRuntime:    at ma.f.f(Unknown Source:2)
11-03 17:22:26.122  1241  1337 E AndroidRuntime:    at ma.f.e(Unknown Source:1)
11-03 17:22:26.122  1241  1337 E AndroidRuntime:    at ma.e.e(Unknown Source:1)
11-03 17:22:26.122  1241  1337 E AndroidRuntime:    at ma.e.q(Unknown Source:3)
11-03 17:22:26.122  1241  1337 E AndroidRuntime:    at ma.e.B(Unknown Source:1)
11-03 17:22:26.122  1241  1337 E AndroidRuntime:    at com.google.android.gms.common.api.internal.e.r(Unknown Source:1)
11-03 17:22:26.122  1241  1337 E AndroidRuntime:    at com.google.android.gms.common.api.internal.e$a.h(Unknown Source:12)
11-03 17:22:26.122  1241  1337 E AndroidRuntime:    at com.google.android.gms.common.api.internal.e$a.a(Unknown Source:5)
11-03 17:22:26.122  1241  1337 E AndroidRuntime:    at com.google.android.gms.common.api.internal.e$a.m(Unknown Source:10)
11-03 17:22:26.122  1241  1337 E AndroidRuntime:    at com.google.android.gms.common.api.internal.e.handleMessage(Unknown Source:50)
11-03 17:22:26.122  1241  1337 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:102)
11-03 17:22:26.122  1241  1337 E AndroidRuntime:    at bb.h.dispatchMessage(Unknown Source:1)
11-03 17:22:26.122  1241  1337 E AndroidRuntime:    at android.os.Looper.loopOnce(Looper.java:226)
11-03 17:22:26.122  1241  1337 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:313)
11-03 17:22:26.122  1241  1337 E AndroidRuntime:    at android.os.HandlerThread.run(HandlerThread.java:67)
11-03 17:22:26.122  3576  6391 I ViewRootImpl@9c27a97[LauncherActivity]: mWNT: t = android.view.SurfaceControl$Transaction@6f2e512 fn = 34 com.android.systemui.shared.system.ViewRootImplCompat.mergeWithNextTransaction:2 com.android.quickstep.util.SurfaceTransactionApplier.lambda$scheduleApply$0:9 com.android.quickstep.util.SurfaceTransactionApplier.a:0
11-03 17:22:26.122  3576  6391 I ViewRootImpl@9c27a97[LauncherActivity]: mWNT: merge t to BBQ
11-03 17:22:26.123  1241  1337 E JitsiMeetSDK: JitsiMeetUncaughtExceptionHandler FATAL ERROR
saghul commented 1 year ago

What exact version and build number are you running?

mvasl commented 1 year ago

22.6.0 12030310

saghul commented 1 year ago

So weird! I'm aunable to reproduce it on a Pixel 3a XL, running Android 12 too. Is there something special about that device?

mvasl commented 1 year ago

Weird indeed, was pretty surprised to see this too, on my Poco X3 Pro running 12 it was ok too.

Not sure about "special", it's completely stock, just bought it a week ago, only installed latest updates, no unlocks or other rom trickery. Maybe I missed something else in logs and this intent exception is not the root cause. I may try different builds, like fdroid or build myself and see if I can reproduce it there.

mvasl commented 1 year ago

22.5.1 from f-droid works, it that a regression?

saghul commented 1 year ago

22.5.1 from f-droid works, it that a regression?

I don't think we have made changed things regarding intents... maybe a transitive dependency.

Any chance you can pinpoint the offending code / library?

mvasl commented 1 year ago

22.6.0 from google play is obfuscated, so probably no. Why do you even obfuscate an open source app?

saghul commented 1 year ago

@tmoldovan8x8 do you have any ideas here?

mehul4795 commented 1 year ago

I was facing the same issue and got it solved by manually adding the latest version of WorkManager. Please refer to this answer for more information.

saghul commented 1 year ago

I don't think we have a dependency on WorkManager. I tried bumping our compile and target SDKs to 32 and got no crash. Any chance that dependency comes from your app?

mehul4795 commented 1 year ago

Sorry, I forgot to mention. Yes, the dependency of WorkManager comes from another library in my app. I think @justmax437 must be having the same issue.

saghul commented 1 year ago

Thanks for confirming! I'm going to tentatively close this then.