3

I'm trying to Speech Recognition plugin with ionic3 and I'm keep getting this error

Ionic Native: deviceready did not fire within 5000ms. This can happen when plugins are in an inconsistent state. Try removing plugins from plugins/ and reinstalling them.

I'm running this in my devise (iPhone iOS 10.1), with command ionic cordova run ios -l

I've gone through some SO questions / ionic forum questions and tried reinstalling all the plugins, reinstalling platform (ios) + plugins as they suggested but still no luck.

Following is my class

import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import { SpeechRecognition } from '@ionic-native/speech-recognition';

@Component({
  selector: 'page-home',
  templateUrl: 'home.html'
})
export class HomePage {

  speechList: Array<string> = [];


  constructor(private speach: SpeechRecognition, public navCtrl: NavController) {

  }

  async getPermission():Promise<void> {
    console.log('abc1');
    try{
      const permission = await this.speach.requestPermission();
      console.log(permission);
      return permission;
    } catch (e){
      console.log(e);
    }
  }

  listenForSpeech():void {
    this.speach.startListening().subscribe(data => this.speechList = data, 
      error => console.log(error)
    )
  }
}

and following is my ionic info

global packages:

    @ionic/cli-utils : 1.2.0
    Cordova CLI      : 7.0.0 
    Ionic CLI        : 3.2.0

local packages:

    @ionic/app-scripts              : 1.3.7
    @ionic/cli-plugin-cordova       : 1.2.1
    @ionic/cli-plugin-ionic-angular : 1.2.0
    Cordova Platforms               : ios 4.4.0
    Ionic Framework                 : ionic-angular 3.3.0

System:

    Node       : v7.10.0
    OS         : OS X El Capitan
    Xcode      : Xcode 7.3.1 Build version 7D1014 
    ios-deploy : 1.9.1 
    ios-sim    : 5.0.8
halfer
  • 19,824
  • 17
  • 99
  • 186
sameera207
  • 16,547
  • 19
  • 87
  • 152
  • I've been trying to track down the culprit. Someone started a thread in the ionic forum (https://forum.ionicframework.com/t/deviceready-did-not-fire-within-5000ms-this-can-happen-when-plugins-are-in-an-inconsistent-state-try-removing-plugins-from-plugins-and-reinstalling-them/90326). I'm posting there as well. Is your issue an error or just a warning like mine? I know that simply installing the camera plugin will cause a jump to 6sec which will trigger the warning. I have 5 other plugins and my `deviceready` fires after 7-9 sec. Then I still have to wait 3-5s more to show the first page – hanzo2001 Jun 22 '17 at 15:26
  • As per a number of edits I've made to your posts, if you can make them less chatty, that gives volunteer editors less work to do. "Thanks", "cheers", "appreciate it", etc are fluff that will usually be removed. [See more here](https://meta.stackoverflow.com/questions/260776/should-i-remove-fluff-when-editing-questions). You can add more conversation material in comments if you wish (even if succinctness is a virtue everywhere). – halfer Aug 29 '17 at 18:28

0 Answers0