jitsi / jitsi-meet-sdk-samples

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

Android Jitsi SDK: throws exception "Failed to load config" #145

Closed vskrish11 closed 2 years ago

vskrish11 commented 2 years ago

On Android API32, I am using Jitsi SDK 5.1.0. While connecting to meeting on Jitsi server (not our custom server), it throws following exception - Failed to load config from https://meet.jit.si/config.js?room= Error(TypeError){"message":"Network request failed","stack":"index.android.bundle:116:8201\nindex.android.bundle:603:498\nvalue@index.android.bundle:29:1293\nvalue@index.android.bundle:45:3557\nindex.android.bundle:45:674\nvalue@index.android.bundle:45:2504\nvalue@index.android.bundle:45:646\nvalue@[native code]"}

Code snippet in Android app

JitsiMeetConferenceOptions.Builder optionsBuilder = new JitsiMeetConferenceOptions.Builder() .setRoom(confCode) .setVideoMuted(true) .setAudioMuted(true) .setAudioOnly(false) .setFeatureFlag("welcomepage.enabled", false) .setUserInfo(userInfo); JitsiMeetActivity.launch(this, optionsBuilder);

saghul commented 2 years ago

Did you change the target API or are you running on an Android 13 device?

vskrish11 commented 2 years ago

Target API is set to 32. I am running on Android 13 Virtual device.

saghul commented 2 years ago

Is there a specific reason why you have updated the target API?

vskrish11 commented 2 years ago

I guess I did not get your question about Target API clearly. Are you referring to "TargetSDKVersion" in Build gradle ? This is what I have set for the app. I have not changed any target API for the SDK.

minSdkVersion 23 targetSdkVersion 32

saghul commented 2 years ago

Got it. Now, do you observe a difference if you change that to 31?

vskrish11 commented 2 years ago

I can try that. You mean just change targetSDKVersion of app while using Jitsi SDK 5.1.0, correct ?

saghul commented 2 years ago

I'm not sure that's the culprit, but I know we haven't tested with that target since it's still a beta version. I run a Pixel 6 on Android 13 and the app works ok, even though it's built with target API of 31.

vskrish11 commented 2 years ago

As per Android documentation, API 33 (Android 13) is in Beta stage. API 31 and 32 are apparently stable. I will anyway try with API31 and update you. https://developer.android.com/studio/releases/platforms

vskrish11 commented 2 years ago

I tried now with targetSDKVersion as 31 on the same virtual device but got the same error. Jitsi SDK was 5.1.0

saghul commented 2 years ago

I cannot reproduce this on a physical device.

vskrish11 commented 2 years ago

Ok, I too will try on a physical device and update

vskrish11 commented 2 years ago

I tested on a physical device having Android 12 OS. Tested with targetSDKVersion as AP31 and later as 32 and it worked fine in both cases. So I guess the issue is with virtual device ?

vskrish11 commented 2 years ago

Shall I close the issue or is there anything on the virtual device that you want me to check ?

saghul commented 2 years ago

I'd say close it since there is nothing actionable on our end AFAICT.

vskrish11 commented 2 years ago

Sure, will close it. It might be useful to other developers if you could add a note to the SDK 5.1.0 release notes that it might not work on a virtual device and to test it on a physical device.

vskrish11 commented 2 years ago

This issue seems to be occurring only on a virtual device. When I tested it on a physical device with Android 12 version, it worked fine.

vskrish11 commented 2 years ago

Thanks to @saghul for quick response and leading the trouble-shooting in right direction

mrworf commented 1 year ago

This happens on latest version from play store when I try to connect to my own server. Both server and android uses latest as of today (Jan 21, 2023).

Looking in the log from ADB, I see the same issue: 2023-01-21 15:14:36.116 16166-16236/? E/JitsiMeetSDK: [features/base/lib-jitsi-meet] Failed to load config from https://jitsi-meet.sensenet.nu/config.js?room=test Error(Error){"message":"TypeError: cannot write property 'sourceNameSignaling' of undefined","code":"EUNSPECIFIED","stack":"index.android.bundle:37:1105\nindex.android.bundle:1593:322\np@index.android.bundle:1593:2026\nindex.android.bundle:1593:1775\np@index.android.bundle:1593:2026\ni@index.android.bundle:1593:2441\nindex.android.bundle:1593:2584\nu@index.android.bundle:85:157\nindex.android.bundle:85:866\nindex.android.bundle:92:1662\nk@index.android.bundle:92:498\nw@index.android.bundle:92:888\ncallReactNativeMicrotasks@index.android.bundle:92:3055\nvalue@index.android.bundle:45:2868\nindex.android.bundle:45:960\nvalue@index.android.bundle:45:2504\nvalue@index.android.bundle:45:919\nvalue@[native code]\nvalue@[native code]"}

I'm using a Samsung Fold 3 running Android 13.

mrworf commented 1 year ago

Nevermind, solved with this https://github.com/jitsi/jitsi-meet/issues/10396