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

Camera not starting in the latest Jitsi Sdk 9.2.2 Android and iOS #14730

Open
mdhanif-simformsolutions opened this issue May 9, 2024 · 22 comments

Comments

@mdhanif-simformsolutions

Description:

Unable to start camera in the latest sdk version 9.2.2 for Mobile (Android and iOS). I tried downgrading sdk version to 8.3.1 and it works.

Steps to reproduce:

  1. Start meeting
  2. When meeting is connected try enable disable camera it doesn't work

Expected behavior:

  • Camera should be enable/disable as per user's input

Actual behavior:

Camera is off and it prints below error in log:-
Session 0: Exception while stopping repeating: android.hardware.camera2.CameraAccessException: CAMERA_ERROR (3): cancelRequest:630: Camera 1: Error clearing streaming request: Function not implemented (-38)

Server information:

  • Jitsi Meet version: 9.2.2
  • Operating System: Android Pixel 6A (Android 14)
@mdhanif-simformsolutions
Copy link
Author

It seems to be working in the latest Jitsi App on Playstore, but not sure what is wrong with our side of implementation.

@saghul
Copy link
Member

saghul commented May 9, 2024

Can you please share the full adb logcat ?

@mdhanif-simformsolutions
Copy link
Author

yes sure this is how it looks :-
Session 0: Exception while stopping repeating: android.hardware.camera2.CameraAccessException: CAMERA_ERROR (3): cancelRequest:630: Camera 1: Error clearing streaming request: Function not implemented (-38) at android.hardware.camera2.CameraManager.throwAsPublicException(CameraManager.java:1743) at android.hardware.camera2.impl.ICameraDeviceUserWrapper.cancelRequest(ICameraDeviceUserWrapper.java:92) at android.hardware.camera2.impl.CameraDeviceImpl.stopRepeating(CameraDeviceImpl.java:1366) at android.hardware.camera2.impl.CameraCaptureSessionImpl.close(CameraCaptureSessionImpl.java:579) at android.hardware.camera2.impl.CameraCaptureSessionImpl$2.onDisconnected(CameraCaptureSessionImpl.java:805) at android.hardware.camera2.impl.CameraDeviceImpl$7.run(CameraDeviceImpl.java:268) at android.os.Handler.handleCallback(Handler.java:959) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loopOnce(Looper.java:232) at android.os.Looper.loop(Looper.java:317) at android.os.HandlerThread.run(HandlerThread.java:68) Caused by: android.os.ServiceSpecificException: cancelRequest:630: Camera 1: Error clearing streaming request: Function not implemented (-38) (code 10) at android.os.Parcel.createExceptionOrNull(Parcel.java:3196) at android.os.Parcel.createException(Parcel.java:3166) at android.os.Parcel.readException(Parcel.java:3149) at android.os.Parcel.readException(Parcel.java:3091) at android.hardware.camera2.ICameraDeviceUser$Stub$Proxy.cancelRequest(ICameraDeviceUser.java:670) at android.hardware.camera2.impl.ICameraDeviceUserWrapper.cancelRequest(ICameraDeviceUserWrapper.java:90) at android.hardware.camera2.impl.CameraDeviceImpl.stopRepeating(CameraDeviceImpl.java:1366)  at android.hardware.camera2.impl.CameraCaptureSessionImpl.close(CameraCaptureSessionImpl.java:579)  at android.hardware.camera2.impl.CameraCaptureSessionImpl$2.onDisconnected(CameraCaptureSessionImpl.java:805)  at android.hardware.camera2.impl.CameraDeviceImpl$7.run(CameraDeviceImpl.java:268)  at android.os.Handler.handleCallback(Handler.java:959)  at android.os.Handler.dispatchMessage(Handler.java:100)  at android.os.Looper.loopOnce(Looper.java:232)  at android.os.Looper.loop(Looper.java:317)  at android.os.HandlerThread.run(HandlerThread.java:68) 

Just to mention again if I simply downgrade Version back to 8.3.1 It works perfectly fine on the same device.

@saghul
Copy link
Member

saghul commented May 9, 2024

Are you able to reproduce this with the sample app?

@mdhanif-simformsolutions
Copy link
Author

No I am not, It works good in sample app

@mdhanif-simformsolutions
Copy link
Author

It's not related to android though, I am having same issue in my iOS app with version number 9.2.2
Older version works well in iOS as well.

