Cordova-plugin-qrscanner error "plugin_not_installed"


#1

I have installed cordova-plugin-qrscanner, i have fallowed all steps in https://ionicframework.com/docs/native/qr-scanner/. When i am running the plugin, i got this error in ionic view app “plugin_not_installed”. Someone could help please

stoufa@stoufa-X751LDB ~/ionic/ionic3-start-theme-master $ ionic info

cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils  : 1.19.2
    ionic (Ionic CLI) : 3.20.0

global packages:

    cordova (Cordova CLI) : 7.1.0 

local packages:

    @ionic/app-scripts : 3.1.8
    Cordova Platforms  : ios 4.4.0
    Ionic Framework    : ionic-angular 3.9.2

System:

    Android SDK Tools : 26.1.1
    Node              : v8.6.0
    npm               : 4.6.1 
    OS                : Linux 4.8

Environment Variables:

    ANDROID_HOME : /home/stoufa/Android/Sdk

Misc:

    backend : pro

s

app.module.ts


import {ErrorHandler, NgModule, NO_ERRORS_SCHEMA, CUSTOM_ELEMENTS_SCHEMA} from "@angular/core";
import {IonicApp, IonicErrorHandler, IonicModule} from "ionic-angular";
import {BrowserModule} from '@angular/platform-browser';
import {HttpClientModule} from '@angular/common/http';

import {IonicStorageModule, Storage} from '@ionic/storage';

import {StatusBar} from '@ionic-native/status-bar';

import {SplashScreen} from '@ionic-native/splash-screen';
import {Keyboard} from '@ionic-native/keyboard';

import {ActivityService} from "../services/activity-service";
import {TripService} from "../services/trip-service";
import {WeatherProvider} from "../services/weather";

import {MyApp} from "./app.component";

import {SettingsPage} from "../pages/settings/settings";
import {CheckoutTripPage} from "../pages/checkout-trip/checkout-trip";
import {HomePage} from "../pages/home/home";
import {LoginPage} from "../pages/login/login";
import {NotificationsPage} from "../pages/notifications/notifications";

import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import {SearchCarPageModule} from "../pages/search-car/search-car.module";
import {ServicesPageModule} from "../pages/services/services.module";
//import {SearchMaterialPage} from "../pages/search-material/search-material";
import {SearchMaterialPageModule} from "../pages/search-material/search-material.module";



import { Api } from '../providers/api/api';
import { User } from '../providers/user/user';
import { Settings } from '../providers/settings/settings';
import { ServicesProvider } from '../providers/services/services';
import { MaterialsProvider } from '../providers/materials/materials';


import { Pro } from '@ionic/pro';
import {Injectable, Injector } from '@angular/core';
import { QRScanner } from '@ionic-native/qr-scanner';

Pro.init('APP_ID', {
  appVersion: '"0.0.3'
});

@Injectable()
export class MyErrorHandler implements ErrorHandler {
  ionicErrorHandler: IonicErrorHandler;

  constructor(injector: Injector) {
    try {
      this.ionicErrorHandler = injector.get(IonicErrorHandler);
    } catch(e) {
      // Unable to get the IonicErrorHandler provider, ensure
      // IonicErrorHandler has been added to the providers list below
    }
  }

  handleError(err: any): void {
    Pro.monitoring.handleNewError(err);
    // Remove this if you want to disable Ionic's auto exception handling
    // in development mode.
    this.ionicErrorHandler && this.ionicErrorHandler.handleError(err);
  }
}
//import { Injectable, Injector } from '@angular/core';

export function provideSettings(storage: Storage) {
  /**
   * The Settings provider takes a set of default settings for your app.
   *
   * You can add new settings options at any time. Once the settings are saved,
   * these values will not overwrite the saved values (this can be done manually if desired).
   */
  return new Settings(storage, {
    option1: true,
    option2: 'Ionitron J. Framework',
    option3: '3',
    option4: 'Hello'
  });
}

// import services
// end import services
// end import services

// import pages
// end import pages

