Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-7846

Fix plugin deletion when dependency plugin does not exist

    XMLWordPrintableJSON

Details

    Description

      Could be reproduced by the following two ways
      1. Add plugin w/ dependency w/o adding any platform

      cordova create removetest
      cd remotetest
      cordova plugin add com.msopentech.azure-mobile-services
      cordova remove com.msopentech.azure-mobile-services
      

      2. Removing dependency plugin manually

      cordova create removetest
      cd remotetest
      cordova platform add android
      cordova plugin add com.msopentech.azure-mobile-services
      // open plugins directory and manually remove org.apache.cordova.inappbrowser folder
      cordova remove com.msopentech.azure-mobile-services
      

      There is the following error in both cases

      Removing "com.msopentech.azure-mobile-services"
      Error: ENOENT, no such file or directory 'c:\temp\issues\pluginUninstall\plu
      gins\org.apache.cordova.inappbrowser\plugin.xml'
          at Object.fs.openSync (fs.js:432:18)
          at Object.fs.readFileSync (fs.js:289:15)
          at Object.module.exports.parseElementtreeSync (C:\Users\Sergei\AppData\R
      oaming\npm\node_modules\cordova\node_modules\cordova-lib\src\util\xml-helper
      s.js:121:27)
          at findDependencies (C:\Users\Sergei\AppData\Roaming\npm\node_modules\co
      rdova\node_modules\cordova-lib\src\plugman\uninstall.js:121:34)
          at C:\Users\Sergei\AppData\Roaming\npm\node_modules\cordova\node_modules
      \cordova-lib\src\plugman\uninstall.js:126:17
          at Array.forEach (native)
          at findDependencies (C:\Users\Sergei\AppData\Roaming\npm\node_modules\co
      rdova\node_modules\cordova-lib\src\plugman\uninstall.js:123:14)
          at Function.module.exports.uninstallPlugin (C:\Users\Sergei\AppData\Roam
      ing\npm\node_modules\cordova\node_modules\cordova-lib\src\plugman\uninstall.
      js:130:5)
          at C:\Users\Sergei\AppData\Roaming\npm\node_modules\cordova\node_modules
      \cordova-lib\src\cordova\plugin.js:209:54
          at _fulfilled (C:\Users\Sergei\AppData\Roaming\npm\node_modules\cordova\
      node_modules\q\q.js:798:54)
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            sgrebnov Sergey Grebnov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: