twilio / twilio-voice-react-native

Other
74 stars 29 forks source link

Voice.registration(token) throw a code error : "Voice error" #451

Open FrunzaAndrei opened 1 week ago

FrunzaAndrei commented 1 week ago

Description

The error appears at voice.registration function.

Reproduction Steps

Screenshot 2024-11-14 at 11 17 09

Screenshot 2024-11-14 at 11 17 50

Expected Behavior

Registration successful

Actual Behavior

Registration in progress

Reproduction Frequency

Every time when I call this voice.registration

Software and Device Information

Please complete the following information.

Additional Context

Add any other context about the problem here.

clinicsoftware commented 1 week ago

Any help would be greatly appreciated!

@mhuynh5757 @bobiechen-twilio @kpchoy @kbagchiGWC @twilio-vblocks-ci @afalls-twilio @manjeshbhargav @bld010 @mluotwilio @kevinlegoff-tdl

mhuynh5757 commented 1 week ago

@FrunzaAndrei in your code snippet, can you log how many times you invoke voice.register? The error is suggesting that you're invoking it repeatedly without waiting for the function to resolve. This is not supported.

FrunzaAndrei commented 1 week ago

@mhuynh5757 Thank you. I passed this problem but I faced another. Now I am registred but nothing's happen after I try to execut this code. Why ? Also voice is registered successfully global in that component.

This is the code:

Screenshot 2024-11-18 at 12 31 03

These are the logs: Screenshot 2024-11-15 at 14 02 30

mhuynh5757 commented 1 week ago

This is on iOS correct? Those logs appear to be from the chrome browser, so I'm just making sure. This library does not work for browsers, just iOS and Android. Are you using a real iOS device or a simulator? Our iOS SDK (and consequently the RN SDK) does not work on simulators due to limitations on CallKit imposed by Apple themselves, and there's unfortunately nothing we can do about it.

As an aside, you actually don't need to register to make outgoing calls, in case you were unfamiliar with Twilio Voice.

Hope that answers your questions.

FrunzaAndrei commented 5 days ago

@mhuynh5757 thank you for your response.

Yeah, I was using an ios but it was a simulator. And yeah I am unfamiliar with Twilio Voice. Thank you for your help.