SocialSharing-PhoneGap-Plugin: Problem : the plugin doesn't install because of es6-promise-plugin

My version of the cordova-plugin-x-socialsharing is 5.2.1 .

It used to work before but now I have a problem with the dependency of the plugin over es6-promise-plugin.

Installing "cordova-plugin-x-socialsharing" for android
Failed to install 'cordova-plugin-x-socialsharing': Error: Expected plugin to have ID "es6-promise-plugin" but got "cordova-plugin-x-socialsharing".
    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 _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)
Failed to restore plugin "cordova-plugin-x-socialsharing" from config.xml. You might need to try adding it again. Error: Error: Expected plugin to have ID "es6-promise-plugin" but got "cordova-plugin-x-socialsharing".
Discovered plugin "cordova.plugins.diagnostic" in config.xml. Adding it to the project

Is it a bug? Have you any idea why the installation is confused ?

NB : for debug purpose, the list of plugins I used is :

    "com.bez4pieci.cookies": "~0.0.1",
    "cordova-android": "^6.4.0",
    "cordova-android-support-gradle-release": "^1.2.0",
    "cordova-browser": "^4.1.0",
    "cordova-ios": "^4.5.4",
    "cordova-open-native-settings": "^1.5.0",
    "cordova-plugin-app-version": "^0.1.9",
    "cordova-plugin-clipboard2": "^0.1.0",
    "cordova-plugin-compat": "^1.2.0",
    "cordova-plugin-device": "^2.0.1",
    "cordova-plugin-dialogs": "^2.0.1",
    "cordova-plugin-file": "^6.0.1",
    "cordova-plugin-file-opener2": "^2.0.19",
    "cordova-plugin-file-transfer": "^1.7.1",
    "cordova-plugin-inappbrowser": "^2.0.2",
    "cordova-plugin-network-information": "^2.0.1",
    "cordova-plugin-statusbar": "^2.4.1",
    "cordova-plugin-whitelist": "^1.3.3",
    "cordova-plugin-x-socialsharing": "^5.2.1",
    "cordova.plugins.diagnostic": "^3.9.2",
    "es6-promise-plugin": "^4.1.0",
    "phonegap-plugin-barcodescanner": "^7.0.2"

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 1
  • Comments: 15 (1 by maintainers)

Most upvoted comments

Use Below command for same

cordova plugin add cordova-plugin-x-socialsharing@5.1.8

100% working

I managed to work around the issue by adding this to config.xml before the socialsharing plugin:

<plugin name="es6-promise-plugin" version="4.1.0" />

Hi, @pom421 still have issue that plugin is not installed and platform is not added beacuse of ths plugin. cordova plugins:

cordova-plugin-android-permissions 0.10.0 “Permissions” cordova-plugin-camera 2.4.1 “Camera” cordova-plugin-compat 1.2.0 “Compat” cordova-plugin-console 1.1.0 “Console” cordova-plugin-device 1.1.7 “Device” cordova-plugin-file 5.0.0 “File” cordova-plugin-file-transfer 1.7.0 “File Transfer” cordova-plugin-inappbrowser 2.0.2 “InAppBrowser” cordova-plugin-splashscreen 4.1.0 “Splashscreen” cordova-plugin-statusbar 2.4.1 “StatusBar” cordova-plugin-whitelist 1.3.3 “Whitelist” cordova-plugin-x-socialsharing 5.3.0 “SocialSharing” es6-promise-plugin 4.1.0 “Promise” ionic-plugin-keyboard 2.2.1 “Keyboard”

cordova version --> 8.0.0

ionic info:

cli packages: (/usr/lib/node_modules)

@ionic/cli-utils  : 1.19.2
ionic (Ionic CLI) : 3.20.0

global packages:

cordova (Cordova CLI) : 8.0.0 
Gulp CLI              : CLI version 3.9.1 Local version 3.9.1

local packages:

Cordova Platforms : android 6.3.0
Ionic Framework   : ionic1 1.3.1

System:

Node : v7.10.1
npm  : 5.8.0 
OS   : Linux 4.4

Environment Variables:

ANDROID_HOME : not set

Misc:

backend : pro

This works for me: npm i es6-promise-plugin

I had this problem? installed it manually - it simple and everything works