voice icon indicating copy to clipboard operation
voice copied to clipboard

Crashes after it prompts to allow Microphone access.

Open alvaro1728 opened this issue 7 years ago • 6 comments
trafficstars

I'm on an iPhone 7. It first prompts to allow Speech Recognition, which I accept. Then it prompts to allow Microphone access and while it's doing that, my app just goes away. Subsequent retries just have the app close unexpectedly. It's happening when I call Voice.start('en-US').

Please help!

Thanks, Alvaro

alvaro1728 avatar Feb 15 '18 02:02 alvaro1728

Same here

mromarreyes avatar Apr 30 '18 06:04 mromarreyes

See: https://github.com/wenkesj/react-native-voice/issues/50

mcglabs avatar Apr 30 '18 06:04 mcglabs

I found that it was because of react-navigation, which was triggering all of the the view actions twice, as well as Voice.start() I manage to fix this problem by adding a check in the beginning of setupAndStartRecognizing to see if the session already had begun.

- (void) setupAndStartRecognizing:(NSString*)localeStr {
    if(self.sessionId){
        return;
    }

folofse avatar Jun 07 '18 17:06 folofse

@folofse can you send a PR for this?

sibelius avatar Nov 02 '18 20:11 sibelius

I found that it was because of react-navigation, which was triggering all of the the view actions twice, as well as Voice.start() I manage to fix this problem by adding a check in the beginning of setupAndStartRecognizing to see if the session already had begun.

- (void) setupAndStartRecognizing:(NSString*)localeStr {
    if(self.sessionId){
        return;
    }

@folofse can tou send a PR for this?

lfoliveir4 avatar Dec 16 '19 12:12 lfoliveir4

Also having this issue. We're now using a separate permissions library to avoid the crash. Is there any timeline on fixing this?

ajstokar avatar Apr 25 '23 17:04 ajstokar