Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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' ]
like image 595
OlivierM Avatar asked Jul 30 '13 16:07

OlivierM


4 Answers

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
like image 158
Fernando Avatar answered Nov 04 '22 10:11

Fernando


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.

like image 28
Sawny Avatar answered Nov 04 '22 10:11

Sawny


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.

like image 1
naturallyfoster Avatar answered Nov 04 '22 11:11

naturallyfoster


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

like image 1
Samyak Upadhyay Avatar answered Nov 04 '22 09:11

Samyak Upadhyay