@NgModule({
  declarations: [
    MyApp,
    SettingsPage,
    CheckoutTripPage,
    HomePage,
    LoginPage,
    NotificationsPage,
    //SearchCarPage,

  ],
  imports: [
    BrowserModule,
    //HttpClientModule,
    IonicModule.forRoot(MyApp, {
      scrollPadding: false,
      scrollAssist: true,
      autoFocusAssist: false
    }),
    
    IonicStorageModule.forRoot({
      name: '__ionic3_start_theme',
        driverOrder: ['indexeddb', 'sqlite', 'websql']
    }),
    BrowserAnimationsModule,
    ServicesPageModule,
   SearchMaterialPageModule,
   SearchCarPageModule,
   HttpClientModule
   
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    SettingsPage,
    CheckoutTripPage,
    HomePage,
    LoginPage,
    NotificationsPage,
    //SearchCarPage,
    //SearchMaterialPage
    
  ],
  providers: [
    
    StatusBar,
    SplashScreen,
    Keyboard,
    ActivityService,
    TripService,
    WeatherProvider,
    Api,
    User,
    { provide: Settings, useFactory: provideSettings, deps: [Storage] },
    IonicErrorHandler,
    QRScanner,
    { provide: ErrorHandler, useClass: MyErrorHandler },
    ServicesProvider,
    MaterialsProvider
  ],
  schemas: [ NO_ERRORS_SCHEMA, CUSTOM_ELEMENTS_SCHEMA ]
})

export class AppModule {
}

package.json

{
  "name": "ionic3-start-theme",
  "version": "0.0.3",
  "author": "João Firmino <firminoata@gmail.com>",
  "homepage": "https://market.ionicframework.com/themes/ionic3-start-theme",
  "scripts": {
    "clean": "ionic-app-scripts clean",
    "build": "ionic-app-scripts build",
    "lint": "ionic-app-scripts lint",
    "ionic:build": "ionic-app-scripts build",
    "ionic:serve": "ionic-app-scripts serve"
  },
  "dependencies": {
    "@angular/animations": "^5.0.3",
    "@angular/common": "5.0.3",
    "@angular/compiler": "5.0.3",
    "@angular/compiler-cli": "5.0.3",
    "@angular/core": "5.0.3",
    "@angular/forms": "5.0.3",
    "@angular/http": "5.0.3",
    "@angular/platform-browser": "5.0.3",
    "@angular/platform-browser-dynamic": "5.0.3",
    "@ionic-native/core": "4.4.0",
    "@ionic-native/device": "^4.2.1",
    "@ionic-native/http": "^4.5.3",
    "@ionic-native/keyboard": "^4.1.0",
    "@ionic-native/qr-scanner": "^4.6.0",
    "@ionic-native/splash-screen": "4.4.0",
    "@ionic-native/status-bar": "4.4.0",
    "@ionic/app-scripts": "^3.1.8",
    "@ionic/pro": "^1.0.20",
    "@ionic/storage": "2.1.3",
    "cordova-android": "^6.3.0",
    "cordova-browser": "~5.0.3",
    "cordova-ios": "^4.4.0",
    "cordova-plugin-advanced-http": "^1.11.0",
    "cordova-plugin-camera": "^4.0.2",
    "cordova-plugin-console": "^1.1.0",
    "cordova-plugin-device": "^1.1.7",
    "cordova-plugin-file": "^6.0.1",
    "cordova-plugin-ionic": "^3.1.3",
    "cordova-plugin-ionic-webview": "^1.1.16",
    "cordova-plugin-qrscanner": "^2.5.0",
    "cordova-plugin-splashscreen": "^5.0.2",
    "cordova-plugin-statusbar": "^2.4.1",
    "cordova-plugin-swift-support": "^3.1.1",
    "cordova-plugin-whitelist": "^1.3.3",
    "cordova-sqlite-storage": "^2.1.5",
    "enhanced-resolve": "^3.3.0",
    "ionic-angular": "3.9.2",
    "ionic-plugin-keyboard": "^2.2.1",
    "ionicons": "3.0.0",
    "rxjs": "5.5.2",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.18"
  },
  "devDependencies": {
    "@ionic/app-scripts": "3.1.8",
    "typescript": "2.4.2"
  },
  "description": "Ionic 3 Start Theme",
  "cordovaPlugins": [],
  "cordovaPlatforms": [],
  "cordova": {
    "plugins": {
      "cordova-plugin-console": {},
      "cordova-plugin-device": {},
      "cordova-plugin-statusbar": {},
      "cordova-plugin-whitelist": {},
      "ionic-plugin-keyboard": {},
      "cordova-plugin-splashscreen": {},
      "cordova-sqlite-storage": {},
      "cordova-plugin-advanced-http": {},
      "cordova-plugin-ionic": {
        "APP_ID": "7d8f4ec3",
        "CHANNEL_NAME": "Master",
        "UPDATE_METHOD": "auto",
        "WARN_DEBUG": "true",
        "UPDATE_API": "https://api.ionicjs.com",
        "MAX_STORE": "2"
      },
      "cordova-plugin-ionic-webview": {},
      "cordova-plugin-camera": {},
      "cordova-plugin-qrscanner": {}
    },
    "platforms": [
      "android",
      "browser",
      "ios"
    ]
  },
  "config": {
    "ionic_sass": "./sass.js"
  }
}