twilio / twilio-voice-react-native

Other
62 stars 22 forks source link

Adding @react-native-firebase breaks incoming calls on Android #370

Open clundberg-nextiva opened 1 month ago

clundberg-nextiva commented 1 month ago

Issue

Pre-submission Checklist

Description

After adding @react-native-firebase/app and @react-native-firebase/messaging, it seems that the CallInvite event is never emitted.

Reproduction Steps

  1. Add @react-native-firebase/app and @react-native-firebase/messaging
  2. Receive an incoming call

Expected Behavior

When receiving an incoming call, the CallInvite callback should be invoked and a notification should be shown.

voice.on(Voice.Event.CallInvite, (callInvite: CallInvite) => {
  console.log('call invite', callInvite);
});

Actual Behavior

Nothing. The callback is never invoked and the incoming call notification never appears.

Reproduction Frequency

100%

Software and Device Information

Please complete the following information.

Additional Context

I can also confirm that firebase.messaging().getToken() and new Voice().getDeviceToken() are returning the same token, and if I add the firebase onMessage handler, I can also see that I'm receiving the Twilio message, but it doesn't seem to be processed by the SDK.

useEffect(() => {
  const unsubscribe = firebase.messaging().onMessage((message) => {
    console.log('remote message', message);
  });

  return unsubscribe;
}, []);
afalls-twilio commented 1 month ago

@clundberg01 After adding the firebase npm module to your project, what happens when you delete the app from the phone using the system menu and then reinstall. If both the sdk firebase's module and yours use the same token, they should both work in tandem.

clundberg-nextiva commented 1 month ago

@afalls-twilio The same issue continues to happen, even after wiping the emulator.

afalls-twilio commented 4 weeks ago

@clundberg01 what version of our sdk are you using?

shrutigarg-reactnative commented 3 weeks ago

Same issue in release mode , for debug it works fine SDK Version - 1.0.0

ilkinabdullayev commented 2 weeks ago

i had same issue,

but it helped https://github.com/twilio/twilio-voice-react-native/issues/146