OlivierM
OlivierM

Reputation: 771

Phonegap add plugin fails (errno 34) */plugin.xml

When I add a plugin to a 3.0.0 phonegap project with an android platform, I have an error eventhough a bunch of files for the plugin are added. In addition to that error when I add it, the Android manifest never gets updated with the right authorizations.

$ cordova plugin ls

No plugins added. 'Use cordova plugin add <plugin>'.

$ sudo cordova plugin add "http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture.git"

{ [Error: ENOENT, no such file or directory '/tmp/plugman-tmp1375200648427/*/plugin.xml']

  errno: 34,

  code: 'ENOENT',

  path: '/tmp/plugman-tmp1375200648427/*/plugin.xml',

  syscall: 'open' }

$ cordova plugin ls

[ 'org.apache.cordova.core.media-capture' ]

Upvotes: 5

Views: 6749

Answers (5)

Samyak Upadhyay
Samyak Upadhyay

Reputation: 593

I was also facing the same error :

Suppose if you want to add camera plugin then instead of giving:

cordova plugin add cordova-plugin-camera

use

phonegap plugin add cordova-plugin-camera

and then it will work fine

Upvotes: 1

OlivierM
OlivierM

Reputation: 771

It turns out i had something really strange with my proxy. Possibly some data compression on the fly which made the data corrupt. Tethering from the phone solved the issue, after completely uninstalling cordova.

Upvotes: 0

naturallyfoster
naturallyfoster

Reputation: 411

I received a similar error. I resolved the issue by removing the media-capture plugin, installing the file plugin, then reinstalling the media-capture plugin

cordova plugin rm  org.apache.cordova.media-capture
cordova plugin add org.apache.cordova.file
cordova plugin add org.apache.cordova.media-capture

Maybe media-capture is dependent on the file plugin.

Upvotes: 1

Fernando
Fernando

Reputation: 1273

I was having the same problem with the Connection plugin. Once I changed from "cordova plugin add" to "phonegap local plugin add", it worked fine.

$ phonegap local plugin add http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture.git

Upvotes: 4

Sawny
Sawny

Reputation: 1423

I had the same problem, after some debugging and testing I finally solved the problem:

  1. Open C:\Users\<user>\AppData\Roaming\npm\node_modules\cordova\node_modules\plugman\src\util\plugins.js.

  2. Find var cmd = util.format('git clone "%s" "%s"', plugin_git_url, path.basename(tmp_dir)); (line 42 ATM)

  3. Replace it with var cmd = util.format('git clone "%s" "%s"', plugin_git_url, tmp_dir);.

This will make git clone clone to the absolute tmp path instead of the relative.

Upvotes: 2

Related Questions