Cordova plugin fails with unhelpful error message

I’ve recently updated our project to 1.8-rc.15 (having to skip 1.7 due to build problems) and I’m trying to build our project for cordova (on Ubuntu) and its failing to install cordova-httpd - this was working fine at 1.6. Unfortunately the error message is less than helpful, what steps can be taken to debug this? Has anyone else experienced cordova plugin failures upon upgrades?

Node#moveTo was deprecated. Use Container#append.
WARNING: Attempting to install plugin cordova-plugin-statusbar@2.2.1, but it should have a minimum version of 2.3.0 to ensure compatibility with the current platform versions. Installing the minimum
         version for convenience, but you should adjust your dependencies.
WARNING: Attempting to install plugin cordova-plugin-splashscreen@4.0.1, but it should have a minimum version of 4.1.0 to ensure compatibility with the current platform versions. Installing the minimum
         version for convenience, but you should adjust your dependencies.
Subproject Path: CordovaLibns                /
Subproject Path: CordovaLib
Subproject Path: CordovaLibns                -
Subproject Path: CordovaLibns                [=====                      ] 18% 8.1s
Subproject Path: CordovaLibns                [=================          ] 63% 1.7s
%% Plugin doesn't support this project's cordova-android version. cordova-android: 6.4.0, failed version requirement: 
      <6.3.0
%% Skipping 'cordova-plugin-compat' for android                                    
Subproject Path: CordovaLibns                [========================   ] 90% 0.5s
/home/zacknewsham/.meteor/packages/meteor-tool/.1.8.0-rc.15.1xqa2ss.hojz++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-promise/promise_server.js:218
      throw error;
      ^

Error: Some Cordova plugins installation failed: (cordova-httpd).
    at CordovaProject.ensurePluginsWereInstalled (/tools/cordova/project.js:735:13)
    at CordovaProject.ensurePluginsWereInstalled (/tools/cordova/project.js:732:12)
    at buildmessage.enterJob (/tools/cordova/project.js:693:14)
    at /tools/utils/buildmessage.js:359:18
    at exports.EnvironmentVariable.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:352:34
    at exports.EnvironmentVariable.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:350:23
    at exports.EnvironmentVariable.withValue (/tools/utils/fiber-helpers.js:89:14)
    at Object.enterJob (/tools/utils/buildmessage.js:324:26)
    at CordovaProject.ensurePluginsAreSynchronized (/tools/cordova/project.js:551:18)
    at CordovaProject.prepareFromAppBundle (/tools/cordova/project.js:214:10)
    at buildmessage.enterJob (/tools/cli/commands.js:1105:24)
    at /tools/utils/buildmessage.js:359:18
    at exports.EnvironmentVariable.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:352:34
    at exports.EnvironmentVariable.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:350:23
    at exports.EnvironmentVariable.withValue (/tools/utils/fiber-helpers.js:89:14)
    at Object.enterJob (/tools/utils/buildmessage.js:324:26)
    at main.captureAndExit (/tools/cli/commands.js:1094:20)
    at /tools/utils/buildmessage.js:271:13
    at exports.EnvironmentVariable.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:264:29
    at exports.EnvironmentVariable.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:262:18
    at exports.EnvironmentVariable.withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:253:23
    at exports.EnvironmentVariable.withValue (/tools/utils/fiber-helpers.js:89:14)
    at Object.capture (/tools/utils/buildmessage.js:252:19)
    at Object.main.captureAndExit (/tools/cli/main.js:275:29)
    at buildCommand (/tools/cli/commands.js:1085:10)
    at Profile.run (/tools/cli/commands.js:909:25)
    at Function.run (/tools/tool-env/profile.js:490:12)
    at Promise.asyncApply (/tools/cli/commands.js:907:18)
    at /home/zacknewsham/.meteor/packages/meteor-tool/.1.8.0-rc.15.1xqa2ss.hojz++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-promise/fiber_pool.js:43:40
 => awaited here:
    at Promise.await (/home/zacknewsham/.meteor/packages/meteor-tool/.1.8.0-rc.15.1xqa2ss.hojz++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-promise/promise_server.js:60:12)
    at /tools/cli/main.js:1530:15

It says right there:

Plugin doesn’t support this project’s cordova-android version. cordova-android: 6.4.0, failed version requirement: <6.3.0

I am using both plugins but I am using the latest versions.

One probable solution is to update the version of the plugins that you are using. It is possible that the version of cordova libraries were upgraded in between your old version of Meteor to new version

First thing I checked :frowning: This is related to a different plugin Skipping 'cordova-plugin-compat' for android

Are you also using 1.8 RC? I think I’ve found the problem - the cordova-httpd plugin has it’s ID set to com.rjfun.cordova.httpd wheras all other cordova plugins have their ID set to cordova-plugin-blah - I suspect a change to the build process in meteor (possibly the listInstalledPluginVersions or ensurePluginsWereInstalled methods) has “broken” this - It’s possible when I installed the plugin I used the wrong name cordova-httpd instead of com.rjfun.cordova.httpd - odd that it would have worked until now though

Confirmed - changing the plugin id (and running a clean build) fixed the problem

Great you solved it. Sometimes posting and interacting here can help you figure it out. It was like thinking aloud.

Thanks so much @znewsham for this thread, I had the same problem and this resolved it. For anyone who has this problem in the future, search your .meteor/local/cordova-build for the plugin’s plugin.xml file. The id you want is an attribute of the <plugin> tag.