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.13k stars 6.72k forks source link

App crashes when usr tries to connect #15008

Closed HajerMehemdi closed 3 days ago

HajerMehemdi commented 2 months ago

What happened?

user tries to connect in some device the app crashes.

Platform

Browser / app / sdk version

SDK 8.6.1

Relevant log output

java.lang.RuntimeException: Unable to start activity ComponentInfo{lib.jitsi.ui.activity.MainJitsiActivity}: androidx.fragment.app.Fragment$InstantiationException: Unable to instantiate fragment e10.h: calling Fragment constructor caused an exception
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4164)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4322)
    at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:139)
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:96)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2685)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loopOnce(Looper.java:230)
    at android.os.Looper.loop(Looper.java:319)
    at android.app.ActivityThread.main(ActivityThread.java:8919)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:578)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
Caused by: androidx.fragment.app.Fragment$InstantiationException: Unable to instantiate fragment e10.h: calling Fragment constructor caused an exception
    at androidx.fragment.app.Fragment.instantiate(SourceFile:9)
    at androidx.fragment.app.q0.a(SourceFile:8)
    at androidx.fragment.app.f1.<init>(SourceFile:12)
    at androidx.fragment.app.x0.U(SourceFile:94)
    at androidx.fragment.app.y.a(SourceFile:39)
    at androidx.activity.i.onCreate(SourceFile:28)
    at androidx.fragment.app.a0.onCreate(SourceFile:1)
    at org.jitsi.meet.sdk.JitsiMeetActivity.onCreate(SourceFile:1)
    at android.app.Activity.performCreate(Activity.java:8975)
    at android.app.Activity.performCreate(Activity.java:8944)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1456)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4146)
    ... 12 more
Caused by: java.lang.reflect.InvocationTargetException
    at java.lang.reflect.Constructor.newInstance0(Native Method)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
    at androidx.fragment.app.Fragment.instantiate(SourceFile:4)
    ... 23 more
Caused by: java.lang.IllegalStateException: Screen fragments should never be restored. Follow instructions from https://github.com/software-mansion/react-native-screens/issues/17#issuecomment-424704067 to properly configure your main activity.
    at e10.h.<init>(SourceFile:6)
    ... 26 more
androidx.fragment.app.Fragment$InstantiationException: Unable to instantiate fragment e10.h: calling Fragment constructor caused an exception
    at androidx.fragment.app.Fragment.instantiate(SourceFile:9)
    at androidx.fragment.app.q0.a(SourceFile:8)
    at androidx.fragment.app.f1.<init>(SourceFile:12)
    at androidx.fragment.app.x0.U(SourceFile:94)
    at androidx.fragment.app.y.a(SourceFile:39)
    at androidx.activity.i.onCreate(SourceFile:28)
    at androidx.fragment.app.a0.onCreate(SourceFile:1)
    at org.jitsi.meet.sdk.JitsiMeetActivity.onCreate(SourceFile:1)
    at android.app.Activity.performCreate(Activity.java:8975)
    at android.app.Activity.performCreate(Activity.java:8944)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1456)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4146)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4322)
    at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:139)
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:96)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2685)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loopOnce(Looper.java:230)
    at android.os.Looper.loop(Looper.java:319)
    at android.app.ActivityThread.main(ActivityThread.java:8919)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:578)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
Caused by: java.lang.reflect.InvocationTargetException
    at java.lang.reflect.Constructor.newInstance0(Native Method)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
    at androidx.fragment.app.Fragment.instantiate(SourceFile:4)
    ... 23 more

Reproducibility

More details?

there the is our MainJitsiActivity

` public class MainJitsiActivity extends JitsiMeetActivity {

@Override
public void onDestroy() {
    super.onDestroy();

    JitsiMeetManager.getInstance().handleVideoConferenceActivityDestroyed();
    ActivityManager manager =
            (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);
    for (ActivityManager.AppTask task : manager.getAppTasks()) {
        ActivityManager.RecentTaskInfo recentTaskInfo = task.getTaskInfo();
        if (recentTaskInfo != null){
            // if task is matching your task/activity
            String action = recentTaskInfo.baseIntent.getAction();
            if (JitsiMeetManager.CONFERENCE_ACTION.equals(action)){
                task.setExcludeFromRecents(true);
                task.finishAndRemoveTask();
            }
        }
    }
}

}

`

saghul commented 2 months ago

Are you using JitsiMeetActivity in a fragment? That activity inherits from AppCompatActivity, it cannot be used as such AFAIK.

HajerMehemdi commented 2 months ago

Hi no

As MainJitsiActivity extends JitsiMeetActivity we launch the activity:

Intent intent = new Intent(context, MainJitsiActivity.class); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.setAction(CONFERENCE_ACTION); intent.putExtra(CONFERENCE_OPTIONS_EXTRA, options); context.startActivity(intent); }

saghul commented 2 months ago

SDK 8.6.1

Can you reproduce this with the latest SDK?

HajerMehemdi commented 2 months ago

no supported yet the latest version

saghul commented 2 months ago

Not supported what?

HajerMehemdi commented 2 months ago

the latest SDK of Jitsi meet not supported yet in our APP

saghul commented 2 months ago

We don't do releases of older SDK versions, if you can reproduce it with the latest version we can have a look.

github-actions[bot] commented 2 weeks ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.