Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install plugin anymore (Cordova 8) #81

Closed
adamiprinciples opened this issue Nov 12, 2018 · 5 comments
Closed

Can't install plugin anymore (Cordova 8) #81

adamiprinciples opened this issue Nov 12, 2018 · 5 comments

Comments

@adamiprinciples
Copy link

adamiprinciples commented Nov 12, 2018

Doesn't look like the plugin is installing correctly any more... Could be since the upgrade of our build machine to OSX Mojave or XCode 10. I get the following when trying to install:

$ cordova plugin add https://github.com/adjust/cordova_sdk.git\#cordova-8 --verbose
No scripts found for hook "before_plugin_add".
Calling plugman.fetch on plugin "https://github.com/adjust/cordova_sdk.git#cordova-8"
saving
Running command: npm install https://github.com/adjust/cordova_sdk.git#cordova-8 --production --save
Command finished with error code 0: npm install,https://github.com/adjust/cordova_sdk.git#cordova-8,--production,--save
Copying plugin "/Users/adamwalker/git/pureplanet/frontend/mobile/cordova/node_modules/com.adjust.sdk" => "/Users/adamwalker/git/pureplanet/frontend/mobile/cordova/plugins/com.adjust.sdk"
Calling plugman.install on plugin "/Users/adamwalker/git/pureplanet/frontend/mobile/cordova/plugins/com.adjust.sdk" for platform "android
Installing "com.adjust.sdk" for android
Running command: /Users/adamwalker/git/pureplanet/frontend/mobile/cordova/platforms/android/cordova/version
Command finished with error code 0: /Users/adamwalker/git/pureplanet/frontend/mobile/cordova/platforms/android/cordova/version
Finding scripts for "before_plugin_install" hook from plugin com.adjust.sdk on android platform only.
No scripts found for hook "before_plugin_install".
Install start for "com.adjust.sdk" on android.
PlatformApi successfully found for platform android
Android Studio project detected
Beginning processing of action stack for android project...
Error during processing of action! Attempting to revert...
Failed to install 'com.adjust.sdk': TypeError [ERR_INVALID_ARG_TYPE]: Uh oh!
The "path" argument must be of type string
    at assertPath (path.js:39:11)
    at Object.resolve (path.js:1091:7)
    at copyNewFile (/Users/adamwalker/git/pureplanet/frontend/mobile/cordova/platforms/android/cordova/lib/pluginHandlers.js:258:28)
    at install (/Users/adamwalker/git/pureplanet/frontend/mobile/cordova/platforms/android/cordova/lib/pluginHandlers.js:43:17)
    at ActionStack.process (/Users/adamwalker/git/pureplanet/frontend/mobile/cordova/platforms/android/cordova/node_modules/cordova-common/src/ActionStack.js:56:25)
    at PluginManager.doOperation (/Users/adamwalker/git/pureplanet/frontend/mobile/cordova/platforms/android/cordova/node_modules/cordova-common/src/PluginManager.js:114:20)
    at PluginManager.addPlugin (/Users/adamwalker/git/pureplanet/frontend/mobile/cordova/platforms/android/cordova/node_modules/cordova-common/src/PluginManager.js:144:17)
    at /Users/adamwalker/git/pureplanet/frontend/mobile/cordova/platforms/android/cordova/Api.js:247:74
    at _fulfilled (/Users/adamwalker/git/pureplanet/frontend/mobile/cordova/platforms/android/cordova/node_modules/q/q.js:834:54)
    at self.promiseDispatch.done (/Users/adamwalker/git/pureplanet/frontend/mobile/cordova/platforms/android/cordova/node_modules/q/q.js:863:30)
@adamiprinciples
Copy link
Author

This is with Android 7.1.2, Cordova 8.1.2, Mac OSX Mojave and XCode 10

@adamiprinciples adamiprinciples changed the title Can't install plugin any more (Cordova 8) Can't install plugin anymore (Cordova 8) Nov 12, 2018
@uerceg uerceg added the support label Nov 12, 2018
@uerceg
Copy link
Contributor

uerceg commented Nov 12, 2018

Hey @adamiprinciples

Thanks for the report, we'll take a look and keep you posted.

@adamiprinciples
Copy link
Author

Just ran the same build on Windows 10 and Ubuntu and everything worked so it's definitely specific to Mac OS

@uerceg
Copy link
Contributor

uerceg commented Nov 14, 2018

I did a bit of quick checks on this issue. With your described environment I was also able to reproduce the issue. I am not testing this with Windows or Linux, only on Mac OS X.

It is definitely related only to Android platform on Cordova and it is related to certain changes which Cordova introduced to android@7.1.2 platform release. If tested with any android@7.x.y version lower than 7.1.2, plugin from cordova-8 branch is successfully added to the app.

I guess temporary solution would be to downgrade to android@7.1.1 version of platform which should work, but for now still not sure what is causing this error, investigation is still ongoing. Will keep you posted.

@uerceg
Copy link
Contributor

uerceg commented Nov 14, 2018

And for the rest, discussion from cordova-android repo: apache/cordova-android#554

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants