Can't install plugin: Cannot read property '0' of undefined
See original GitHub issueSince yesterday (September 18) the plugin install doesn’t work, without having changed anything. I have a build pipeline with Gitlab CI. It’s using a Docker image with all the dependencies preinstalled (npm, cordova, ionic…). A build that was working 2 days ago, is now failing.
I also have the same error on a blank ionic project (ionic start MyIonicProject tutorial --type=ionic-angular
)
My console output:
ionic cordova plugin add branch-cordova-sdk
cordova plugin add branch-cordova-sdk
You have been opted out of telemetry. To change this, run: cordova telemetry on.
Plugin "branch-cordova-sdk" already installed on android.
Adding branch-cordova-sdk to package.json
Cannot read property '0' of undefined
[ERROR] An error occurred while running subprocess cordova.
cordova plugin add branch-cordova-sdk exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
I’m using:
- node 8.15.0
- npm 6.7.0
- ionic 5.2.3
- cordova 8.1.2
I also tried with
- node 8.15.0
- npm 6.11.3
- ionic 5.3.0
- cordova 9.0.0
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:16 (2 by maintainers)
Top GitHub Comments
This seems to be an issue with
cordova-android 8.1.0
. It doesn’t seem to add the same records toAndroidManifest.xml
that is used to and hence the branch-cordova-sdk cannot get theuses-sdk
tag and determine the target sdk version.When I specify the android version explicitly to an earlier version the problem no longer occurs i.e:
ionic cordova platform add android@8.0.0
uses-sdk
should no longer be declared in the manifest, please check https://github.com/apache/cordova-android/issues/629