jitsi / jitsi-meet-sdk-samples

Jitsi Meet mobile SDK examples (Android, iOS and React Native)
Apache License 2.0
283 stars 240 forks source link

Unable to Initiate Jitsi Meet After Upgrading to Android 14 App Crashing #217

Closed pramod279 closed 2 months ago

pramod279 commented 10 months ago

Unable to initiate Jitsi Meet - App Crashes Immediately after targeting Android 14.

Fatal Exception: java.lang.RuntimeException Unable to create service org.jitsi.meet.sdk.JitsiMeetOngoingConferenceService: java.lang.SecurityException: Starting FGS with type mediaProjection callerApp=ProcessRecord{82fabab 28805:com.darisni.nursery.debug/u0a287} targetSDK=34 requires permissions: all of the permissions allOf=true [android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION] any of the permissions allOf=false [android.permission.CAPTURE_VIDEO_OUTPUT, android:project_media]

saghul commented 10 months ago

Are you using our app or the SDK?

pramod279 commented 10 months ago

Hi @saghul I am using the SDK.

saghul commented 10 months ago

Are you building your app with target SDK 34? Our SDK does not support that yet, you should target API 33 until an SDK which targets 34 is out.

pramod279 commented 10 months ago

Yes, I have upgraded my app to SDK 34 which is when this crash started occurring. Most of the other libraries I am using have upgraded to support SDK 34, which is why I am forced to use SDK 34.

May I know by when we could expect Jitsi SDK to support SDK 34 as it has been launched months back. Google recommends upgrading to SDK 34

saghul commented 10 months ago

Supporting 34 doesn't mean you have to do it too, you can target 33 and your app will still work.

We expect to have a version which targets 34 this month.

pramod279 commented 10 months ago

Thanks for that update.

mzgg commented 9 months ago

Does it support version 34 now? and which version

saghul commented 9 months ago

Not yet.

mzgg commented 9 months ago

when do you plan it to release ?

saghul commented 9 months ago

No ETA right now, we have run into some problems with new foreground service permissions and are working on fixing them.

chanmyaeaung-amity commented 4 months ago

@saghul Is there any updates on this?

saghul commented 4 months ago

The latest version should have the fix, have you ran into problems?

chanmyaeaung-amity commented 4 months ago

@saghul I am using org.jitsi.react:jitsi-meet-sdk:6.0.0 before. T support android 14. I changed to org.jitsi.react:jitsi-meet-sdk:9.2.2 and got this build issue.

`Execution failed for task ':app:mergeDebugNativeLibs'.

2 files found with path 'lib/arm64-v8a/libfbjni.so' from inputs:

  • /Users/amity/.gradle/caches/transforms-3/1addc573fc51e166d5ac7f6196f72c77/transformed/jetified-react-android-0.72.9-debug/jni/arm64-v8a/libfbjni.so
  • /Users/amity/.gradle/caches/transforms-3/ba51a498c47e27c1e6a772ca73d84a39/transformed/jetified-fbjni-0.3.0/jni/arm64-v8a/libfbjni.so`
saghul commented 4 months ago

Are you trying to integrate the Android SDK in an RN app?

chanmyaeaung-amity commented 4 months ago

@saghul It is android project. I don't have any other RN lib in my project. Kotlin version : 1.7.21 Gradle : com.android.tools.build:gradle:7.2.2 Gradle wrapper distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip

saghul commented 4 months ago

Weird. Are you using our proguard rules file?

viking2917 commented 4 months ago

The latest version should have the fix, have you ran into problems?

@saghul just confirming, by 'latest version' you mean 9.2.2 correct?

(I am also struggling with the Foreground_permission problem, but it may well be my issue, still investigating).

chanmyaeaung-amity commented 4 months ago

@saghul No proguard, minifyenable is false.

If I add packagingOptions { pickFirst '**/libfbjni.so' }

Build succeed. But video and audio streaming are not working anymore.

saghul commented 3 months ago

@saghul No proguard, minifyenable is false.

If I add packagingOptions { pickFirst '**/libfbjni.so' }

Build succeed. But video and audio streaming are not working anymore.

Are you using other RN libraries / SDKs?

ugmlr commented 2 months ago

Had the same problem, I'm not exactly sure which package clashes, but adding

        pickFirst '**/libfbjni.so'
        pickFirst 'lib/x86/libfbjni.so'
        pickFirst 'lib/x86_64/libfbjni.so'
        pickFirst 'lib/armeabi-v7a/libfbjni.so'
        pickFirst 'lib/arm64-v8a/libfbjni.so'

worked for me (adding just the first one like @chanmyaeaung-amity didn't work for some reason) I am using the Flutter SDK so might not work for everyone

kaushal004vsu commented 2 months ago

One plus nord 4 oxygenOS 34 not working for JITSI ,any solution?

richanshah commented 2 months ago

@pramod279 anyone has solution for this solution?

pramod279 commented 2 months ago

@pramod279 anyone has solution for this solution? @richanshah Hi Richa, Unfortunatly no response. They are not giving a proper answer or fix for this issue and no deadlines also given.

ugmlr commented 2 months ago

@pramod279 @richanshah Do you guys still have the problem that was initially described (the App crashing)? Because the newest SDK Version fixed the issue for me

viking2917 commented 2 months ago

@ugmir @pramod279 @richanshah same for me, after using the new SDK everything is working for me. (also see: https://github.com/calvinckho/capacitor-jitsi-meet/issues/115) I had to declare the permission android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK in order for this to work on Android 14. double-check your final AndroidManifest.xml to see if it is there, perhaps.

richanshah commented 2 months ago

It's working now. Thanks.

On Thu, Sep 12, 2024, 10:27 PM Mark Watkins @.***> wrote:

@ugmir @pramod279 https://github.com/pramod279 @richanshah https://github.com/richanshah same for me, after using the new SDK everything is working for me. (also see: calvinckho/capacitor-jitsi-meet#115 https://github.com/calvinckho/capacitor-jitsi-meet/issues/115) I had to declare the permission android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK in order for this to work on Android 14. double-check your final AndroidManifest.xml to see if it is there, perhaps.

— Reply to this email directly, view it on GitHub https://github.com/jitsi/jitsi-meet-sdk-samples/issues/217#issuecomment-2346803941, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEA54E7M6EIN2K5I5J7C2RLZWHBZDAVCNFSM6AAAAABBQZNCUKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBWHAYDGOJUGE . You are receiving this because you were mentioned.Message ID: @.***>