ember-cli-cordova icon indicating copy to clipboard operation
ember-cli-cordova copied to clipboard

Failed to install 'cordova-plugin-whitelist'

Open grimaldodev opened this issue 8 years ago • 7 comments

Hi, I'm very new using cordova and ember so I try to follow step by step the "Getting started" guide from you but at the step to generate the cordova-init everything crash. I research for the same scenarios in internet but all of them are related with ios, I want to use as android platform let me show my code:

ember generate cordova-init com.nobs.mobile --platform=android

and then:

installing cordova-init
? Overwrite config/environment.js? Yes, overwrite
? Overwrite .gitignore? Yes, overwrite
  overwrite config/environment.js
  overwrite .gitignore
Creating Cordova project...
Using detached cordova-create
Creating a new cordova project.
Creating Cordova project...
Adding android platform to cordova.
Adding android project...
Creating Cordova project for the Android platform:
	Path: platforms/android
	Package: com.nobs.mobile
	Name: Mobile
	Activity: MainActivity
	Android target: android-24
Subproject Path: CordovaLib
Android project created with [email protected]
Discovered plugin "cordova-plugin-whitelist" in config.xml. Adding it to the project
Fetching plugin "cordova-plugin-whitelist@1" via npm
Installing "cordova-plugin-whitelist" for android
Failed to install 'cordova-plugin-whitelist':Error
    at /Volumes/Develop/mobile/cordova/platforms/android/cordova/lib/check_reqs.js:222:19
    at _fulfilled (/Volumes/Develop/mobile/cordova/platforms/android/cordova/node_modules/q/q.js:834:54)
    at self.promiseDispatch.done (/Volumes/Develop/mobile/cordova/platforms/android/cordova/node_modules/q/q.js:863:30)
    at Promise.promise.promiseDispatch (/Volumes/Develop/mobile/cordova/platforms/android/cordova/node_modules/q/q.js:796:13)
    at /Volumes/Develop/mobile/cordova/platforms/android/cordova/node_modules/q/q.js:857:14
    at runSingle (/Volumes/Develop/mobile/cordova/platforms/android/cordova/node_modules/q/q.js:137:13)
    at flush (/Volumes/Develop/mobile/cordova/platforms/android/cordova/node_modules/q/q.js:125:13)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)
Failed to restore plugin "cordova-plugin-whitelist" from config.xml. You might need to try adding it again. Error: Failed to find 'ANDROID_HOME' environment variable. Try setting setting it manually.
Failed to find 'android' command in your 'PATH'. Try update your 'PATH' to include path to valid SDK directory.
Adding android platform to cordova...

Can you help me please?

grimaldodev avatar Dec 07 '16 16:12 grimaldodev

have you solved this @ivangrimaldo ?

samuel012 avatar Mar 09 '17 02:03 samuel012

Noup, I stopped the training, I'm learning Swft 3 instead :P

grimaldodev avatar May 25 '17 19:05 grimaldodev

Failed to find 'android' command in your 'PATH'.

The issue is that Android SDK's tools directory is not in the path. That is what it is complaining about.

BryanH avatar Jun 19 '17 21:06 BryanH

@BryanH Why do you believe that the first error is related to or caused by the second?

Failed to restore plugin "cordova-plugin-whitelist" from config.xml. You might need to try adding it again. Error: Failed to find 'ANDROID_HOME' environment variable. Try setting setting it manually.
Failed to find 'android' command in your 'PATH'. Try update your 'PATH' to include path to valid SDK directory.

I get the first error all by itself.

rtm avatar Jun 20 '18 05:06 rtm

This happens to me when I clone from the repo:

Discovered saved plugin "cordova-plugin-whitelist". Adding it to the project
Failed to restore plugin "cordova-plugin-whitelist" from config.xml. You might need to try 
adding it again. Error: Failed to fetch plugin cordova-plugin-whitelist@^1.3.4 via registry.

This fixed it:

$ cordova plugin add cordova-plugin-whitelist
$ cordova prepare

Note it doesn't work without running cordova prepare

BrennaEpp avatar Oct 28 '19 19:10 BrennaEpp

This happens to me when I clone from the repo:

Discovered saved plugin "cordova-plugin-whitelist". Adding it to the project
Failed to restore plugin "cordova-plugin-whitelist" from config.xml. You might need to try 
adding it again. Error: Failed to fetch plugin cordova-plugin-whitelist@^1.3.4 via registry.

This fixed it:

$ cordova plugin add cordova-plugin-whitelist
$ cordova prepare

Note it doesn't work without running cordova prepare

@BrennaEpp Thanks, In my case cordova prepare did the job.

zmilan avatar Mar 24 '20 11:03 zmilan

Reopening - problem still exists

BryanH avatar May 19 '20 18:05 BryanH