React-Native connection?

I'm struggling to get a react-native client to connect to my membrane server. I'm just running locally right now. I start my membrane server with EXTERNAL_IP={my ip} mix phx.server. I'm using the @jellyfish-dev/react-native-membrane-webrtc client in my react native code

Then I have the following connection code in my react-native view. I see the console log statements for init connect and attempting connect. But it never connects. I don't see a connection message in my phoenix server, nor the successful connection message.

I tried increasing the log verbosity, but didn't get anything out of the logs from react-native. Is there something obviously wrong with my connection string? Is it expecting something different for the server URL?

const startServerConnection = async () => {
    const deviceID = await getUniqueId();
    try {
      console.log('attempting connnect')
      //Should make this environment aware at some point
      connect('', "room:" + deviceID, {
        endpointMetadata: {
          displayName: deviceID,
        socketChannelParams: {
          childrenNames: params.childrenNames,
          talkAbout: params.talkAbout          
      }).then(() => {
        console.log('connected. starting mic')
        startMicrophone({ audioTrackMetadata: { active: true, type: 'audio' } });
      }).catch((e) => {
        console.log('connection error: ' + e);  
    } catch (e) {
      console.log('connection error: ' + e);

    let isMounted = true;
    const logLevel: LoggingSeverity = LoggingSeverity.Verbose
    const initConnection = async ()=>{
      try {
        console.log('init connnect')
        await startServerConnection();
        if (isMounted) {
      } catch (error) {
        console.log('init connection error: ' + error)
3 responses