@saghul
Copy link
Member

saghul commented May 9, 2024

Are you connecting to your own server? What versions are you running there? The problem could be that.

@mdhanif-simformsolutions
Copy link
Author

Hi, yes here are the version details :-

jicofo_1.0-1057-1
jitsi-meet-web_1.0.7658-1
jitsi-meet-prosody_1.0.7658-1
jitsi-meet-web-config_1.0.7658-1
jitsi-meet-turnserver_1.0.7658-1
jitsi-meet-tokens_1.0.7658-1
prosody_0.12.4-1
jitsi-videobridge2_2.3-61-g814bffd6-1

@saghul
Copy link
Member

saghul commented May 13, 2024

So that would be https://github.com/jitsi/jitsi-meet/releases/tag/stable%2Fjitsi-meet_9111 which is ~6 months old.

Can you please share your config.js ?

@jallamsetty1 Do you have any idea? The source name flags perhaps?

@jallamsetty1
Copy link
Member

I am not sure what could be the issue either. Source names were enabled by default long time back. The only difference between the Nov'23 release and the latest stable is that we enabled backend support for AV1. However, this shouldn't affect client functionality if AV1 is not set as the preferred codec in config.js.

@mdhanif-simformsolutions
Copy link
Author

Hello @saghul ,
I've attached our config for reference :-
config.js.zip

@saghul
Copy link
Member

saghul commented May 17, 2024

The config looks ok and has all the backwards compatibility flags there:

// Temporary backwards compatibility with old mobile clients.
config.flags = config.flags || {};
config.flags.sourceNameSignaling = true;
config.flags.sendMultipleVideoStreams = true;
config.flags.receiveMultipleVideoStreams = true;

I'm out of ideas here :-/

@mdhanif-simformsolutions
Copy link
Author

Let me try downgrading few versions and check upto which version it works for me, from that maybe we can narrow down the issue

@mdhanif-simformsolutions
Copy link
Author

@saghul So, I am able to use camera upto version 8.6.1
Starting from Version 9.0 I am facing issue while starting camera

@saghul
Copy link
Member

saghul commented May 17, 2024

Alright so something is weird. Reviewing the conversation here you say it works with the sample app.

So let's look at how you integrate the SDK into your app.

@mdhanif-simformsolutions
Copy link
Author

Okay, So currently I am using version 8.3.1

and here's how we start meeting activity :-

val serverURL: URL = try {
            URL(jitsiServerUrl)
        } catch (e: MalformedURLException) {
            e.printStackTrace()
            return
        }

val jitsiMeetUserInfo =  JitsiMeetUserInfo(
                bundleOf(
                    "displayName" to "Test",
                    "email" to "test@yopmail.com"
                )
            )
val defaultOptions = JitsiMeetConferenceOptions.Builder()
            .setServerURL(serverURL)
            .setToken("addTokenHere")
            .build()
JitsiMeet.setDefaultConferenceOptions(defaultOptions)

val jitsiMeetConferenceOptions = JitsiMeetConferenceOptions.Builder()
            .setUserInfo(jitsiMeetUserInfo)
            .build()
JitsiMeetActivity.launch(this, jitsiMeetConferenceOptions)

Let me know if you need any other specific details

@saghul
Copy link
Member

saghul commented May 21, 2024

I don't see the room being set, is that intentional? Also, how does your server URL look like?

@mdhanif-simformsolutions
Copy link
Author

I don't understand by what you mean room here ? do you have any example what do we set ?
Eg Server Url :- https://jitsi.com

Also I do set audio, video feature flags but I believe that will entirely remove Video button from my toolbar options.

@saghul
Copy link
Member

saghul commented May 21, 2024

In the conference options there is no call to seRoom. You need to specify which room to join.

Or did you miss that when copying the sample text over?

@mdhanif-simformsolutions
Copy link
Author

Yes, I am sorry I missed that while copying sample text this is how it should look:-

val defaultOptions = JitsiMeetConferenceOptions.Builder()
            .setRoom("roomIdHere")
            .setServerURL(serverURL)
            .setToken("addTokenHere")
            .build()

@saghul
Copy link
Member

saghul commented May 21, 2024

Ok, that does look ok. Can you please upload the smallest app that doesn't work for you? I don't know what else to suggest TBH.

@mdhanif-simformsolutions
Copy link
Author

Yes, I'll try to do that asap

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

No branches or pull requests

3 participants