question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

error: plugin_not_installed on Ionic 3 Single Page app

See original GitHub issue

I know this issue has been reported before, but none of the solutions posted there have worked for me, so I am creating a new issue. I will include my ionic environment info, package.json, and config.xml at the bottom of this.

I have added this Cordova plugin, and when I try to call CameraPreview.startCamera(), I get the error “plugin_not_installed”, with a warning message “Install the CameraPreview plugin: ‘ionic cordova plugin add cordova-plugin-camera-preview’”. I have run that command and it appears to be successfully added, but when I run ionic serve -c, and try loading the app on my iPhone (iPhone X, iOS 11.3), I continue to to get the same issue.

Here is my Ionic Environment 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) : 8.0.0

local packages:

    @ionic/app-scripts : 3.1.8
    Cordova Platforms  : android 7.0.0 ios 4.5.4
    Ionic Framework    : ionic-angular 3.9.2

System:

    Node  : v9.11.1
    npm   : 5.6.0 
    OS    : macOS High Sierra
    Xcode : Xcode 9.3 Build version 9E145 

Here is the plugin in the config.xml

<plugin name="cordova-plugin-camera-preview" spec="git+https://github.com/cordova-plugin-camera-preview/cordova-plugin-camera-preview.git" />

Here is the package.json dependency

"cordova-plugin-camera-preview": "git+https://github.com/cordova-plugin-camera-preview/cordova-plugin-camera-preview.git",

Here is the home.ts where I am trying to initialize the CameraPreview

import { CameraPreview } from '@ionic-native/camera-preview';
import { Component } from '@angular/core';
import { NavController, Platform } from 'ionic-angular';

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

  constructor(private platform : Platform, public navCtrl: NavController, private cameraPreview: CameraPreview) {

    this.platform.ready().then(()=> {
      let options = {
        x: 0,
        y: 0,
        width: window.screen.width,
        height: window.screen.height,
        tapPhoto: true,
        previewDrag: true,
        toBack: true,
      }
      this.cameraPreview.startCamera(options).then(
        (res)=> {
          console.log(res)
        },
        (err) => {
          console.log(err)
        });
    })
  }

  ionViewDidLoad() {
    console.log('ionViewDidLoad CameraPage');
  }

}

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6

github_iconTop GitHub Comments

2reactions
kurodenjirocommented, Apr 14, 2018

i got same error , please help

0reactions
tylerpashigiancommented, May 4, 2018

@kurodenjiro I think your answer is similar to the solution I found. I had been trying to build on the Ionic DevApp. I used the “cordova platform add ios” to create the Xcode project, and when I ran the app through Xcode, it worked.

I am not 100% sure, but I read somewhere in my search for a solution that the Ionic DevApp builds and renders as a web view, and as seen on the plugin page, this plugin is only available for iOS and Android. So if you’re still facing this issue, I would recommend adding the platform of the device you’re using (iOS or Android), and opening it in Xcode/Android Studio and testing there. Hope this helps.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ionic native 3 media plugin error("plugin not installed")
I am calling all the Cordova plugins inside the platform ready method only. For me the issue is with related to media capture...
Read more >
Why am I getting the error plugin_not_installed with the Ionic ...
Solution So try to launch your application on a real device if it's bugs, tell you that all the plugins are not well...
Read more >
How to Build an Ionic 2 App with Native Plugin Integrations
How to integrate native features with Ionic 2 framework and create a cross-platform Ionic 2 app. Setup Ionic 2 app and take photos...
Read more >
Unable to build an ionic 3 app in … | Apple Developer Forums
Hi,. I'm unable to to build an ionic 3 app in xcode using phonegap-plugin-push - err: library not found for -lGoogleToolboxForMac.
Read more >
Why am I getting the error plugin_not_installed with the Ionic ...
Solution So try to launch your application on a real device if it's bugs, tell you that all the plugins are not well...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found