-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incoming calls not working Voice React Native SDK #432
Comments
Hello @spaculusaninja thanks for reaching out. Are you using |
Hello @mhuynh5757, thank you for your response. Yes, I am using @react-native-firebase/messaging in my application alongside Twilio Voice React Native SDK. Could you please provide an estimated timeline on when this issue might be resolved? Any workarounds in the meantime would also be greatly appreciated. |
Hi @spaculusaninja we're close to merging a fix to |
"Hi @mhuynh5757, |
Could you share the parameter value that you're passing to |
Hi mhuynh5757, |
Hi @spaculusaninja, just to confirm, you're using the
in your application somewhere? It's best to have this invocation as early as possible in your application lifecycle, as noted in the docs. Could you add a console log to help us debug?
Or is the issue that this function is not firing at all? |
Hi @mhuynh5757, Yes, I am using the @react-native-firebase/messaging package, and I have included this in my application: import messaging from '@react-native-firebase/messaging'; messaging().onMessage(async (remoteData) => { However, the issue is that messaging().onMessage() is not firing at all. I’ve already placed this invocation early in the application lifecycle to ensure it initializes as soon as possible. I've also double-checked permissions and tried adding console logs to debug, but still no response from the onMessage function. Any additional suggestions on troubleshooting would be appreciated! Thanks in advance for the help! |
Hi @spaculusaninja I see. Unfortunately, this package is not within the scope of our project, it is a 3rd party package after all. I can try to assist you as much as possible, but I cannot help you with bugs in packages not our own. Can you try to uninstall your app and reinstall it on your device? When Firebase messaging services declare listeners, they use an FCM Device token internally. Reinstalling the app forces this token to refresh. It may help your situation. Also, we released |
Hi @mhuynh5757, Thank you for the update and the recommendation! I’ve successfully updated to version 1.2.1 of @twilio/voice-react-native-sdk, and I also reinstalled the app to refresh the FCM Device token. Notifications are now working fine, but I’m still experiencing issues with incoming calls – they don’t seem to come through even after the successful registration for incoming calls. I’ve double-checked the setup and ensured all listeners and permissions are configured as recommended. Is there any additional troubleshooting you’d suggest to resolve the incoming call issue, or any specific logs that might help identify the problem? Thanks again for your support! Note(mhuynh): I've redacted the access token for your privacy. |
Here is Notification payload receive from FCM :- |
Hello @spaculusaninja thanks for the additional info. It seems like you're receiving Firebase messages unrelated to Twilio, and it's causing parsing errors expectedly. Here's an example of a Firebase message that will be parsed correctly:
I recommend that you do some checks in your application code to ensure that the data that you pass to |
Hi @mhuynh5757, Thank you for the clarification and example message structure. Could you please confirm if there are any additional required fields or permissions on the Android sid |
That looks more than sufficient. If you need any examples for those files, you can check the Test App that we use to test the RN SDK which can be found under |
Hi @mhuynh5757, Thank you for the suggestion! I’ve set up the config as mentioned in the SDK documentation, and everything seems to be configured correctly. However, I’m still experiencing issues with calls not working as expected. Could you provide any guidance or troubleshooting steps that might help pinpoint the issue? Additionally, if there are any specific parts of the Test App or Reference App you recommend for checking configuration, I’d appreciate it. |
Issue
Pre-submission Checklist
or sensitive account information (API keys, credentials, etc.) when reporting this issue.
Description
After following the setup steps for Android and ios in the Twilio Voice React Native SDK documentation (version 1.2.0), I was able to successfully register for incoming calls, as indicated by the Successfully registered for incoming calls message in the voice.on(Voice.Event.Registered) event. However, incoming calls do not seem to work as expected afterward. No incoming call notifications or callbacks are triggered.
Reproduction Steps
voice.on(Voice.Event.Registered, () => {
console.log('Successfully registered for incoming calls');
});
5.No further events or notifications were triggered for incoming calls.
Expected Behavior
Incoming calls should trigger an appropriate event or notification, and the voice.on(Voice.Event.CallInvite) event should be fired when a call is received.
Actual Behavior
After the "Successfully registered for incoming calls" message, incoming calls are not detected by the app. No event is triggered, and the incoming call is not received.
Reproduction Frequency
The issue occurs 100% of the time.
Software and Device Information
Device: [e.g. Oppo F21 pro, iphone 14]
OS: [e.g. Android 14, ios 17]
React version: 18.2.0
React Native version: 0.74.3
Node version: 18.17.0
npm version: 9.6.7
Twilio Voice React Native SDK version: 1.2.0
The text was updated successfully, but these errors were encountered: