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

Crashing `platform add` doesn't roll back properly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • cordova-cli
    • None

    Description

      When `cordova platform add ...` crashes, it doesn'toll back, so you have to run `cordova platform rm ...` manually if you want to try again:

      C:\Projects\Stromzaehler\stromzaehler (master -> origin)
      λ cordova platform add android@7.1.1
      Using cordova-fetch for cordova-android@7.1.1
      Adding android project...
      Creating Cordova project for the Android platform:
              Path: platforms\android
              Package: de.janpiotrowski.zaehlerstand
              Name: Z_hlerstand
              Activity: MainActivity
              Android target: android-27
      Android project created with cordova-android@7.1.1
      Android Studio project detected
      Android Studio project detected
      (node:12852) UnhandledPromiseRejectionWarning: CordovaError: Cannot find plugin.xml for plugin ".git". Please try adding it again.
          at new PluginInfo (C:\nvm\v8.11.3\node_modules\cordova\node_modules\cordova-common\src\PluginInfo\PluginInfo.js:367:15)
          at PluginInfoProvider.get (C:\nvm\v8.11.3\node_modules\cordova\node_modules\cordova-common\src\PluginInfo\PluginInfoProvider.js:35:32)
          at Function.runInstall (C:\nvm\v8.11.3\node_modules\cordova\node_modules\cordova-lib\src\plugman\install.js:271:41)
          at C:\nvm\v8.11.3\node_modules\cordova\node_modules\cordova-lib\src\plugman\install.js:79:35
          at _fulfilled (C:\nvm\v8.11.3\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:787:54)
          at self.promiseDispatch.done (C:\nvm\v8.11.3\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:816:30)
          at Promise.promise.promiseDispatch (C:\nvm\v8.11.3\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:749:13)
          at C:\nvm\v8.11.3\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:810:14
          at flush (C:\nvm\v8.11.3\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:108:17)
          at _combinedTickCallback (internal/process/next_tick.js:131:7)
      (node:12852) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
      (node:12852) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
      
      C:\Projects\Stromzaehler\stromzaehler (master -> origin)
      λ cordova platform add android@7.1.1
      Using cordova-fetch for cordova-android@7.1.1
      (node:6848) UnhandledPromiseRejectionWarning: CordovaError: Platform android already added.
          at C:\nvm\v8.11.3\node_modules\cordova\node_modules\cordova-lib\src\cordova\platform\addHelper.js:149:35
          at _fulfilled (C:\nvm\v8.11.3\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:787:54)
          at self.promiseDispatch.done (C:\nvm\v8.11.3\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:816:30)
          at Promise.promise.promiseDispatch (C:\nvm\v8.11.3\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:749:13)
          at C:\nvm\v8.11.3\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:557:44
          at flush (C:\nvm\v8.11.3\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)
      (node:6848) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
      (node:6848) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            Sujan12 Jan Piotrowski (janpio)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: