microsoft / vsts-cordova-tasks

Streamline CI setup for your Apache Cordova, PhoneGap, Ionic, or Cordova CLI compatible app using a set of useful pre-defined build steps for VS Team Services or TFS
http://go.microsoft.com/fwlink/?LinkID=691188
Other
25 stars 27 forks source link

Ionic commands fail, Cordova Build errors if no version is specified in task after 1.3.0 update #47

Closed dorgold closed 8 years ago

dorgold commented 8 years ago

My builds started failing since yesterday (4.5.2016), there seems to be a problem running ionic commands, it seems to be looking for vsts-task-lib, while under node_modules the agent only has vso-task-lib.

Error] 2016-04-06T13:09:36.043Z: module.js:341

##[Error] 2016-04-06T13:09:36.044Z:     throw err;

##[Error] 2016-04-06T13:09:36.044Z:     ^

##[Error] 2016-04-06T13:09:36.044Z: 

##[Error] 2016-04-06T13:09:36.044Z: Error: Cannot find module 'vsts-task-lib'

##[Error] 2016-04-06T13:09:36.044Z:     at Function.Module._resolveFilename (module.js:339:15)

##[Error] 2016-04-06T13:09:36.044Z:     at Function.Module._load (module.js:290:25)

##[Error] 2016-04-06T13:09:36.044Z:     at Module.require (module.js:367:17)

##[Error] 2016-04-06T13:09:36.044Z:     at require (internal/module.js:16:19)

##[Error] 2016-04-06T13:09:36.044Z:     at Object.<anonymous> (/Users/admin/vsoAgent/_work/tasks/IonicCommand/1.2.0/lib/vsts-task-lib-proxy.js:35:7)

##[Error] 2016-04-06T13:09:36.044Z:     at Module._compile (module.js:413:34)

##[Error] 2016-04-06T13:09:36.044Z:     at Object.Module._extensions..js (module.js:422:10)

##[Error] 2016-04-06T13:09:36.045Z:     at Module.load (module.js:357:32)

##[Error] 2016-04-06T13:09:36.045Z:     at Function.Module._load (module.js:314:12)

##[Error] 2016-04-06T13:09:36.045Z:     at Module.require (module.js:367:17)

##[Error] 2016-04-06T13:09:36.045Z: 

##[Error] 2016-04-06T13:09:36.920Z: Return code: 1 

I am building on a Mac with vso-agent installed (Using visuastudio.com) This still happens after re-installing the agent on the OSX machine.

Chuxel commented 8 years ago

Thanks for reporting. Do other Cordova commands exhibit this same behavior? (Ex: Cordova Build, Cordova Command)

dorgold commented 8 years ago

For a cordova build task (That used to work) i get:


2016-04-06T14:24:42.564Z: DEVELOPER_DIR was undefined

2016-04-06T14:24:42.565Z: DEVELOPER_DIR for build set to null

2016-04-06T14:24:42.566Z: Input to determineIdentity: { ... }
Chuxel commented 8 years ago

We are seeing the same thing in our smoke test environment - tests that passed yesterday are now failing. We suspect a VSTS update overnight broke us and will investigated fixes ASAP.

ryuyu commented 8 years ago

I'm looking into this now

bryanmacfarlane commented 8 years ago

Tasks are supposed to carry vsts-task-lib

Chuxel commented 8 years ago

Yeah this is clearly a bad release we need to roll back. There is also a "TypeError: Invalid Version: null" error that appears in Cordova Build when no version is explicitly specified in the task that is new.

We just released 1.3.1 which is 1.2.2 with version numbers bumped to attempt to roll back but for some reason we haven't seen the update picked up by VSTS instances yet.

andremarques023 commented 8 years ago

Thanks! Waiting for updates on this.

Chuxel commented 8 years ago

At this point we have rolled back (v1.3.1 is published) but the extension updates and are not propagating - The VSTS team is investigating. We believe this may be why we didn't catch it initially as our automated tests were not going against the latest code as a result.

Peter also believes he has identified root cause for these errors but we'll spend time validating to try to ensure we do not end up in this situation again before re-releasing the updated code with the new fixed.

cepukas commented 8 years ago

+1

Chuxel commented 8 years ago

VSTS is still investigating the reasons for the rollback update not propegating - this is not affecting all users and is unrelated to the bugs here but are exacerbating impact. There is an upload script used to manually update TFS Update 1 instances that can also be used to upload to VSTS. We'll craft instructions for those blocked and share it momentarily.

ryuyu commented 8 years ago

While we work the with the VSTS team to get the update propagated, please use these steps to revert to the old version of the tasks.

  1. In your VSTS instance generate an access token for an collection admin user. Be sure to selet "All Scopes."
  2. Install Node.js on your local machine if you do not already have it installed
  3. Download the patch zip (https://drive.google.com/open?id=0B8cdY-CFf_6PbWtacGFqU01QV0E) and unzip it
  4. Open a fresh command prompt and navigate to the "vsts-cordova-tasks-1.2.2" inside the unzipped patch
  5. Install the tfx-cli and login. If you already have the tfx-cli installed, be sure it is 0.3.6 or higher.

          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          npm install -g tfx-cli
          tfx login
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  6. Enter your collection URL (Ex: https://mydomain.visualstudio.com/DefaultCollection) and access token from #1 above. Do not include a slash (/) at the end of the collection URL.
  7. Type the following:

          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          upload
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
          Or from a Mac:
    
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          sh upload.sh
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Chuxel commented 8 years ago

The VSTS team found the root cause and pushed a hot fix to the farm. At this point you can simply uninstall and re-install the Crdova VSTS extension and things should be back to normal.

We will also be publishing an update to re-trigger an auto-update - before too long you should no longer need to uninstall/reinstall either.

dorgold commented 8 years ago

Uninstalling and re-installing fixed the issue. Thanks for the quick fix!

cepukas commented 8 years ago

Uninstalling and re-installing the Cordova extension works for me! Thanks a lot!!!

Jonlondon commented 8 years ago

Works perfectly after uninstalling and re-installing. Thanks.

dtivel commented 8 years ago

Great. My apologies for the inconvenience.

Chuxel commented 8 years ago

Now that the patch is in place across the VSTS farm. We just pushed v1.3.2 out which should now automatically install in everyone's repo effectively resolving the issue. No further action should be needed and those that did an install/uninstall should also not notice a difference.