dpa99c / phonegap-launch-navigator

Phonegap/Cordova plugin which launches native route navigation apps for Android, iOS and Windows
369 stars 131 forks source link

Install Error: Expected plugin to have ID "cordova-plugin-actionsheet" but got "uk.co.workingedge.phonegap.plugin.launchnavigator". #184

Closed matejkramny closed 6 years ago

matejkramny commented 6 years ago

I'm submitting a ... (check one with "x"):

Bug report

Hi, during installation on the CI cordova produces the error (below). I've search the issues which had a somewhat similar output but is likely unrelated (?).

Can you help?

Current behavior:

Cordova is complaining about:

Failed to install 'uk.co.workingedge.phonegap.plugin.launchnavigator': Error: Expected plugin to have ID "cordova-plugin-actionsheet" but got "uk.co.workingedge.phonegap.plugin.launchnavigator".
    at checkID (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/fetch.js:215:15)
    at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/fetch.js:199:9
    at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:787:54)
    at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:816:30)
    at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:749:13)
    at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:557:44
    at flush (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:108:17)
    at process._tickCallback (internal/process/next_tick.js:112:11)
Failed to restore plugin "uk.co.workingedge.phonegap.plugin.launchnavigator" from config.xml. You might need to try adding it again. Error: Error: Expected plugin to have ID "cordova-plugin-actionsheet" but got "uk.co.workingedge.phonegap.plugin.launchnavigator".

Expected behavior:

I'm not sure what the actionsheet plugin is for (it's not in my plugin list).

Steps to reproduce:

cordova prepare

Environment information

dpa99c commented 6 years ago

This plugin is dependent on cordova-plugin-actionsheet which it uses to present an out-of-the-box UI for picking which installed navigation app to launch.

It seems the error in your log extract relates to a bug with Cordova's handling of plugin dependencies, not with this plugin itself.

It appears Cordova is getting its internal mapping of plugins wrong when it comes to dependent plugins and this is causing the error. From comments in the Cordova issue, it seems that this occurs when plugins are stored in the package.json but not config.xml so you should ensure you installed plugins are present in both files.

Closing as this as the bug lies within Cordova's plugin installation code so there's nothing that can be done from within this plugin to resolve it.

matejkramny commented 6 years ago

Hmm thanks

aliexalter commented 3 years ago

@dpa99c Cordova Plugin ActionSheet is giving error on Ionic Appflow build server for iOS. Ionic support team ask us to remove that plugin as it has not been updated for 4 years. But we are using launch navigator which depend on ActionSheet. What do you suggest what should we do. Can you implement action sheet code in this plugin.

[18:38:55]: ▸ ⚠️  /Users/ionic/builds/username/appname/platforms/ios/App Name/Plugins/cordova-plugin-actionsheet/ActionSheet.m:177:1: implementing deprecated method [-Wdeprecated-implementations]
...
[18:38:59]: ▸ ❌  ld: symbol(s) not found for architecture arm64
[18:38:59]: ▸ ❌  clang: error: linker command failed with exit code 1 (use -v to see invocation)