shankari opened a new issue #87: URL: https://github.com/apache/cordova-fetch/issues/87
# Bug Report ## Problem - in [email protected], installing plugins from git repos works - in [email protected], installing plugins from the same identical git repos fails ### What is expected to happen? ``` $ npx cordova plugin add https://github.com/phonegap/phonegap-plugin-contentsync.git ``` should succeed since "url to a git repository containing a plugin.xml" is a [valid plugin-spec](https://cordova.apache.org/docs/en/latest/reference/cordova-cli/index.html#plugin-spec). ### What does actually happen? - the plugin add succeeds on [email protected] - the plugin add fails on [email protected] ## Information ### on [email protected], plugins can be added using either the registry or a git URL ``` $ npx cordova --version 8.0.0 ``` ``` $ npx cordova plugin add https://github.com/phonegap/phonegap-plugin-contentsync.git Installing "phonegap-plugin-contentsync" for android Installing "phonegap-plugin-contentsync" for ios Adding phonegap-plugin-contentsync to package.json Saved plugin info for "phonegap-plugin-contentsync" to config.xml ``` ``` $ npx cordova plugin rm phonegap-plugin-contentsync Uninstalling phonegap-plugin-contentsync from android Uninstalling phonegap-plugin-contentsync from ios Removing "phonegap-plugin-contentsync" Removing plugin phonegap-plugin-contentsync from config.xml file... Removing phonegap-plugin-contentsync from package.json ``` ``` $ npx cordova plugin add phonegap-plugin-contentsync Installing "phonegap-plugin-contentsync" for android Installing "phonegap-plugin-contentsync" for ios Adding phonegap-plugin-contentsync to package.json Saved plugin info for "phonegap-plugin-contentsync" to config.xml ``` ``` $ npx cordova plugin rm phonegap-plugin-contentsync Uninstalling phonegap-plugin-contentsync from android Uninstalling phonegap-plugin-contentsync from ios Removing "phonegap-plugin-contentsync" Removing plugin phonegap-plugin-contentsync from config.xml file... Removing phonegap-plugin-contentsync from package.json ``` ### In the same directory, with [email protected], plugins can only be added using the registry, and only intermittently ``` $ npm install [email protected] + [email protected] added 161 packages from 112 contributors, removed 73 packages, updated 53 packages and audited 1707 packages in 19.859s ``` Note that, in the case of the registry add, the first run of the command fails, and the second run of the identical command succeeds ``` $ npx cordova plugin add phonegap-plugin-contentsync Failed to fetch plugin phonegap-plugin-contentsync via registry. Probably this is either a connection problem, or plugin spec is incorrect. Check your connection and plugin name/version/URL. Could not determine package name from output: [email protected] node_modules/phonegap-plugin-contentsync $ npx cordova plugin add phonegap-plugin-contentsync Installing "phonegap-plugin-contentsync" for android Installing "phonegap-plugin-contentsync" for ios Adding phonegap-plugin-contentsync to package.json ``` However, the git add always fails. ``` $ npx cordova plugin add https://github.com/phonegap/phonegap-plugin-contentsync.git Failed to fetch plugin https://github.com/phonegap/phonegap-plugin-contentsync.git via registry. Probably this is either a connection problem, or plugin spec is incorrect. Check your connection and plugin name/version/URL. Could not determine package name from output: [email protected] node_modules/phonegap-plugin-contentsync $ npx cordova plugin add https://github.com/phonegap/phonegap-plugin-contentsync.git Failed to fetch plugin https://github.com/phonegap/phonegap-plugin-contentsync.git via registry. Probably this is either a connection problem, or plugin spec is incorrect. Check your connection and plugin name/version/URL. Could not determine package name from output: [email protected] node_modules/phonegap-plugin-contentsync $ npx cordova plugin add https://github.com/phonegap/phonegap-plugin-contentsync.git Failed to fetch plugin https://github.com/phonegap/phonegap-plugin-contentsync.git via registry. Probably this is either a connection problem, or plugin spec is incorrect. Check your connection and plugin name/version/URL. Could not determine package name from output: [email protected] node_modules/phonegap-plugin-contentsync ``` ### Command or Code ``` $ cordova plugin add <git URL> ``` OR ``` $ cordova plugin add <local URL> ``` ### Environment, Platform, Device Mac OSX Catalina 10.15.5 ### Version information For cordova and ionic: ``` $ npx cordova --version 9.0.0 ([email protected]) $ npx ionic --version 6.10.1 ``` For other cordova dependencies, I have attached my package.json [package.json.gz](https://github.com/apache/cordova-lib/files/4916692/package.json.gz) For the rest of the environment: - OSX 10.15.5 - Android Studio 4.0 - Xcode 11.5 ``` export NVM_VERSION=0.35.3 export NODE_VERSION=14.5.0 export NPM_VERSION=6.14.5 ``` ## Checklist <!-- Please check the boxes by putting an x in the [ ] like so: [x] --> - [x] I searched for existing GitHub issues - [x] I updated all Cordova tooling to most recent version - [x] I included all the necessary information above ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
