Reputation: 83
For the past week when I do cordova add plugin org.apache.cordova.console
or any variation of org.apache.cordova.abc
it's incredibly slow. What used to take less than a minute is now taking ten to fifteen minutes for each plugin.
Note this is only happenening for the org.apache.cordova.abc
plugins. I tried renaming them to cordova-plugin-abc
but that didn't improve performance.
I did try using the github mirror for these consoles and it worked just like it used to, i.e. downloading in less than minute. For example cordova add plugin https://github.com/apache/cordova-plugin-battery-status
.
Does anyone know why this is happening?
Upvotes: 0
Views: 714
Reputation: 36
I've discovered the problem is in plugin download counter. Everytime you add new plugin the Cordova tries to connect to server and update plugin download count. This feature was recently removed (see https://github.com/apache/cordova-lib/commit/9d75a4257c02bd033589362ba4c3d175b28fca45). The download url is not working and Cordova request timeouts.
You can solve it by commenting bumpCounter() call in cordova-lib/src/plugman/registry/registry.js. After that the plugin will be added in a matter of seconds.
Update to actual version of Cordova probably helps too (not tested).
Upvotes: 1