0

Okay, so I've set up cordova in my machine and everything works fine.

D:\PhoneGap\apps\hello>cordova -v
3.1.0-0.2.0

I'm able to create a new project using the create command. And I've got the structure that's needed (www folder et all). But when I run the following command :

cordova platform add android

I get the following error :

Downloading cordova library for android... [Error: Unable to fetch platform android: Error: UNABLE_TO_VERIFY_LEAF_SIGNATURE ]

Looks like a node.js error to me. Some extra stuff you'd want to know :

  1. I'm using Windows 7
  2. I've set up the Android SDK PATH, JAVA path, APACHE ANT's PATH in Environment variables in system settings.
  3. I'm under an authenticated proxy but I've set up proxy settings for nodeJS.
  4. My .cordova folder (found in Users/myusername/) has an empty folder called android in the path .cordova/lib/
  5. I'm using cordova 3.

Do any of you guys know what could be the issue?

krishwader
  • 11,341
  • 1
  • 34
  • 51

1 Answers1

1

For people who stumble upon this at a later point of time, this can be fixed by setting strict-ssl option of npm as false.

 npm config set strict-ssl false 

But please note that this would lead to a lack of security for your machine.

krishwader
  • 11,341
  • 1
  • 34
  • 51
  • I get a similar error "Downloading cordova library for www... [Error: UNABLE_TO_VERIFY_LEAF_SIGNATURE ]" but when creating the project. I already did set the strict-ssl as false. is there any workaround for error at project creation?? – Lohith Korupolu Mar 28 '14 at 10:58
  • If this didn't work @Lohith, try re-installing nodeJS – krishwader Mar 31 '14 at 05:47
  • 1
    Whoever downvoted this, can u pls tell me the reason? Or can u atleast tell the community about what's wrong with this? – krishwader Mar 06 '15 at 10:57