-
Notifications
You must be signed in to change notification settings - Fork 735
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
element android 1.6.20 crash when joining video group/ jitsi conference. #8885
Comments
Same issue here, Samsung Galaxy S23, Folder 3. It happens regardless on android phone model. |
On my GF's phone also crashes and she uses samsung |
I am running into the same issue. Here are my device details:
Worthy of note, this problem does not happen when joining a direct call, it needs to be a conference call. As best I can tell, it seems to be an Android 14 permissions problem. Now that the Element Android app targets SDK 34 (Android 14) it has to abide by certain permission policies. The problem seems to be coming from the Jitsi Meet SDK (which explains the conference call). I noticed that version 8.1.1 of the org.jitsi.react:jitsi-meet-sdk is being used, which is over a year old so I tried to upgrade it to 10.1.0 and ran into a different problem. The new problem is the screen goes black when joining a conference call. Since it appears Element builds its own version of the jitsi SDK (see this build script), that might be why I am running into this problem, or it could be an issue with the latest version of jitsi-meet-sdk. The errors I see (which may or may not be related) when the screen goes black are:
Either way, it would be great if someone smarter with the react-native, jitsi, and Element source code could take a look. I am hoping it is an easy fix (several threads mentioned changng npm library versions and clearing the cache). |
Ok, I can confirm that upgrading to version 10.1.0 of the Jitsi Mobile SDK fixes the issue! I compiled the Jitsi Mobile SDK myself (using the instructions in this repo) for 10.1.0 and got past the issue I was seeing before with the blank screen. No idea why that fixed it, but I am guessing it has something to do with a packaged react-android node library... or something like that. Anyway, I will gen up a PR tomorrow and see if I can clean up my code enough to get it accepted. |
…4 (update jitsi-meet-sdk to 10.1.0)
Since this is a regression from the previous version of Element-Android, and since it affects a major feature likely used by many, can a rollback of the specific change that causes this crash be considered? That way, Element could be used for video/voice conferences again while a more thorough fix is being prepared. It seems the fix via #8891 and element-hq/jitsi_libre_maven#1 will take much longer to deploy, given the problems with missing dependencies described there. |
It seems the change can't be rolled back due to the following: When targeting Android 14 (SDK 34), foreground service permissions must be declared. Starting August 31st, 2024, new app versions are required to target SDK 34 to be published on Google Play (see this link). Regarding the two PRs you mentioned, I just need someone from the Element team to provide feedback. There are several possible ways to address the decision not to use mavenCentral, but I’d prefer to align with the team’s best practices rather than implementing a solution independently. It's a bit disheartening to have spent time fixing this issue and submitting two PRs without any acknowledgment from the Element team. Even if they don't like the approach I took, just tell me that instead of leaving the PRs hanging. |
@bmarty , I have the code written up to fix this bug. Any chance you can take a look at my PRs? |
I am looking at this right now. |
Description
join a video room, loads for a bit, then crashes.
using a google pixel 7 pro running graphineOS.
crash log shows the following.
type: crash
osVersion: google/cheetah/cheetah:14/AP2A.240805.005/2024080600:user/release-keys
package: im.vector.app:40106202
process: im.vector.app
processUptime: 24029 + 369 ms
installer: com.android.vending
java.lang.RuntimeException: Unable to create service org.jitsi.meet.sdk.JitsiMeetOngoingConferenceService: java.lang.SecurityException: Starting FGS with type mediaProjection callerApp=ProcessRecord{f51e57e 3678:im.vector.app/u0a193} 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]
at android.app.ActivityThread.handleCreateService(ActivityThread.java:4942)
at android.app.ActivityThread.-$$Nest$mhandleCreateService(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2414)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loopOnce(Looper.java:232)
at android.os.Looper.loop(Looper.java:317)
at android.app.ActivityThread.main(ActivityThread.java:8623)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
at com.android.internal.os.ExecInit.main(ExecInit.java:50)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:369)
Caused by: java.lang.SecurityException: Starting FGS with type mediaProjection callerApp=ProcessRecord{f51e57e 3678:im.vector.app/u0a193} 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]
at android.os.Parcel.createExceptionOrNull(Parcel.java:3192)
at android.os.Parcel.createException(Parcel.java:3176)
at android.os.Parcel.readException(Parcel.java:3152)
at android.os.Parcel.readException(Parcel.java:3094)
at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:6975)
at android.app.Service.startForeground(Service.java:778)
at org.jitsi.meet.sdk.JitsiMeetOngoingConferenceService.onCreate(SourceFile:37)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:4929)
... 11 more
Caused by: android.os.RemoteException: Remote stack trace:
at com.android.server.am.ActiveServices.validateForegroundServiceType(ActiveServices.java:2842)
at com.android.server.am.ActiveServices.setServiceForegroundInnerLocked(ActiveServices.java:2530)
at com.android.server.am.ActiveServices.setServiceForegroundLocked(ActiveServices.java:1806)
at com.android.server.am.ActivityManagerService.setServiceForeground(ActivityManagerService.java:13879)
at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:3491)
The text was updated successfully, but these errors were encountered: