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

getting error while connecting to the meeting url #201

Closed mubashiralisiddiqui closed 8 months ago

mubashiralisiddiqui commented 1 year ago

I am getting this error while I connect to the meeting url in both android and ios the error seems to be in react navigation when we connect to the meeting

I am using these versions "@amplitude/react-native": "2.7.0", "@giphy/react-native-sdk": "2.3.0", "@jitsi/react-native-sdk": "^0.4.1", react-native": "0.72.4 "@react-navigation/bottom-tabs": "^6.5.8", "@react-navigation/drawer": "^6.6.3", "@react-navigation/native": "^6.1.7", "@react-navigation/native-stack": "^6.9.13",

and here is my code

import React, {useCallback, useRef, useEffect} from 'react';

import {JitsiMeeting} from '@jitsi/react-native-sdk/index';

import {useNavigation} from '@react-navigation/native'; import {BackHandler} from 'react-native'; const Meeting = props => { const {route} = props; const jitsiMeetingRef = useRef(null); const navigation = useNavigation(); const backHandler = useRef(null);

useEffect(() => { if (Platform.OS === 'android') { backHandler.current = BackHandler.addEventListener( 'hardwareBackPress', () => { onClose(); return true; }, ); } const onClose = () => { navigation.goBack(); navigation.navigate('myBooking'); };

return () => {
  // Clean up the event listener
  if (Platform.OS === 'android') {
    backHandler.current.remove();
  }
};

}, []);

const room = route?.params?.user || 'room'; return (

<JitsiMeeting

  style={{flex: 1}}
  room={room}
  serverURL={route?.params?.jitsiUrl || 'https://meet.jit.si/'}
/>

); };

export default Meeting;

image
saghul commented 1 year ago

Can you reproduce it with the sample app?

mubashiralisiddiqui commented 8 months ago

@saghul here is the reproducable repo I just created a new project add jitsi and react-navigation as per docs but I got the same error when I tried to connect to meeting https://github.com/mubashiralisiddiqui/jitsi-sample

mubashiralisiddiqui commented 8 months ago

@saghul its been long since I am trying to resolve this issue can you please look into this issue

saghul commented 8 months ago

Closing in favor of https://github.com/jitsi/jitsi-meet-sdk-samples/issues/219