question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't install plugin: Cannot read property '0' of undefined

See original GitHub issue

Since 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:open
  • Created 4 years ago
  • Reactions:6
  • Comments:16 (2 by maintainers)

github_iconTop GitHub Comments

12reactions
psnfrenchcommented, Sep 20, 2019

This seems to be an issue with cordova-android 8.1.0. It doesn’t seem to add the same records to AndroidManifest.xml that is used to and hence the branch-cordova-sdk cannot get the uses-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

6reactions
undersiegcommented, Oct 1, 2019

uses-sdk should no longer be declared in the manifest, please check https://github.com/apache/cordova-android/issues/629

Read more comments on GitHub >

github_iconTop Results From Across the Web

NPM Cannot read property '0' of undefined - Stack Overflow
Show activity on this post. Solution: I downgraded npm to version 5.2. 0 and try to install again then it can solve the...
Read more >
Help With "Cannot Read Property '0' Undefined"
It basically means that the engine tried to access a data object that does not exist. in general, possible reasons for this are:...
Read more >
cannot read property 'insert' of undefined npm install - You.com
Trying to install express or any other package with npm brings forth this error "npm ERR! Cannot read property 'insert' of undefined". Ubuntu...
Read more >
ERROR Plugin error! TypeError: Cannot read property 'details ...
TypeError : Cannot read property 'details' of undefined. I am getting the same error for all the plugins and now sure on how...
Read more >
Uncaught TypeError: Cannot read property 'player' of undefined
[This thread is closed.] Hello I just installed the plugin and activated it. Tried using short code but it is not displaying on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found