GithubHelp home page GithubHelp logo

microsoft / vsts-cordova-tasks Goto Github PK

View Code? Open in Web Editor NEW
25.0 45.0 27.0 2.53 MB

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

Home Page: http://go.microsoft.com/fwlink/?LinkID=691188

License: Other

PowerShell 14.45% JavaScript 70.64% Shell 8.81% Batchfile 6.10%

vsts-cordova-tasks's Introduction

As of March 2019, this repo is no longer maintained by Microsoft. If you're interested in continuing this project, please feel free to fork it. As of March 2019, we will no longer monitor or respond to open issues. Thanks for your support!


Visual Studio Team Services Extension for Cordova
Streamline CI setup for your Apache Cordova, PhoneGap, Ionic, or Cordova CLI compatible app using a set of useful pre-defined build steps.
Install now!
# Visual Studio Team Services Extension for Cordova Visual Studio Team Services (formerly Visual Studio Online) and Team Foundation Services (TFS) 2015 can be used for building and testing Cordova apps in a Continuous Integration (CI) environment thanks to a new [cross-platform agent](http://go.microsoft.com/fwlink/?LinkID=533789) that supports OSX. This new agent enables you to use Visual Studio Team Services (VSTS) or TFS to build projects targeting Android, iOS, or Windows created using [Tools for Apache Cordova](http://go.microsoft.com/fwlink/?LinkID=536496) or *any Cordova compliant CLI like the Ionic, PhoneGap, or TACO CLI.*

This extension contains a set of VS Team Services "tasks" (or "build steps") that streamline setup when building Cordova based applications in a CI environment. These tasks can be used with either VSTS or TFS 2015 on-prem servers (see below) and are intended to work with any Cordova based project including, but not limited to, those created using Tools for Apache Cordova. The tasks:

  • Are designed to work with Cordova and Cordova-like toolsets like Ionic
  • Automatically acquire and cache the appropriate version of Cordova or related CLI (ex: Ionic) based on task settings or the contents of taco.json
  • Enable simplified signing, certificate management, and packaging particularly for iOS
  • Include support for Tools for Apache Cordova specific features
  • Support the Android, iOS, Windows, and Windows Phone 8.0 (wp8) Cordova platforms

5 Step Quick Start

  1. After installing the extension, upload your project to VSTS, TFS, or GitHub.

  2. Go to your VSTS or TFS project, click on the Build tab, and create a new build definition (the "+" icon) and select the Empty template.

  3. Click Add build step... and select Cordova Build from the Build category

  4. Configure the build step - Check out the tool tips for handy inline documentation.

  5. Add a Demand under the General tab of xcode to force the build to run on OSX or cmd to force it to run on Windows as appropriate

Note: Be sure you are running version 0.3.10 or higher of the cross-platform agent and the latest Windows agent as these are required for VS Team Services extension to function. The VSTS hosted agent and MacinCloud agents will already be on this version.

Usage and Tutorials

See the following articles on using these tasks in VSTS/TFS:

  1. Cordova Build Task
  2. Cordova Command Task
  3. Ionic Command Task
  4. PhoneGap Command Task

##FAQ Q: Android for Cordova 6.0.0 is failing to build when specifying a keystore path. How can I resolve this issue?
A: This is a due to a Cordova bug that was resolved in Cordova 6.1.0. Use Cordova 5.4.1 or upgrade to 6.1.0+ to resolve.

Q: Android for Cordova 6.0.0 is failing to build on a Mac or Linux. How can I resolve this issue?
A: This is a due to a Cordova bug that was resolved in Cordova 6.1.0. Use Cordova 5.4.1 or upgrade to 6.1.0+ to resolve.

Q: I am seeing Windows 10 builds fail in the VSTS Hosted Pool with a "Could not load file or assembly" error when using Cordova 5.4.x. How do I resolve this problem?
A: This is a Cordova bug when 64-bit Node.js is used. Upgrade to 6.1.0+ to resolve. See the Cordova bug for details.

Q: Building for Cordova 5.1.1 is failing with an ENOENT error. How can i resolve this issue?
A: This is due to a Cordova bug very specific to 5.1.1 where it fails to create some needed folders on a first time run. You can work around this in one of a few ways.

  1. Run another build with another version of Cordova. This will create the folders that 5.1.1 needs.
  2. Create the needed folders manually. By default, the folders that need to be created are ~/.taco_home/node_modules/_cordova/lib/npm_cache for OSX/Linux and %APPDATA%/taco_home/node_modules/_cordova/lib/npm_cache for Windows. Note that if CORDOVA_CACHE environment variable is set, the folder to be created is $CORDOVA_CACHE/_cordova/lib/npm_cache.

Q: After Feb 14th, I am seeing the following error when referencing P12 file: "Command failed: /bin/sh -c /usr/bin/security find-identity -v -p codesigning ..."
A: This is due to the Apple's WWDR certificate expiring on this date and an old certificate still being present on the system. To resolve, follow the steps outlined by Apple here. In particular, be sure to see "Xcode unable to create distribution builds for App Store submissions or Enterprise apps" and be sure to remove any expired certificates as this can cause the error to occur even after you've installed updated certificates. This also affects development certs despite the title.

Q: I am using my own Mac for a cross-platform agent and have it configured to run as a daemon. Signing is failing. How can I resolve this problem?
A: Configure the agent as a launch agent (./svc.sh install agent) or run it as an interactive process (node agent/vsoagent.js) to ensure Xcode is able to access the appropriate keychains. See the secure app signing tutorial for additional details. You could also opt to use MacinCloud instead.

##Installation

Visual Studio Team Services / Visual Studio Online

  1. Install the Visual Studio Team Services Extension for Cordova

  2. You will now find a series of Cordova related tasks in the "Build" category

TFS 2015 Update 1 or Earlier

  1. Enable basic auth in your TFS instance

  2. 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 --auth-type basic 
    
  3. Enter your collection URL (Ex: https://localhost:8080/tfs/DefaultCollection) and user name and password. Do not include a slash (/) at the end of the collection URL.

  4. Download the latest release of the Cordova tasks locally and unzip

  5. Type the following from the root of the repo from Windows:

    upload
    

    Or from a Mac:

    sh upload.sh
    
  6. Profit!

Contact Us

Terms of Use

By downloading and running this project, you agree to the license terms of the third party application software, Microsoft products, and components to be installed.

The third party software and products are provided to you by third parties. You are responsible for reading and accepting the relevant license terms for all software that will be installed. Microsoft grants you no rights to third party software.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

License

The MIT License (MIT)

Copyright (c) Microsoft Corporation

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

vsts-cordova-tasks's People

Contributors

alsorokin avatar bretjohnson avatar chuxel avatar dlevine82 avatar dmitrii-snytkin avatar drewgillies avatar jicongw avatar jmatthiesen avatar msftgits avatar paymicro avatar ryuyu avatar salbahra avatar uruk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vsts-cordova-tasks's Issues

security: SecPolicySetValue: One or more parameters passed to a function were not valid.

Hi!

I'll try to summarize my problem the best as I can but since I am not familiar with macOS or Cordova at all, it might not be satisfactory.

So I am trying to build a Cordova app (to be specific, an Ionic app) with the Cordova Build Task. I am doing everything as it's described here, but my build fails.
The error message is:

=== BUILD TARGET todo OF PROJECT todo WITH CONFIGURATION Debug ===
Check dependencies
todo requires a provisioning profile. Select a provisioning profile for the "Debug" build configuration in the project editor.
Code signing is required for product type 'Application' in SDK 'iOS 10.2'
** ARCHIVE FAILED **
The following build commands failed:
Check dependencies
(1 failure)
Error code 65 for command: xcodebuild with args: -xcconfig,/Users/peterbozso/myagent/_work/2/s/todo/platforms/ios/cordova/build-debug.xcconfig,-workspace,todo.xcworkspace,-scheme,todo,-configuration,Debug,-destination,generic/platform=iOS,-archivePath,todo.xcarchive,archive,CONFIGURATION_BUILD_DIR=/Users/peterbozso/myagent/_work/2/s/todo/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/peterbozso/myagent/_work/2/s/todo/platforms/ios/build/sharedpch
Removing Xcconfig update hook
task result: Failed
Task failed

I am running the Mac agent on my own Mac Mini, running Sierra. Since I followed the instructions referenced above, it's pretty obvious that the problem is not with me not selecting a provisioning profile for the Debug configuration.
After a couple of hours of poking around with the system.debug flag swtiched on while building in VSTS, I stumbled upon this line in the logs:

determineProfile result {"uuid":"security: SecPolicySetValue: One or more parameters passed to a function were not valid.","foundUuid":"security: SecPolicySetValue: One or more parameters passed to a function were not valid."}

(I replaced my UUID with in the above text.)
And that's where my limited knowledge ends. After some Googling I found out that it's must be something with the security command here, that's the one that barfs up this part: "security: SecPolicySetValue: One or more parameters passed to a function were not valid." which in my opinion makes my build fail, since the PROVISIONING_PROFILE parameter is there for xcodebuild, it just contains this "security: SecPolicySetValue..." nonsense.
As I saw, multiple other projects ran into this problem as well, it's something about the security command changed in Sierra:
DanTheMan827/ios-app-signer#19
fastlane/fastlane#6233
openbakery/gradle-xcodePlugin#297
maciekish/iReSign#89

I'll try to look into it tomorrow and do something in order to fix this, but based on my limited knowledge, any kind of help would be very much appreciated!

Many thanks in advance,
Péter

Windows 10 fails to build in VSTS Hosted Pool with a "Could not load file or assembly" error in Cordova 5.4.x

This is due to a Cordova bug: https://issues.apache.org/jira/browse/CB-9565?jql=text%20~%20%22An%20attempt%20was%20made%20to%20load%20a%20program%20with%20an%20incorrect%20format.%22

This error is a result of using x64 Node and an incompatibility with x64 msbuild; the .NET Native compiler is x86 only (for where it can run). As a result, when msbuild-x64 tries to use it, it fails. This works around the issue by running x86 instead.

This was fixed in Cordova Windows 4.2.0.

Workaround:

  1. Upgrade to Cordova 6.0.0
  2. Add the following to config.xml and run a clean build:

<engine name="cordova-windows" spec="4.2.0" />

Cordova Command fail with 'Arguments to path.join must be strings'

When I run cordova rm android on my agent (on-premises) I get this error:

path.js:233
throw new TypeError('Arguments to path.join must be strings');
TypeError: Arguments to path.join must be strings
at Object.win32.join (path.js:233:13)
at Object.<anonymous> (C:\agent\tasks\CordovaCommand\1.3.9\lib\node-manager.js:20:114)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (C:\agent\tasks\CordovaCommand\1.3.9\lib\node-setup.js:10:19)
at Module._compile (module.js:460:26)

I noticed it was a problem getting the paths here, so I printed all the paths it is trying to access during the task, and noticed all of them are undefined:

NODE_VERSION_CACHE undefined
APPDATA undefined
HOME undefined

Could this be a bug in the task?

Versions used:
CordovaCommand: 1.3.9
Cordova: 5.4.0

Mac agent - issue with xcode-task-utils.js:45:31

Hi team,

I have installed vsts agent on macOs

$ sw_vers 
ProductName:	Mac OS X
ProductVersion:	10.12.6
BuildVersion:	16G29

$ node -v
v8.1.3

I am trying to build a Cordova application by defining the dev cert and the provision profile on the task level.

I got the following error:

2017-10-27T05:51:47.4357040Z TypeError: "file" argument must be a non-empty string
2017-10-27T05:51:47.4377320Z     at normalizeSpawnArguments (child_process.js:380:11)
2017-10-27T05:51:47.4396480Z     at spawnSync (child_process.js:507:38)
2017-10-27T05:51:47.4417520Z     at /Users/user/vstsagent/_work/_tasks/CordovaBuild_70e94267-15dc-434d-8973-023d766825d7/1.3.11/lib/xcode-task-utils.js:47:31
2017-10-27T05:51:47.4440720Z     at _fulfilled (/Users/user/vstsagent/_work/_tasks/CordovaBuild_70e94267-15dc-434d-8973-023d766825d7/1.3.11/node_modules/q/q.js:854:54)
2017-10-27T05:51:47.4464210Z     at self.promiseDispatch.done (/Users/user/vstsagent/_work/_tasks/CordovaBuild_70e94267-15dc-434d-8973-023d766825d7/1.3.11/node_modules/q/q.js:883:30)
2017-10-27T05:51:47.4487720Z     at Promise.promise.promiseDispatch (/Users/user/vstsagent/_work/_tasks/CordovaBuild_70e94267-15dc-434d-8973-023d766825d7/1.3.11/node_modules/q/q.js:816:13)
2017-10-27T05:51:47.4511190Z     at /Users/user/vstsagent/_work/_tasks/CordovaBuild_70e94267-15dc-434d-8973-023d766825d7/1.3.11/node_modules/q/q.js:877:14
2017-10-27T05:51:47.4532530Z     at runSingle (/Users/user/vstsagent/_work/_tasks/CordovaBuild_70e94267-15dc-434d-8973-023d766825d7/1.3.11/node_modules/q/q.js:137:13)
2017-10-27T05:51:47.4554160Z     at flush (/Users/user/vstsagent/_work/_tasks/CordovaBuild_70e94267-15dc-434d-8973-023d766825d7/1.3.11/node_modules/q/q.js:125:13)
2017-10-27T05:51:47.4572500Z     at _combinedTickCallback (internal/process/next_tick.js:95:7)

I added console log in xcode-task-utils.js to observe the createKeychain variable which should have been a string pointing to "/bin/bash" and I noticed that it is an object

2017-10-27T05:40:16.5173330Z { [String: '/bin/bash']
2017-10-27T05:40:16.5191890Z   stdout: '/bin/bash',
2017-10-27T05:40:16.5210530Z   stderr: null,
2017-10-27T05:40:16.5227300Z   code: 0,
2017-10-27T05:40:16.5244320Z   cat: [Function: bound ],
2017-10-27T05:40:16.5261770Z   exec: [Function: bound ],
2017-10-27T05:40:16.5279030Z   grep: [Function: bound ],
2017-10-27T05:40:16.5298050Z   head: [Function: bound ],
2017-10-27T05:40:16.5316760Z   sed: [Function: bound ],
2017-10-27T05:40:16.5333810Z   sort: [Function: bound ],
2017-10-27T05:40:16.5350420Z   tail: [Function: bound ],
2017-10-27T05:40:16.5367270Z   to: [Function: bound ],
2017-10-27T05:40:16.5383490Z   toEnd: [Function: bound ],
2017-10-27T05:40:16.5399830Z   uniq: [Function: bound ] }

In order to make it work I had to modify line 45 to:

            var spawnResult = spawn(createKeychain.stdout, createKeychainArgs, { stdio: "inherit" });

Have you seen this issue before? The version of shelljs is 0.7.7 in the node_modules folder.

_tasktmp.keychain not properly removed from keychain search path if task fails to find a valid identity

This was exposed by #34

In this case, a P12 file was valid, but the contents are expired. The code currently updates the keychain search path before looking inside the P12 to find a valid identity. Unfortunately the code is then failing to clean up the search path and delete the _temp keychain if no valid identity is found. This logic will need to be modified to handle invalid cert scenarios like this one.

You can tell this is happening by looking at the long list of keychains when this error occurs.

Ex:

46:33.340Z:     "/Users/vso112256/vso-agent/_work/2/s/tfs-vnext-test/_tasktmp.keychain"

56 
2016-02-16T19:46:33.340Z:     "/Users/vso112256/vso-agent/_work/2/s/tfs-vnext-test/_tasktmp.keychain"

57 
2016-02-16T19:46:33.340Z:     "/Users/vso112256/vso-agent/_work/9/s/tfs-vnext-test/_tasktmp.keychain"

58 
2016-02-16T19:46:33.340Z:     "/Users/vso112256/vso-agent/_work/9/s/tfs-vnext-test/_tasktmp.keychain"

59 
2016-02-16T19:46:33.340Z:     "/Users/vso112256/vso-agent/_work/9/s/tfs-vnext-test/_tasktmp.keychain"

60 
2016-02-16T19:46:33.340Z:     "/Users/vso112256/vso-agent/_work/9/s/tfs-vnext-test/_tasktmp.keychain"

61 
2016-02-16T19:46:33.341Z:     "/Users/vso112256/vso-agent/_work/9/s/tfs-vnext-test/_tasktmp.keychain"

62 
2016-02-16T19:46:33.341Z:     "/Users/vso112256/vso-agent/_work/9/s/tfs-vnext-test/_tasktmp.keychain"

63 
2016-02-16T19:46:33.341Z:     "/Users/vso112256/vso-agent/_work/9/s/tfs-vnext-test/_tasktmp.keychain"

64 
2016-02-16T19:46:33.341Z:     "/Users/vso112256/vso-agent/_work/9/s/tfs-vnext-test/_tasktmp.keychain"

65 
2016-02-16T19:46:33.341Z:     "/Users/vso112256/vso-agent/_work/8/s/tfs-vnext-test/_tasktmp.keychain"

66 
2016-02-16T19:46:33.341Z:     "/Users/vso112256/vso-agent/_work/6/s/_tasktmp.keychain"

67 
2016-02-16T19:46:33.341Z:     "/Users/vso112256/vso-agent/_work/9/s/tfs-vnext-test/_tasktmp.keychain"

68 
2016-02-16T19:46:33.341Z:     "/Users/vso112256/vso-agent/_work/9/s/tfs-vnext-test/_tasktmp.keychain"

69 
2016-02-16T19:46:33.341Z:     "/Users/vso112256/vso-agent/_work/9/s/tfs-vnext-test/_tasktmp.keychain"

70 
2016-02-16T19:46:33.342Z:     "/Users/vso112256/vso-agent/_work/9/s/tfs-vnext-test/_tasktmp.keychain"

71 
2016-02-16T19:46:33.342Z:     "/Users/vso112256/vso-agent/_work/9/s/tfs-vnext-test/_tasktmp.keychain"

72 
2016-02-16T19:46:33.342Z:     "/Users/vso112256/vso-agent/_work/8/s/tfs-vnext-test/_tasktmp.keychain"

73 
2016-02-16T19:46:33.342Z:     "/Users/vso112256/vso-agent/_work/6/s/_tasktmp.keychain"

74 
2016-02-16T19:46:33.342Z:     "/Users/vso112256/vso-agent/_work/8/s/tfs-vnext-test/_tasktmp.keychain"

75 
2016-02-16T19:46:33.342Z:     "/Users/vso112256/vso-agent/_work/9/s/tfs-vnext-test/_tasktmp.keychain"

76 
2016-02-16T19:46:33.342Z:     "/Users/vso112256/vso-agent/_work/2/s/tfs-vnext-test/_tasktmp.keychain"

77 
2016-02-16T19:46:33.342Z:     "/Users/vso112256/vso-agent/_work/3/s/_tasktmp.keychain"

78 
2016-02-16T19:46:33.342Z:     "/Users/vso112256/vso-agent/_work/3/s/_tasktmp.keychain"

79 
2016-02-16T19:46:33.342Z:     "/Users/vso112256/vso-agent/_work/build/73a624315c745cc6fa2abffd59813a3580d136a51860bb81ca943e36daf0d95b/repo/tfs-vnext-test/_tasktmp.keychain"

80 
2016-02-16T19:46:33.343Z:     "/Users/vso112256/vso-agent/_work/build/a29ba8b965d7cc0210d0c34e3bbd55a1b70754593d626db5cfe30793d43efa87/repo/tfs-vnext-test/_tasktmp.keychain"

81 
2016-02-16T19:46:33.343Z:     "/Users/vso112256/vso-agent/_work/build/a29ba8b965d7cc0210d0c34e3bbd55a1b70754593d626db5cfe30793d43efa87/repo/tfs-vnext-test/_tasktmp.keychain"

Cordova 6.0.0 Android build on Linux/OSX fails

For some reason, the build on Cordova 6.0.0 on linux and osx fails with the following message:
Task '"--no-daemon"' not found in root project 'android'.

This does not occur when building against windows.

Currently in discussion with Cordova team.

Custom Build Configurations

My cordova project has some custom iOS build configurations (for different environments) which each specify different bundle IDs, product names, etc. When I enter one of these custom build configurations in the Configuration property of the Cordova Build task it appears to be ignored and Debug is used instead.
image

I get an error which is expected because the wrong configuration was used... I include it here only because it shows that Debug was passed instead of PluginTest which is what I need in this scenario:

Error code 65 for command: xcodebuild with args: -xcconfig,/Users/vso113131/vsts-agent/_work/8/s/app/platforms/ios/cordova/build-debug.xcconfig,-workspace,MyApp.xcworkspace,-scheme,MyApp,-configuration,Debug,-destination,generic/platform=iOS,-archivePath,MyApp.xcarchive,archive,CONFIGURATION_BUILD_DIR=/Users/vso113131/vsts-agent/_work/8/s/app/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/vso113131/vsts-agent/_work/8/s/app/platforms/ios/build/sharedpch

Is there any way to force the use of a custom configuration that I've specified?

Cannot find module sax @ VSTS build agent

The build agent for my Visual Studio Team Services tenant seems to have a cache problem or something like that. I switched to version 6.2.1-dev locally after which I got a compile error. Cleaned out the cache as suggested in the error message solved this, but after pushing the code to my repo, the same error now pops up in the online build. As there is no "Clean cache" button there, I'm left wondering what I need to do to fix this?

Error is as follows:

[email protected] already installed.
Adding support plugin.
module.js:341
throw err;
^
Error: Cannot find module 'sax'
at Function.Module._resolveFilename (module.js:339:15)
at Function.Module._load (module.js:290:25)
at Module.require (module.js:367:17)
at require (internal/module.js:20:19)
at Object. (C:\cordova\node_modules_cordova\lib\npm_cache\cordova-android\5.2.0-nightly.2016.6.9.81d62196\package\node_modules\elementtree\lib\parsers\sax.js:3:11)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
{ [Error: cmd: Command failed with exit code 1] code: 1 }

No agent could be found for xcode, npm

The docs on building with Cordova show how to setup a demand for xcode when building for iOS - but when attempting to queue the build I get this error:

No agent could be found with the following capabilities: xcode, npm

I've tried this with both the Hosted and Hosted VS2017 agents, with the same result.

Ionic: spawn EACCES error when JavaScript file is present in the hooks folder without the execute bit set (iOS, OSX, Linux)

If you check in a "shell" based hook into source control like 010_add_platform_class.js found in hooks/after_prepare from Windows it typically won't have an execute bit set as required by Cordova.

The workaround is actually quite simple. Either add the exectue bit to this file in source control or add a Command Line task to execute the following:

chmod +x hooks/after_prepare/010_add_platform_class.js

...or something similar.

However, unfortunately Ionic's use of hook file makes this problem fairly common. We should trap spawn EACCES errors and output a message using this specific example as a common reason along with the workaround to use the VSTS Command Line task.

Not specifying a configuration results in a failed build with strange error

The code expects a configuration to be passed in and due to how we parse the configuration value results in a strange error.

untitled

This code is the issue.

configuration = tasklibrary.getInput('configuration', /* required */ true).toLowerCase();
buildArgs.push('--' + configuration);

A "--" by itself results in escaping of other args like "device" and this being passed directly to the platform which causes the above error.

If configuration is blank or invalid (not "debug" or "release") we should error stating it is a required value.

Building for Cordova 5.1.1 is failing with an ENOENT error

This likely is due to a Cordova bug very specific to 5.1.1 where it fails to create some needed folders on a first time run. You can work around this in one of a few ways.

Run another build with another version of Cordova. This will create the folders that 5.1.1 needs.
Create the needed folders manually. By default, the folders that need to be created are ~/.taco_home/node_modules/_cordova/lib/npm_cache for OSX/Linux and %APPDATA%/taco_home/node_modules/_cordova/lib/npm_cache for Windows. Note that if CORDOVA_CACHE environment variable is set, the folder to be created is $CORDOVA_CACHE/_cordova/lib/npm_cache.

Not able to build Cordova projects

Hi,
First I would like to thank you guys for the awesome plugin. Am trying to create set of VSTS tasks for a very simple cordova app.

I have build the app in the machine which is our build agent and its working fine without any problem. While am trying to run the task from VSTS online it is giving me the below error.

FAILURE: Build failed with an exception.
2017-08-21T10:26:24.3382014Z
2017-08-21T10:26:24.3382014Z * What went wrong:
2017-08-21T10:26:24.3382014Z Unable to start the daemon process.
2017-08-21T10:26:24.3382014Z This problem might be caused by incorrect configuration of the daemon.
2017-08-21T10:26:24.3382014Z For example, an unrecognized jvm option is used.

These are my node, npm and cordova versions present in the build agent machine.

npm -v --> 3.10.10
node -v --> 6.11.0
cordova -v --> 7.0.1

Can someone let me know what is that am doing wrong?

VSTS CI with IONIC 2 integration is failing - Both Add platform and Build Android tasks

Hi,

Am trying to build a simple IONIC 2 project which is checked into the VSTS GIT and am continuously facing issue while adding android platform on one build agent and build android on a different agent.

Issue faced while adding platform on build agent A:

2017-08-22T09:08:38.3214115Z [email protected] already installed.
2017-08-22T09:08:38.3214115Z Ionic Module Path: C:\Users\Innovation Panel\AppData\Roaming\taco_home\node_modules\ionic\3.9.2\node_modules\ionic
2017-08-22T09:08:38.7869986Z > cordova platform add android --save
2017-08-22T09:08:44.3677412Z × Running command - failed!
2017-08-22T09:08:44.3833950Z [ERROR] Exception: Using cordova-fetch for cordova-android@~6.2.2
2017-08-22T09:08:44.3833950Z
2017-08-22T09:08:44.3833950Z Error: Failed to fetch platform cordova-android@~6.2.2
2017-08-22T09:08:44.3833950Z Probably this is either a connection problem, or platform spec is incorrect.
2017-08-22T09:08:44.3833950Z Check your connection and platform name/version/URL.
2017-08-22T09:08:44.3833950Z Error: cmd: Command failed with exit code 1 Error output:
2017-08-22T09:08:44.3833950Z npm ERR! Windows_NT 10.0.15063
2017-08-22T09:08:44.3833950Z npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\Innovation Panel\AppData\Roaming\taco_home\node_modules\cordova\7.0.1\node_modules\npm\bin\npm-cli.js" "install" "cordova-android@~6.2.2" "--save"
2017-08-22T09:08:44.3833950Z npm ERR! node v6.11.0
2017-08-22T09:08:44.3833950Z npm ERR! npm v2.15.12
2017-08-22T09:08:44.3833950Z npm ERR! code EPEERINVALID
2017-08-22T09:08:44.3833950Z
2017-08-22T09:08:44.3833950Z npm ERR! peerinvalid The package [email protected] does not satisfy its siblings' peerDependencies requirements!
2017-08-22T09:08:44.3833950Z npm ERR! peerinvalid Peer [email protected] wants ajv@>=5.0.0
2017-08-22T09:08:44.3833950Z
2017-08-22T09:08:44.3833950Z npm ERR! Please include the following file with any support request:

Ionic Info of build agent A:

@ionic/cli-utils  : 1.9.2
ionic (Ionic CLI) : 3.9.2

global packages:

Cordova CLI : 7.0.1

local packages:

@ionic/app-scripts : 2.1.3
Cordova Platforms  : android 5.1.1
Ionic Framework    : ionic-angular 3.6.0

System:

Node : v6.11.0
npm  : 3.10.10
OS   : Windows 10

Issue faced while android build on agent B:

Error in Agent B:

2017-08-22T10:07:15.8325697Z Using this version of Cordova with older version of cordova-android is
2017-08-22T10:07:15.8325697Z deprecated. Upgrade to [email protected] or newer.
2017-08-22T10:07:15.8325697Z Error: Your android platform does not have Api.js

Ionic info of build agent B:

global packages:

@ionic/cli-utils : 1.1.2
Ionic CLI        : 3.1.2

System:

Node       : v7.10.0
OS         : Windows 10
Xcode      : not installed
ios-deploy : not installed
ios-sim    : not installed

Can someone help me on these issues? We are looking to use VSTS with Ionic2 for our CI process and we are completely stuck now.

Issues with Ionic Command

When running ionic command without any version overrides & picking up ionic 3.2.0 with Cordova 7.0.1 i'm experiencing issues with lodash dependencies.

The command i'm running is : ionic cordova build --device --release

The error i receive is

2017-05-27T15:35:30.4182510Z Module cache at /Users/vso113307/.taco_home/node_modules
2017-05-27T15:35:33.4855550Z cordova already installed.
2017-05-27T15:35:33.4887710Z Cordova Module Path: /Users/vso113307/.taco_home/node_modules/cordova/7.0.1/node_modules/cordova
2017-05-27T15:35:33.5013130Z Module cache at /Users/vso113307/.taco_home/node_modules
2017-05-27T15:35:36.2175550Z ionic already installed.
2017-05-27T15:35:36.2365330Z Ionic Module Path: /Users/vso113307/.taco_home/node_modules/ionic/3.2.0/node_modules/ionic
2017-05-27T15:35:38.3174950Z { Error: Cannot find module 'lodash'
2017-05-27T15:35:38.3198060Z
2017-05-27T15:35:38.3266470Z at Function.Module._resolveFilename (module.js:469:15)
2017-05-27T15:35:38.3293730Z at Function.Module._load (module.js:417:25)
2017-05-27T15:35:38.3332430Z at Module.require (module.js:497:17)
2017-05-27T15:35:38.3365350Z at require (internal/module.js:20:19)
2017-05-27T15:35:38.3408680Z at Object.load (/Users/vso113307/.taco_home/node_modules/ionic/3.2.0/node_modules/ionic/node_modules/@ionic/cli-utils/dist/lib/modules.js:4:12)
2017-05-27T15:35:38.3461500Z at Config. (/Users/vso113307/.taco_home/node_modules/ionic/3.2.0/node_modules/ionic/node_modules/@ionic/cli-utils/dist/lib/config.js:67:42)
2017-05-27T15:35:38.3506490Z at throw (native)
2017-05-27T15:35:38.3553060Z at rejected (/Users/vso113307/.taco_home/node_modules/ionic/3.2.0/node_modules/ionic/node_modules/@ionic/cli-utils/dist/lib/config.js:5:65) code: 'MODULE_NOT_FOUND' }

When i run the command manually via inline shell scripts i don't receive this error.

Uploaded VSIX extension package for version 1.1.2 is missing the taco-team-build node module for the Cordova command tasks

It looks like we messed up when generating the 1.1.2 VSIX and the "Command" tasks are missing a node module. Unclear why we didn't see this in some instances but in fresh ones, executing these commands results in a module not found error in fresh VSTS instances quite consistently.

I found the VSIX Peter generated and these tasks are missing the node_modules folder and the core cause is that the VSIX creation script does not do npm install on all the sub tasks like upload does. That makes it easy to miss this step. We’ve probably just been lucky so far that whoever created the VSIX happened to be the same person that used the upload script for testing. (Dan generally had been doing both testing and VSIX creation.) I am not entirely sure why this only happens in new VSTS instances, however.

I created a branch to do a tactical release for 1.1.3 to fix this but it reverts Peter's most recent commit: https://github.com/Microsoft/vsts-cordova-tasks/tree/1.1.3

Before we do another release, we need to either merge in 1.1.3 and then re-do Peters commit or simply:

  1. Bump the VSIX version up to at least 1.1.4
  2. Bump all task versions up two versions in master

Further, we should:

  1. Fix makevsix.cmd so that it does npm installs for each tasks to avoid this from happening in the future.
  2. Create a separate manifest with a dev ID for the VSIX that is "private" that we can use for testing prior to full releases

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

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.

tfx-cli syntax has changed and broken the upload scripts

tfx-cli 0.1.11 syntax:

tfx build tasks upload . --overwrite true

tfx-cli 0.3.x syntax:

tfx build tasks upload --task-path . --overwrite true

We need to update bin/tfxupload.js to use the new syntax and cut a release with the fix since we route people to the releases tab for TFS 2015.

Downloading Cordova fails if the CORDOVA_CACHE folder does not exist on Windows

Due to what appears to be a bug in Node.js, the code in taco-team-build is not properly creating the cordova cache folder (%APPDATA%\taco_home\node_modules) if it does not exist.

The workaround is to simply create the folder. This problem is limited to local Windows agents does not exist in the VSTS hosted pool.

P0 issues with Cordova Extension

Issue 1: On Windows with the hosted agent, when no Cordova version is specified, the task seems to go and install Node 5 and then will error because it defaults to Cordova 5.3.3. I think this is because the node boostrap code isn’t checking the version environment variable or taco.json but it also should not be downloading node 5 if node 0.12.7 is present which would be the case on the hosted agent anyway.

Issue 2: Specifying the version then results in this error:
3. C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\tasks\CordovaBuild\1.0.5\node-setup.js:24
4. nodeSetupPromise.then(function () {
5. ^
6. TypeError: Cannot read property 'then' of undefined
7. at Object. (C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\tasks\CordovaBuild\1.0.5\node-setup.js:24:17)
8. at Module._compile (module.js:460:26)
9. at Object.Module._extensions..js (module.js:478:10)
10. at Module.load (module.js:355:32)
11. at Function.Module._load (module.js:310:12)
12. at Function.Module.runMain (module.js:501:10)
13. at startup (node.js:129:16)
14. at node.js:814:3

Issue 3: I am seeing errors with not being able to find model “q” in the command tasks.
16. module.js:338
17. throw err;
18. ^
19. Error: Cannot find module 'q'
20. at Function.Module._resolveFilename (module.js:336:15)
21. at Function.Module._load (module.js:278:25)
22. at Module.require (module.js:365:17)
23. at require (module.js:384:17)
24. at Object. (C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\tasks\PhoneGapCommand\1.0.2\lib\node-manager.js:11:12)
25. at Module._compile (module.js:460:26)
26. at Object.Module._extensions..js (module.js:478:10)
27. at Module.load (module.js:355:32)
28. at Function.Module._load (module.js:310:12)
29. at Module.require (module.js:365:17)

Ionic command using its own version of npm

I am using ionic command tasks from VSTS to build ionic apps for both ios and android. However it is always failing on the ionic command task with npm package installation failures.

The build runs on a private agent that has npm/3.10.10 and node/v6.11.2 in use. However ionic command task is still using npm 2.15.12. Would it be possible to use the preferred npm version with ionic command somehow?

This is the information available from npm VSTS task:
user-agent = "npm/3.10.10 node/v6.11.2 darwin x64"

This is the information from ionic command task using ionic info command:
Node : v6.11.2
npm : 2.15.12
OS : macOS Sierra

Cannot run CordovaCommand

I have a TFS on premise.
I am trying to create a Build definition with a Cordova Command to add the Android platform in iOS. A very simple command call. I also could make it using a "Shell script" task.
Pls, find below the trace. Thanks!

2016-11-04T14:03:37.4538590Z ##[section]Starting: Cordova Command platform add android

2016-11-04T14:03:37.5194950Z ==============================================================================

2016-11-04T14:03:37.5202290Z Task : Cordova Command

2016-11-04T14:03:37.5209150Z Description : Run a Cordova CLI command

2016-11-04T14:03:37.5215960Z Version : 1.3.9

2016-11-04T14:03:37.5222650Z Author : Microsoft Corporation

2016-11-04T14:03:37.5229360Z Help : More Information

2016-11-04T14:03:37.5236120Z ==============================================================================

2016-11-04T14:03:38.4298120Z module.js:341

2016-11-04T14:03:38.4305860Z throw err;

2016-11-04T14:03:38.4313000Z ^

2016-11-04T14:03:38.4316400Z

2016-11-04T14:03:38.4323360Z Error: Cannot find module './lib/vsts-task-lib-proxy.js'

2016-11-04T14:03:38.4330090Z at Function.Module._resolveFilename (module.js:339:15)

2016-11-04T14:03:38.4337060Z at Function.Module._load (module.js:290:25)

2016-11-04T14:03:38.4344100Z at Module.require (module.js:367:17)

2016-11-04T14:03:38.4351530Z at require (internal/module.js:16:19)

2016-11-04T14:03:38.4359090Z at Object. (/Users/tecnweb/myagent/_work/_tasks/CordovaCommand_61ec6339-4a6a-4a69-875e-5a6f4db157a2/1.3.9/exec.js:8:19)

2016-11-04T14:03:38.4365950Z at Module._compile (module.js:413:34)

2016-11-04T14:03:38.4376170Z at Object.Module._extensions..js (module.js:422:10)

2016-11-04T14:03:38.4382920Z at Module.load (module.js:357:32)

2016-11-04T14:03:38.4389800Z at Function.Module._load (module.js:314:12)

2016-11-04T14:03:38.4397150Z at Function.Module.runMain (module.js:447:10)

2016-11-04T14:03:38.6640200Z ##[error]Exit code 1 returned from process: file name '/Users/tecnweb/myagent/externals/node/bin/node', arguments '"/Users/tecnweb/myagent/_work/_tasks/CordovaCommand_61ec6339-4a6a-4a69-875e-5a6f4db157a2/1.3.9/exec.js"'.

2016-11-04T14:03:38.6706060Z ##[section]Finishing: Cordova Command platform add android

Cordova Build Android Ant Task Signing fails - You must specify a property filename when using the -propertyfile argument

I have Cordova build task in my definition:
Platform:Android
Configuration:Release

I have set the advanced android settings with the signing keys and checked forced Ant Build otherwise the release.apk was unsigned.

However, it fails saying:

You must specify a property filename when using the -propertyfile argument

I am building using a local agent on MacOSX with the latest apache ant version 1.9.7 and Cordova 6.1.1

Based on the source code it looks like the VSTS task generates a .properties file for the ant task but the generated arguments for the ant command are not correct

Queueing build for platform android w/options: --release,--device,--ant,--keystore=/Users/administrator/Downloads/vsts-agent-darwin-2.99.0-0428/_work/1/s/config/app_signing/android/release_mode/release2.keystore,--storePassword=test1234,--alias=companyname,--password=test1234
2016-05-03T00:44:42.5074430Z Processing res/native for android
2016-05-03T00:44:43.4288350Z Test build @ platforms/android/assets/www/build/test does not exist for removal
2016-05-03T00:44:44.4294330Z ANDROID_HOME=/Applications/android-sdk-macosx/sdk
2016-05-03T00:44:44.4295040Z JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home
2016-05-03T00:44:45.2472730Z You must specify a property filename when using the -propertyfile argument

Cordova 6.0.0 always builds as an emulator for iOS

Something has changed in 6.0.0 that is breaking how we are passing in arguments to iOS. The default for the build task is supposed to default to device but for some reason is defaulting to emulator.

Cordova Build Task cannot copy Android artifacts in [email protected]

There is an issue with the new version of cordova-android and the VSTS Cordova build tasks. It seems that in the new version (6.4.0) the output directory has changed slightly and therefore the VSTS build tasks cannot find the APK to copy.

What we are seeing is the task successfully building and the APK is being written to the outputs directory, but not the correct one or at least not the same directory the VSTS task is expecting. The result is this: Error: Not found apkFile.

When running cordova build android --release with [email protected] as a platform the output directory for the APK is the following:
platforms/android/build/outputs/apk/release/android-release.apk, this is causing the VSTS build to fail as the task is expecting the APK to be here: platforms/android/build/outputs/apk/android-release.apk.

Downgrading to [email protected] allows the VSTS build task to continue and copy the APKs.

Here is my build log...
2017-11-15T08:28:52.9769030Z ==============================================================================
2017-11-15T08:28:52.9780380Z Task         : Cordova Build
2017-11-15T08:28:52.9791740Z Description  : Build a hybrid app project based on the Cordova CLI, Ionic CLI, TACO CLI, or other Cordova-compliant CLI
2017-11-15T08:28:52.9803160Z Version      : 1.3.11
2017-11-15T08:28:52.9814400Z Author       : Microsoft Corporation
2017-11-15T08:28:52.9825990Z Help         : [More Information](http://go.microsoft.com/fwlink/?LinkID=691186)
2017-11-15T08:28:52.9837390Z ==============================================================================
2017-11-15T08:28:53.5295460Z Building Android on OSX. Add "cmd" as a "Demand" under "General" to your build definition to cause the build to always route to a Windows agent.
2017-11-15T08:28:53.5317910Z Module cache at /Users/robfinbow/.taco_home/node_modules
2017-11-15T08:28:54.1094650Z [email protected] already installed.
2017-11-15T08:28:55.9652090Z Module cache at /Users/robfinbow/.taco_home/node_modules
2017-11-15T08:28:56.5241390Z [email protected] already installed.
2017-11-15T08:28:56.8840080Z Adding support plugin.
2017-11-15T08:28:58.3171700Z Platform android already added.
2017-11-15T08:28:58.3184110Z Queueing build for platform android w/options: --release,--archs=x86 arm,--device,--gradleArg=--no-daemon
2017-11-15T08:28:58.3609050Z Before deploy hook started...
2017-11-15T08:28:58.3620740Z Checking is node modules installed...
2017-11-15T08:28:58.3632430Z Node modules already installed.
2017-11-15T08:28:58.3644200Z Cordova hook completed. Resuming to run your cordova command...
2017-11-15T08:28:58.3774460Z Processing res/native for android
2017-11-15T08:28:58.7323560Z ANDROID_HOME=/Users/robfinbow/Library/Android/sdk
2017-11-15T08:28:58.7337500Z JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home
2017-11-15T08:28:59.6679530Z :wrapper
2017-11-15T08:28:59.6685560Z 
2017-11-15T08:28:59.6696830Z BUILD SUCCESSFUL in 0s
2017-11-15T08:28:59.6708380Z 1 actionable task: 1 executed
2017-11-15T08:29:00.9891950Z Subproject Path: CordovaLib
2017-11-15T08:29:01.4606650Z To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/4.1/userguide/gradle_daemon.html.
2017-11-15T08:29:02.3695670Z Daemon will be stopped at the end of the build stopping after processing
2017-11-15T08:29:05.2531210Z Configuration 'compile' in project ':' is deprecated. Use 'implementation' instead.
2017-11-15T08:29:05.4147090Z The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
2017-11-15T08:29:05.4179480Z 	at build_7k5jst7r8waaa9o5h7gkx14xg.run(/Users/robfinbow/VSTS-Agent/_work/1/s/platforms/android/build.gradle:144)
2017-11-15T08:29:07.6564000Z publishNonDefault is deprecated and has no effect anymore. All variants are now published.
2017-11-15T08:29:08.4418620Z :preBuild UP-TO-DATE
2017-11-15T08:29:08.4542230Z :CordovaLib:preBuild UP-TO-DATE
2017-11-15T08:29:08.4571590Z :CordovaLib:preReleaseBuild UP-TO-DATE
2017-11-15T08:29:08.5052830Z :CordovaLib:checkReleaseManifest
2017-11-15T08:29:08.6461450Z :CordovaLib:processReleaseManifest
2017-11-15T08:29:09.3784150Z :preReleaseBuild
2017-11-15T08:29:09.3807690Z :CordovaLib:compileReleaseAidl
2017-11-15T08:29:09.4614560Z :compileReleaseAidl
2017-11-15T08:29:09.4644070Z :CordovaLib:packageReleaseRenderscript NO-SOURCE
2017-11-15T08:29:09.4664810Z :compileReleaseRenderscript
2017-11-15T08:29:09.4685420Z :checkReleaseManifest
2017-11-15T08:29:09.4809630Z :generateReleaseBuildConfig
2017-11-15T08:29:09.4831410Z :prepareLintJar
2017-11-15T08:29:09.4856960Z :generateReleaseResValues
2017-11-15T08:29:09.4877730Z :generateReleaseResources
2017-11-15T08:29:09.5374480Z :CordovaLib:compileReleaseRenderscript
2017-11-15T08:29:09.5395000Z :CordovaLib:generateReleaseResValues
2017-11-15T08:29:09.5416390Z :CordovaLib:generateReleaseResources
2017-11-15T08:29:09.5598370Z :CordovaLib:packageReleaseResources
2017-11-15T08:29:28.5529210Z :mergeReleaseResources
2017-11-15T08:29:28.5744650Z :createReleaseCompatibleScreenManifests
2017-11-15T08:29:28.7234610Z :processReleaseManifest
2017-11-15T08:29:28.7254560Z :splitsDiscoveryTaskRelease
2017-11-15T08:29:28.8327420Z :CordovaLib:platformAttrExtractor
2017-11-15T08:29:28.8353870Z :CordovaLib:generateReleaseBuildConfig
2017-11-15T08:29:28.8379050Z :CordovaLib:prepareLintJar
2017-11-15T08:29:28.8442850Z :CordovaLib:javaPreCompileRelease
2017-11-15T08:29:28.8465390Z :CordovaLib:processReleaseJavaRes NO-SOURCE
2017-11-15T08:29:28.8486410Z :compileReleaseNdk NO-SOURCE
2017-11-15T08:29:28.8577100Z :mergeReleaseShaders
2017-11-15T08:29:28.8673570Z :compileReleaseShaders
2017-11-15T08:29:28.8702690Z :generateReleaseAssets
2017-11-15T08:29:28.8786590Z :CordovaLib:mergeReleaseShaders
2017-11-15T08:29:28.8821420Z :CordovaLib:compileReleaseShaders
2017-11-15T08:29:28.8855280Z :CordovaLib:generateReleaseAssets
2017-11-15T08:29:28.8896200Z :CordovaLib:mergeReleaseAssets
2017-11-15T08:29:29.1082520Z :mergeReleaseAssets
2017-11-15T08:29:29.1211140Z :mergeReleaseJniLibFolders
2017-11-15T08:29:29.1245550Z :CordovaLib:compileReleaseNdk NO-SOURCE
2017-11-15T08:29:29.1279720Z :CordovaLib:mergeReleaseJniLibFolders
2017-11-15T08:29:29.2152470Z :CordovaLib:transformNativeLibsWithMergeJniLibsForRelease
2017-11-15T08:29:29.2181540Z :CordovaLib:transformNativeLibsWithIntermediateJniLibsForRelease
2017-11-15T08:29:29.2259820Z :processReleaseJavaRes NO-SOURCE
2017-11-15T08:29:29.2277820Z :validateSigningRelease
2017-11-15T08:29:29.3227540Z :CordovaLib:processReleaseResources
2017-11-15T08:29:29.8968790Z :processReleaseResources
2017-11-15T08:29:29.8985630Z :generateReleaseSources
2017-11-15T08:29:29.9002620Z :CordovaLib:generateReleaseSources
2017-11-15T08:29:31.3096220Z Note: Some input files use or override a deprecated API.
2017-11-15T08:29:31.3122750Z Note: Recompile with -Xlint:deprecation for details.
2017-11-15T08:29:31.3942380Z :CordovaLib:compileReleaseJavaWithJavac
2017-11-15T08:29:31.4373800Z :CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForRelease
2017-11-15T08:29:31.7469200Z :javaPreCompileRelease
2017-11-15T08:29:33.1840600Z Note: Some input files use or override a deprecated API.
2017-11-15T08:29:33.1876160Z Note: Recompile with -Xlint:deprecation for details.
2017-11-15T08:29:33.1911160Z Note: Some input files use unchecked or unsafe operations.
2017-11-15T08:29:33.1942490Z Note: Recompile with -Xlint:unchecked for details.
2017-11-15T08:29:34.5873260Z :compileReleaseJavaWithJavac
2017-11-15T08:29:34.5902390Z :compileReleaseSources
2017-11-15T08:29:36.3986320Z :transformClassesWithPreDexForRelease
2017-11-15T08:29:37.2977030Z :transformDexWithDexForRelease
2017-11-15T08:29:38.0582170Z :transformNativeLibsWithMergeJniLibsForRelease
2017-11-15T08:29:38.3475670Z :transformResourcesWithMergeJavaResForRelease
2017-11-15T08:29:46.8181660Z :packageRelease
2017-11-15T08:29:55.8644220Z /Users/robfinbow/VSTS-Agent/_work/1/s/platforms/android/src/cordova/plugins/Diagnostic.java:446: Error: The WIFI_SERVICE must be looked up on the Application context or memory will leak on devices < Android N. Try changing this.cordova.getActivity() to this.cordova.getActivity().getApplicationContext() [WifiManagerLeak]
2017-11-15T08:29:55.8708490Z         WifiManager wifiManager = (WifiManager) this.cordova.getActivity().getSystemService(Context.WIFI_SERVICE);
2017-11-15T08:29:55.8745380Z                                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2017-11-15T08:29:55.8785580Z /Users/robfinbow/VSTS-Agent/_work/1/s/platforms/android/src/cordova/plugins/Diagnostic.java:536: Error: The WIFI_SERVICE must be looked up on the Application context or memory will leak on devices < Android N. Try changing this.cordova.getActivity() to this.cordova.getActivity().getApplicationContext() [WifiManagerLeak]
2017-11-15T08:29:55.8821200Z         WifiManager wifiManager = (WifiManager) this.cordova.getActivity().getSystemService(Context.WIFI_SERVICE);
2017-11-15T08:29:55.8843080Z                                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2017-11-15T08:29:55.8855780Z 
2017-11-15T08:29:55.8876070Z    Explanation for issues of type "WifiManagerLeak":
2017-11-15T08:29:55.8905100Z    On versions prior to Android N (24), initializing the WifiManager via
2017-11-15T08:29:55.8939680Z    Context#getSystemService can cause a memory leak if the context is not the
2017-11-15T08:29:55.8967560Z    application context. Change context.getSystemService(...) to
2017-11-15T08:29:55.8989680Z    context.getApplicationContext().getSystemService(...).
2017-11-15T08:29:55.8998140Z 
2017-11-15T08:29:55.9038170Z /Users/robfinbow/VSTS-Agent/_work/1/s/platforms/android/res/values/arrays.xml:3: Error: "country_codes" is not translated in "ar" (Arabic), "bg" (Bulgarian), "ca" (Catalan), "cs" (Czech), "da" (Danish), "de" (German), "el" (Greek), "es" (Spanish), "eu" (Basque), "fi" (Finnish), "fr" (French), "he" (Hebrew), "hi" (Hindi), "hu" (Hungarian), "id" (Indonesian), "it" (Italian), "iw" (Hebrew), "ja" (Japanese), "ko" (Korean), "nl" (Dutch), "pl" (Polish), "pt" (Portuguese), "ru" (Russian), "sk" (Slovak), "sl" (Slovenian), "sv" (Swedish), "tr" (Turkish), "zh-CN" (Chinese: China), "zh-TW" (Chinese: Taiwan) [MissingTranslation]
2017-11-15T08:29:55.9062090Z   <string-array name="country_codes">
2017-11-15T08:29:55.9084470Z                 ~~~~~~~~~~~~~~~~~~~~
2017-11-15T08:29:55.9119660Z /Users/robfinbow/VSTS-Agent/_work/1/s/platforms/android/res/values/strings.xml:3: Error: "app_name" is not translated in "ar" (Arabic), "bg" (Bulgarian), "ca" (Catalan), "cs" (Czech), "da" (Danish), "de" (German), "el" (Greek), "es" (Spanish), "eu" (Basque), "fi" (Finnish), "fr" (French), "he" (Hebrew), "hi" (Hindi), "hu" (Hungarian), "id" (Indonesian), "it" (Italian), "iw" (Hebrew), "ja" (Japanese), "ko" (Korean), "nl" (Dutch), "pl" (Polish), "pt" (Portuguese), "ru" (Russian), "sk" (Slovak), "sl" (Slovenian), "sv" (Swedish), "tr" (Turkish), "zh-CN" (Chinese: China), "zh-TW" (Chinese: Taiwan) [MissingTranslation]
2017-11-15T08:29:55.9157130Z     <string name="app_name">Tempest Photography</string>
2017-11-15T08:29:55.9191030Z             ~~~~~~~~~~~~~~~
2017-11-15T08:29:55.9224750Z /Users/robfinbow/VSTS-Agent/_work/1/s/platforms/android/res/values/strings.xml:4: Error: "launcher_name" is not translated in "ar" (Arabic), "bg" (Bulgarian), "ca" (Catalan), "cs" (Czech), "da" (Danish), "de" (German), "el" (Greek), "es" (Spanish), "eu" (Basque), "fi" (Finnish), "fr" (French), "he" (Hebrew), "hi" (Hindi), "hu" (Hungarian), "id" (Indonesian), "it" (Italian), "iw" (Hebrew), "ja" (Japanese), "ko" (Korean), "nl" (Dutch), "pl" (Polish), "pt" (Portuguese), "ru" (Russian), "sk" (Slovak), "sl" (Slovenian), "sv" (Swedish), "tr" (Turkish), "zh-CN" (Chinese: China), "zh-TW" (Chinese: Taiwan) [MissingTranslation]
2017-11-15T08:29:55.9264280Z     <string name="launcher_name">@string/app_name</string>
2017-11-15T08:29:55.9295980Z             ~~~~~~~~~~~~~~~~~~~~
2017-11-15T08:29:55.9336780Z /Users/robfinbow/VSTS-Agent/_work/1/s/platforms/android/res/values/strings.xml:5: Error: "activity_name" is not translated in "ar" (Arabic), "bg" (Bulgarian), "ca" (Catalan), "cs" (Czech), "da" (Danish), "de" (German), "el" (Greek), "es" (Spanish), "eu" (Basque), "fi" (Finnish), "fr" (French), "he" (Hebrew), "hi" (Hindi), "hu" (Hungarian), "id" (Indonesian), "it" (Italian), "iw" (Hebrew), "ja" (Japanese), "ko" (Korean), "nl" (Dutch), "pl" (Polish), "pt" (Portuguese), "ru" (Russian), "sk" (Slovak), "sl" (Slovenian), "sv" (Swedish), "tr" (Turkish), "zh-CN" (Chinese: China), "zh-TW" (Chinese: Taiwan) [MissingTranslation]
2017-11-15T08:29:55.9376100Z     <string name="activity_name">@string/launcher_name</string>
2017-11-15T08:29:55.9398340Z             ~~~~~~~~~~~~~~~~~~~~
2017-11-15T08:29:55.9408620Z 
2017-11-15T08:29:55.9428670Z    Explanation for issues of type "MissingTranslation":
2017-11-15T08:29:55.9449750Z    If an application has more than one locale, then all the strings declared
2017-11-15T08:29:55.9471170Z    in one language should also be translated in all other languages.
2017-11-15T08:29:55.9481700Z 
2017-11-15T08:29:55.9501860Z    If the string should not be translated, you can add the attribute
2017-11-15T08:29:55.9536890Z    translatable="false" on the <string> element, or you can define all your
2017-11-15T08:29:55.9559520Z    non-translatable strings in a resource file called donottranslate.xml. Or,
2017-11-15T08:29:55.9585370Z    you can ignore the issue with a tools:ignore="MissingTranslation"
2017-11-15T08:29:55.9612010Z    attribute.
2017-11-15T08:29:55.9622140Z 
2017-11-15T08:29:55.9642250Z    By default this detector allows regions of a language to just provide a
2017-11-15T08:29:55.9677340Z    subset of the strings and fall back to the standard language strings. You
2017-11-15T08:29:55.9713610Z    can require all regions to provide a full translation by setting the
2017-11-15T08:29:55.9736060Z    environment variable ANDROID_LINT_COMPLETE_REGIONS.
2017-11-15T08:29:55.9751500Z 
2017-11-15T08:29:55.9786860Z    You can tell lint (and other tools) which language is the default language
2017-11-15T08:29:55.9816970Z    in your res/values/ folder by specifying tools:locale="languageCode" for
2017-11-15T08:29:55.9849030Z    the root <resources> element in your resource file. (The tools prefix
2017-11-15T08:29:55.9880270Z    refers to the namespace declaration http://schemas.android.com/tools.)
2017-11-15T08:29:55.9898990Z 
2017-11-15T08:29:55.9928180Z /Users/robfinbow/VSTS-Agent/_work/1/s/platforms/android/res/values-ar/strings.xml:64: Error: "menu_settings" is translated here but not found in default locale [ExtraTranslation]
2017-11-15T08:29:55.9956460Z   <string name="menu_settings">إعدادات</string>
2017-11-15T08:29:55.9989130Z           ~~~~~~~~~~~~~~~~~~~~
2017-11-15T08:29:56.0017460Z     /Users/robfinbow/VSTS-Agent/_work/1/s/platforms/android/res/values-bg/strings.xml:64: Also translated here
2017-11-15T08:29:56.0042300Z     /Users/robfinbow/VSTS-Agent/_work/1/s/platforms/android/res/values-ca/strings.xml:64: Also translated here
2017-11-15T08:29:56.0064840Z     /Users/robfinbow/VSTS-Agent/_work/1/s/platforms/android/res/values-cs/strings.xml:64: Also translated here
2017-11-15T08:29:56.0097620Z     /Users/robfinbow/VSTS-Agent/_work/1/s/platforms/android/res/values-da/strings.xml:64: Also translated here
2017-11-15T08:29:56.0132810Z     /Users/robfinbow/VSTS-Agent/_work/1/s/platforms/android/res/values-de/strings.xml:64: Also translated here
2017-11-15T08:29:56.0167510Z     /Users/robfinbow/VSTS-Agent/_work/1/s/platforms/android/res/values-el/strings.xml:64: Also translated here
2017-11-15T08:29:56.0201410Z     /Users/robfinbow/VSTS-Agent/_work/1/s/platforms/android/res/values-es/strings.xml:64: Also translated here
2017-11-15T08:29:56.0234940Z     /Users/robfinbow/VSTS-Agent/_work/1/s/platforms/android/res/values-eu/strings.xml:64: Also translated here
2017-11-15T08:29:56.0268950Z     /Users/robfinbow/VSTS-Agent/_work/1/s/platforms/android/res/values-fi/strings.xml:64: Also translated here
2017-11-15T08:29:56.0302160Z     /Users/robfinbow/VSTS-Agent/_work/1/s/platforms/android/res/values-fr/strings.xml:64: Also translated here
2017-11-15T08:29:56.0336260Z     /Users/robfinbow/VSTS-Agent/_work/1/s/platforms/android/res/values-he/strings.xml:64: Also translated here
2017-11-15T08:29:56.0370020Z     /Users/robfinbow/VSTS-Agent/_work/1/s/platforms/android/res/values-hi/strings.xml:64: Also translated here
2017-11-15T08:29:56.0404400Z     /Users/robfinbow/VSTS-Agent/_work/1/s/platforms/android/res/values-hu/strings.xml:64: Also translated here
2017-11-15T08:29:56.0438370Z     /Users/robfinbow/VSTS-Agent/_work/1/s/platforms/android/res/values-id/strings.xml:64: Also translated here
2017-11-15T08:29:56.0464560Z     /Users/robfinbow/VSTS-Agent/_work/1/s/platforms/android/res/values-it/strings.xml:64: Also translated here
2017-11-15T08:29:56.0486150Z     /Users/robfinbow/VSTS-Agent/_work/1/s/platforms/android/res/values-iw/strings.xml:64: Also translated here
2017-11-15T08:29:56.0509980Z     /Users/robfinbow/VSTS-Agent/_work/1/s/platforms/android/res/values-ja/strings.xml:64: Also translated here
2017-11-15T08:29:56.0531410Z     /Users/robfinbow/VSTS-Agent/_work/1/s/platforms/android/res/values-ko/strings.xml:64: Also translated here
2017-11-15T08:29:56.0556470Z     /Users/robfinbow/VSTS-Agent/_work/1/s/platforms/android/res/values-nl/strings.xml:64: Also translated here
2017-11-15T08:29:56.0584610Z     /Users/robfinbow/VSTS-Agent/_work/1/s/platforms/android/res/values-pl/strings.xml:64: Also translated here
2017-11-15T08:29:56.0619210Z     /Users/robfinbow/VSTS-Agent/_work/1/s/platforms/android/res/values-pt/strings.xml:64: Also translated here
2017-11-15T08:29:56.0648000Z     /Users/robfinbow/VSTS-Agent/_work/1/s/platforms/android/res/values-ru/strings.xml:64: Also translated here
2017-11-15T08:29:56.0672960Z     /Users/robfinbow/VSTS-Agent/_work/1/s/platforms/android/res/values-sk/strings.xml:64: Also translated here
2017-11-15T08:29:56.0694520Z     /Users/robfinbow/VSTS-Agent/_work/1/s/platforms/android/res/values-sl/strings.xml:64: Also translated here
2017-11-15T08:29:56.0715980Z     /Users/robfinbow/VSTS-Agent/_work/1/s/platforms/android/res/values-sv/strings.xml:64: Also translated here
2017-11-15T08:29:56.0738140Z     /Users/robfinbow/VSTS-Agent/_work/1/s/platforms/android/res/values-tr/strings.xml:64: Also translated here
2017-11-15T08:29:56.0768260Z     /Users/robfinbow/VSTS-Agent/_work/1/s/platforms/android/res/values-zh-rCN/strings.xml:64: Also translated here
2017-11-15T08:29:56.0795580Z     /Users/robfinbow/VSTS-Agent/_work/1/s/platforms/android/res/values-zh-rTW/strings.xml:64: Also translated here
2017-11-15T08:29:56.0805570Z 
2017-11-15T08:29:56.0825960Z    Explanation for issues of type "ExtraTranslation":
2017-11-15T08:29:56.0847170Z    If a string appears in a specific language translation file, but there is
2017-11-15T08:29:56.0880160Z    no corresponding string in the default locale, then this string is probably
2017-11-15T08:29:56.0912840Z    unused. (It's technically possible that your application is only intended
2017-11-15T08:29:56.0945540Z    to run in a specific locale, but it's still a good idea to provide a
2017-11-15T08:29:56.0968480Z    fallback.).
2017-11-15T08:29:56.0978590Z 
2017-11-15T08:29:56.0997740Z    Note that these strings can lead to crashes if the string is looked up on
2017-11-15T08:29:56.1029730Z    any locale not providing a translation, so it's important to clean them
2017-11-15T08:29:56.1063110Z    up.
2017-11-15T08:29:56.1079550Z 
2017-11-15T08:29:56.1112610Z 7 errors, 0 warnings
2017-11-15T08:29:56.1145040Z :lintVitalRelease
2017-11-15T08:29:56.1177220Z :assembleRelease
2017-11-15T08:29:56.1209290Z :cdvBuildRelease
2017-11-15T08:29:56.1225210Z 
2017-11-15T08:29:56.1257800Z BUILD SUCCESSFUL in 54s
2017-11-15T08:29:56.1293060Z 44 actionable tasks: 44 executed
2017-11-15T08:29:57.9427940Z Module cache at /Users/robfinbow/.taco_home/node_modules
2017-11-15T08:29:58.7626350Z [email protected] already installed.
2017-11-15T08:29:58.7646650Z Platform android does not require a separate package step.
2017-11-15T08:29:58.7735170Z Copying /Users/robfinbow/VSTS-Agent/_work/1/s/platforms/android/ant-build/*.apk to /Users/robfinbow/VSTS-Agent/_work/1/s/bin/android/release
2017-11-15T08:29:58.7752950Z Copying /Users/robfinbow/VSTS-Agent/_work/1/s/platforms/android/bin/*.apk to /Users/robfinbow/VSTS-Agent/_work/1/s/bin/android/release
2017-11-15T08:29:58.7773850Z Copying /Users/robfinbow/VSTS-Agent/_work/1/s/platforms/android/build/outputs/apk/*.apk to /Users/robfinbow/VSTS-Agent/_work/1/s/bin/android/release
2017-11-15T08:29:58.7796990Z Copying /Users/robfinbow/VSTS-Agent/_work/1/s/platforms/android/ant-build/proguard/*.txt to /Users/robfinbow/VSTS-Agent/_work/1/s/bin/android/release
2017-11-15T08:29:58.7819240Z Copying /Users/robfinbow/VSTS-Agent/_work/1/s/platforms/android/build/outputs/mapping/release/*.txt to /Users/robfinbow/VSTS-Agent/_work/1/s/bin/android/release
2017-11-15T08:29:58.9091780Z ##[section]Finishing: Cordova Build android
2017-11-15T08:29:58.9907110Z ##[section]Starting: Release platforms/android/build/outputs/release/apk/android-release.apk to alpha
2017-11-15T08:29:58.9993680Z ==============================================================================
2017-11-15T08:29:59.0014760Z Task         : Google Play - Release
2017-11-15T08:29:59.0035620Z Description  : Release an app to the Google Play Store
2017-11-15T08:29:59.0055550Z Version      : 1.119.0
2017-11-15T08:29:59.0075440Z Author       : Microsoft Corporation
2017-11-15T08:29:59.0095240Z Help         : 
2017-11-15T08:29:59.0115240Z ==============================================================================
2017-11-15T08:29:59.8538390Z ##[error]Error: Not found apkFile: /Users/robfinbow/VSTS-Agent/_work/1/s/platforms/android/build/outputs/release/apk/android-release.apk

Thanks

Build errors for iOS when using Node 6.x and a Cordova plugin with a "framework" in it

Cordova 6.1.1 and below do not fully support Node 6.0.0. You can run into build errors like the following after a Cordova plugin with a framework element is added. (A new empty project will not repro.

  1) ios project handler uninstallation of <framework> elements with custom="true" attribute should rm the file from the right target location
   Message:
     TypeError: Path must be a string. Received undefined
   Stacktrace:
     TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at Object.dirname (path.js:697:5)
    at searchPathForFile (C:\Cordova\cordova-lib\cordova-lib\node_modules\xcode\lib\pbxProject.js:985:24)
    at pbxProject.removeFromFrameworkSearchPaths (C:\Cordova\cordova-lib\cordova-lib\node_modules\xcode\lib\pbxProject.js:711:20)
    at pbxProject.removeFramework (C:\Cordova\cordova-lib\cordova-lib\node_modules\xcode\lib\pbxProject.js:222:12)
    at Object.module.exports.framework.uninstall (C:\Cordova\cordova-lib\cordova-lib\src\plugman\platforms\ios.js:230:41)
    at .<anonymous> (C:\Cordova\cordova-lib\cordova-lib\spec-plugman\platforms\ios.spec.js:441:38)

Downgrade to the LTS version of Node.js (as of this writing 4.4.3) to resolve.

Ionic commands do not stop build upon erroring

Hey all, firstly I love this extension to bits! I have encountered a bit of an issue which I am hoping you could help with. I've started using the Ionic commands rather than the Cordova commands for my project, but it behaves slightly differently. When I do cordova build ios and it has a broken build.json file, it errors and stops the build with an error. However, when doing ionic build ios, it errors and carrys on with the build as if it was successful. This also happens on commands such as ionic resources which is less than ideal. Is this an issue with how ionic CLI returns commands or the VSTS extension?

See below for my log snippet:

=== BUILD TARGET elixel-ionic-template-app-v2 OF PROJECT elixel-ionic-template-app-v2 WITH CONFIGURATION Debug ===
Check dependencies
elixel-ionic-template-app-v2 requires a provisioning profile. Select a provisioning profile for the "Debug" build configuration in the project editor.
Code signing is required for product type 'Application' in SDK 'iOS 10.2'
** ARCHIVE FAILED **
The following build commands failed:
	Check dependencies
(1 failure)
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/christiancook/myagent/_work/31/s/platforms/ios/cordova/build-debug.xcconfig,-workspace,elixel-ionic-template-app-v2.xcworkspace,-scheme,elixel-ionic-template-app-v2,-configuration,Debug,-destination,generic/platform=iOS,-archivePath,elixel-ionic-template-app-v2.xcarchive,archive,CONFIGURATION_BUILD_DIR=/Users/christiancook/myagent/_work/31/s/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/christiancook/myagent/_work/31/s/platforms/ios/build/sharedpch
******************************************************************************
Finishing: Ionic Command build ios
******************************************************************************

...Then goes on to other build commands, rather than throwing an error

Cordova iOS build exits with error

Hello,

We are trying to add our iOS cordova build to the CI environment and have setup a mac running the vsts-agent. However when building the iOS app it exits with "undefined is not a function".

Any hints how to get it to build? Or some debug mode we can turn it to see what it's failing on?

The log is:
2016-10-26T14:05:45.1145200Z ##[debug]loading inputs and endpoints
2016-10-26T14:05:45.1245310Z ##[debug]loading INPUT_PLATFORM
2016-10-26T14:05:45.1346030Z ##[debug]loading INPUT_CONFIGURATION
2016-10-26T14:05:45.1448290Z ##[debug]loading INPUT_CORDOVAVERSION
2016-10-26T14:05:45.1463720Z ##[debug]loading INPUT_ANTBUILD
2016-10-26T14:05:45.1477750Z ##[debug]loading INPUT_KEYSTOREFILE
2016-10-26T14:05:45.1490590Z ##[debug]loading INPUT_IOSSIGNMETHOD
2016-10-26T14:05:45.1503300Z ##[debug]loading INPUT_P12
2016-10-26T14:05:45.1515780Z ##[debug]loading INPUT_P12PWD
2016-10-26T14:05:45.1529030Z ##[debug]loading INPUT_UNLOCKDEFAULTKEYCHAIN
2016-10-26T14:05:45.1541810Z ##[debug]loading INPUT_PROVPROFILE
2016-10-26T14:05:45.1554680Z ##[debug]loading INPUT_REMOVEPROFILE
2016-10-26T14:05:45.1568420Z ##[debug]loading INPUT_XCODEDEVELOPERDIR
2016-10-26T14:05:45.1700770Z ##[debug]loading INPUT_WINDOWSPHONEONLY
2016-10-26T14:05:45.1801780Z ##[debug]loading INPUT_WINDOWSONLY
2016-10-26T14:05:45.1814800Z ##[debug]loading INPUT_CWD
2016-10-26T14:05:45.1827560Z ##[debug]loading INPUT_OUTPUTPATTERN
2016-10-26T14:05:45.1839820Z ##[debug]loading INPUT_TARGETEMULATOR
2016-10-26T14:05:45.1852190Z ##[debug]loading ENDPOINT_AUTH_$/
2016-10-26T14:05:45.1864460Z ##[debug]loading ENDPOINT_AUTH_SCHEME_$/
2016-10-26T14:05:45.1876870Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_$/_ACCESSTOKEN
2016-10-26T14:05:45.1889540Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
2016-10-26T14:05:45.1902660Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
2016-10-26T14:05:45.1915560Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
2016-10-26T14:05:45.1929500Z ##[debug]loaded 23
2016-10-26T14:05:45.1942290Z ##[debug]BUILD_SOURCEDIRECTORY=tim
2016-10-26T14:05:45.1955780Z ##[debug]BUILD_SOURCESDIRECTORY=/Users/Communited/Documents/TFSAgent/vsts-agent-osx.10.11-x64-2.105.7/_work/1/s
2016-10-26T14:05:45.1969850Z ##[debug]CWD=/Users/Communited/Documents/TFSAgent/vsts-agent-osx.10.11-x64-2.105.7/_work/1/s/Cordova
2016-10-26T14:05:45.2083630Z ##[debug]XCODEDEVELOPERDIR=/Applications/Xcode.app/Contents/Developer
2016-10-26T14:05:45.2182280Z ##[debug]CONFIGURATION=Release
2016-10-26T14:05:45.2196440Z ##[debug]ARCHS=null
2016-10-26T14:05:45.2209340Z ##[debug]PLATFORM=ios
2016-10-26T14:05:45.2222280Z ##[debug]TARGETEMULATOR=false
2016-10-26T14:05:45.2234590Z ##[debug]WINDOWSAPPX=null
2016-10-26T14:05:45.2247670Z ##[debug]WINDOWSONLY=false
2016-10-26T14:05:45.2349840Z ##[debug]WINDOWSPHONEONLY=false
2016-10-26T14:05:45.2456420Z ##[debug]UNLOCKDEFAULTKEYCHAIN=false
2016-10-26T14:05:45.2523940Z ##[debug]DEFAULTKEYCHAINPASSWORD=null
2016-10-26T14:05:45.2631010Z ##[debug]P12=/Users/Communited/Documents/TFSAgent/vsts-agent-osx.10.11-x64-2.105.7/_work/1/s/Cordova/res/certificates/ios/Distribution.p12
2016-10-26T14:05:45.2645870Z ##[debug]P12PWD=Password
2016-10-26T14:05:45.2748810Z ##[debug]IOSSIGNINGIDENTITY=null
2016-10-26T14:05:45.2809010Z ##[debug]PROVPROFILEUUID=null
2016-10-26T14:05:45.2840890Z ##[debug]PROVPROFILE=/Users/Communited/Documents/TFSAgent/vsts-agent-osx.10.11-x64-2.105.7/_work/1/s/Cordova/res/certificates/ios/App.mobileprovision
2016-10-26T14:05:45.2854840Z ##[debug]REMOVEPROFILE=true
2016-10-26T14:05:45.2867520Z ##[debug]ANTBUILD=false
2016-10-26T14:05:45.2880480Z ##[debug]KEYSTOREFILE=/Users/Communited/Documents/TFSAgent/vsts-agent-osx.10.11-x64-2.105.7/_work/1/s
2016-10-26T14:05:45.2893250Z ##[debug]KEYSTOREPASS=null
2016-10-26T14:05:45.2905740Z ##[debug]KEYSTOREALIAS=null
2016-10-26T14:05:45.2918020Z ##[debug]KEYPASS=null
2016-10-26T14:05:45.2930350Z ##[debug]OUTPUTPATTERN=bin
2016-10-26T14:05:45.3032460Z ##[debug]CORDOVAARGS=null
2016-10-26T14:05:45.3133280Z ##[debug]CORDOVAVERSION=6.3.1
2016-10-26T14:05:45.7922920Z undefined is not a function
2016-10-26T14:05:45.7970360Z ##[debug]task result: Failed
2016-10-26T14:05:45.8150830Z ##[error]Task failed
2016-10-26T14:05:45.8162740Z ##[debug]Processed: ##vso[task.issue type=error;]Task failed
2016-10-26T14:05:45.8235190Z ##[debug]Processed: ##vso[task.complete result=Failed;]Task failed
2016-10-26T14:05:45.8511770Z ##[section]Finishing: Cordova Build ios

Arguments passed into "command" tasks do not properly handle spaces in quotes or escaped spaces

Identical problem to...

microsoft/azure-pipelines-tasks#814

...and...

microsoft/azure-pipelines-tasks#804

Unless vso-task-lib is enhanced to use minimist instead of split for getDelimitedInput we should look at each use of that function in Cordova Build, Ionic Command, Cordova Command, and the upcoming PhoneGap and TACO CLI command tasks and switch to minimist in cases where we are processing a set of command line arguments instead of something like a comma separated list.

Code Signing Fails after Xcode 8 and OS X Sierra update

I have had automated builds of my cordova project working for several months but two weeks ago my Mac that I am using as the build agent installed an update to Xcode and the builds started failing with the following error.

No certificate matching 'iPhone Distribution: ()' for team '*****': Select a different signing certificate for CODE_SIGN_IDENTITY, a team that matches your selected certificate, or switch to automatic provisioning.

I have the certificate and provisioning profile files in the source repository encrypted per the following article. I also revoked and created a new certificate and provisioning profile.
https://www.visualstudio.com/en-us/docs/build/apps/mobile/secure-certs

The only solution I have found is to remove all of the override settings for signing under iOS of the Corodva build task. Then add a build.json file like outlined in the following article.

https://dpogue.ca/articles/cordova-xcode8.html

This does work on a mac that I personally own and can log into Xcode and setup a developer account but it does not work on a MacInCloud VSTS build agent.

Warning reported when installing Cordova 5.4.1 or PhoneGap 5.3.10 causes build to fail incorrectly with the VSTS Hosted pool

For some reason a warning reported out in the Hosted pool when installing PhoneGap CLI 5.3.10 causes the build to fail even though the command ultimately succeeds.

Set workingFolder to default: C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\tasks\PhoneGapCommand\1.0.0
Prepare node module: vso-task-lib version: Latest Version for task script at workingFolder: C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\tasks\PhoneGapCommand\1.0.0\node_modules\vso-task-lib.
Create junction point from C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\tasks\PhoneGapCommand\1.0.0\node_modules\vso-task-lib to C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\modules\vso-task-lib\0.4.5.
Module cache at C:\cordova\node_modules
Installing [email protected] to C:\cordova\node_modules\phonegap\5.3.10. (This may take a few minutes.)
Exec complete.

npm WARN deprecated [email protected]: this package has been reintegrated into npm and is now out of date with respect to npm

npm WARN deprecated [email protected]: lodash@<2.0.0 is no longer maintained. Upgrade to lodash@^3.0.0

...

Γö£ΓöÇΓöÇ [email protected]
Γö£ΓöÇΓöÇ [email protected]
Γö£ΓöÇΓöÇ [email protected]
Γö£ΓöÇΓöÇ [email protected]
Γö£ΓöÇΓöÇ [email protected]
Γö£ΓöÇΓöÇ [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
Γö£ΓöÇΓöÇ [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
Γö£ΓöÇΓöÇ [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
ΓööΓöÇΓöÇ [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])

C:\cordova\node_modules\phonegap\5.3.10\node_modules\.bin\phonegap.cmd remote login -u [email protected] -p ********
�[36m[phonegap]�[39m logged in as [email protected]

******************************************************************************

Finishing task: PhoneGapCommand

******************************************************************************

Task PhoneGapCommand failed. This caused the job to fail. Look at the logs for the task for more details.

Using a cached version of PhoneGap Build does not cause the same issue to occur.

Cordova build ios asks again for build.json file

Hi all,

For months, I didn't need anymore to add a build.json file in my cordova project so that it can build ios app on a MacInCloud agent.
Last successfull build was on the 8th of February. Today (the 13th) it fails:
[Error: Please specify a build.json file according to https://taco.visualstudio.com/en-us/docs/vs-taco-2017-ios-guide/#xcode8]

Thanks

Build error

I am getting the following error :

20:13:56] 'build' errored after 5.12 s
[20:13:56] Error
at Object.cdProjectRoot (/Users/mac/.taco_home/node_modules/cordova/6.4.0/node_modules/cordova-lib/src/cordova/util.js:151:15)
at /Users/mac/.taco_home/node_modules/cordova/6.4.0/node_modules/cordova-lib/src/cordova/plugin.js:48:40
at _fulfilled (/Users/mac/.taco_home/node_modules/cordova/6.4.0/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/Users/mac/.taco_home/node_modules/cordova/6.4.0/node_modules/q/q.js:816:30)
at Promise.promise.promiseDispatch (/Users/mac/.taco_home/node_modules/cordova/6.4.0/node_modules/q/q.js:749:13)
at /Users/mac/.taco_home/node_modules/cordova/6.4.0/node_modules/q/q.js:810:14
at flush (/Users/mac/.taco_home/node_modules/cordova/6.4.0/node_modules/q/q.js:108:17)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)

I tried changing the cordova version but no luck. Any work around or suggestions is welcome.

Cordova Build task fails, unable to find Gradle

I'm trying to setup a build definition to build an Android app. The npm install task succeeds, as does the Ionic Command task (which I use to do ordova platform add android.

I have the Cordova Build task configured to use Cordova 7.0.1 (which works fine for our local builds), but the task is failing with:

{ CordovaError: Could not find an installed version of Gradle either in Android Studio,
or on your system to install the gradle wrapper. Please include gradle 
in your path, or install Android Studio
     at Object.module.exports.check_gradle (d:\a\1\s\platforms\android\cordova\lib\check_reqs.js:146:18)
     at GradleBuilder.prepEnv (d:\a\1\s\platforms\android\cordova\lib\builders\GradleBuilder.js:176:23)
     at Api.module.exports.run (d:\a\1\s\platforms\android\cordova\lib\build.js:152:20)
     at d:\a\1\s\platforms\android\cordova\Api.js:348:43
     at _fulfilled (d:\a\1\s\platforms\android\cordova\node_modules\q\q.js:854:54)
     at self.promiseDispatch.done (d:\a\1\s\platforms\android\cordova\node_modules\q\q.js:883:30)
     at Promise.promise.promiseDispatch (d:\a\1\s\platforms\android\cordova\node_modules\q\q.js:816:13)
     at d:\a\1\s\platforms\android\cordova\node_modules\q\q.js:624:44
     at runSingle (d:\a\1\s\platforms\android\cordova\node_modules\q\q.js:137:13)
     at flush (d:\a\1\s\platforms\android\cordova\node_modules\q\q.js:125:13)
   name: 'CordovaError',
   message: 'Could not find an installed version of Gradle either in Android Studio,\nor on your system to install the gradle wrapper. Please include gradle \nin your path, or install Android Studio' 

I've tried this with both the Hosted and Hosted VS2017 agents, with the same result.

VSTS build error using Cordova version 6.5.0

Using the Cordova Build task in VSTS and setting the Cordova Version to 6.5.0.
The Cordova build now requires gradle to be installed.

Here's the error:
{ CordovaError: Could not find an installed version of Gradle either in Android Studio,
or on your system to install the gradle wrapper. Please include gradle
in your path, or install Android Studio
at Object.module.exports.check_gradle (d:\a\1\s\platforms\android\cordova\lib\check_reqs.js:146:18)
at GradleBuilder.prepEnv (d:\a\1\s\platforms\android\cordova\lib\builders\GradleBuilder.js:176:23)
at Api.module.exports.run (d:\a\1\s\platforms\android\cordova\lib\build.js:152:20)
at d:\a\1\s\platforms\android\cordova\Api.js:348:43
at _fulfilled (d:\a\1\s\platforms\android\cordova\node_modules\q\q.js:854:54)
at self.promiseDispatch.done (d:\a\1\s\platforms\android\cordova\node_modules\q\q.js:883:30)
at Promise.promise.promiseDispatch (d:\a\1\s\platforms\android\cordova\node_modules\q\q.js:816:13)
at d:\a\1\s\platforms\android\cordova\node_modules\q\q.js:624:44
at runSingle (d:\a\1\s\platforms\android\cordova\node_modules\q\q.js:137:13)
at flush (d:\a\1\s\platforms\android\cordova\node_modules\q\q.js:125:13)
name: 'CordovaError',
message: 'Could not find an installed version of Gradle either in Android Studio,\nor on your system to install the gradle wrapper. Please include gradle \nin your path, or install Android Studio',

Cordova build error in vsts

Error in cordova build in vsts.
I am using empty build definition with 2 steps

  1. Cordova Build
  2. Copy and Publish Artifacts
    and cordova version 6.2.1

I am refering this article
https://docs.microsoft.com/en-gb/vsts/build-release/archive/apps/mobile/cordova-build

This is the error

Starting: Cordova Build


==============================================================================
Task : Cordova Build
Description : Build a hybrid app project based on the Cordova CLI, Ionic CLI, TACO CLI, or other Cordova-compliant CLI
Version : 1.3.11
Author : Microsoft Corporation
Help : More Information

d:\a_tasks\CordovaBuild_70e94267-15dc-434d-8973-023d766825d7\1.3.11\lib\cordova-task.js:70
process.chdir(cwd);
^
Error: ENOENT: no such file or directory, uv_chdir
at Error (native)
at processInputs (d:\a_tasks\CordovaBuild_70e94267-15dc-434d-8973-023d766825d7\1.3.11\lib\cordova-task.js:70:13)
at Object. (d:\a_tasks\CordovaBuild_70e94267-15dc-434d-8973-023d766825d7\1.3.11\lib\cordova-task.js:32:1)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:394:7)
Task failed

Cordova plugins not being installed

I'm trying to move an existing ionic project over to VSTS CI and running into an issue with not being able to get my Cordova plugins to install. I've tried three different build configurations with varying results;

  1. Build steps - npm install, cordova build android[cordova v6.4.0] , hockeyapp deploy
    Results summary: Builds and deploys to Hockeyapp successfully but no Cordova hooks appear to have ran and no plugins get installed.

  2. Build steps - npm install, ionic build android[cordova v6.4.0, ionic v2.0.0], hockeyapp deploy
    Results summary: Builds and deploys to Hockeyapp successfully Cordova hooks do not appear to run but a partial list of Cordova plugins get installed, namely;

    • cordova-plugin-device
    • cordova-plugin-console
    • cordova-plugin-whitelist
    • cordova-plugin-splashscreen (Default splash screen still gets ran instead of my custom one)
    • cordova-plugin-statusbar
    • ionic-plugin-keyboard

    Missing plugins include; "cordova-plugin-console",

  3. Build steps - npm install, ionic platform add android[cordova v6.4.0, ionic v2.0.0], ionic build android[cordova v6.4.0, ionic v2.0.0], hockeyapp deploy
    Results summary: Builds and deploys to Hockeyapp successfully. Cordova hooks attempt to run but no Cordova plugins get installed. All plugin install hooks fail with an error similar to as follows;

Fetching plugin "[email protected]" via npm
Installing "cordova-plugin-whitelist" for android
ANDROID_HOME=C:\java\androidsdk\android-sdk
JAVA_HOME=C:\java\jdk\jdk1.8.0_102
Subproject Path: CordovaLib
cp: dest file already exists: D:\a\1\s\platforms\android\gradlew.bat
shell.js: internal error
Error: ENOENT: no such file or directory, chmod 'D:\a\1\s\platforms\android\gradle\wrapper\gradle-wrapper.jar'
at Error (native)
at Object.fs.chmodSync (fs.js:1154:18)
at Object.chmodSync (C:\cordova\node_modules\cordova\6.4.0\node_modules\npm\node_modules\graceful-fs\polyfills.js:220:19)
at copyFileSync (D:\a\1\s\platforms\android\cordova\node_modules\shelljs\src\cp.js:41:6)
at cpdirSyncRecursive (D:\a\1\s\platforms\android\cordova\node_modules\shelljs\src\cp.js:82:9)
at D:\a\1\s\platforms\android\cordova\node_modules\shelljs\src\cp.js:183:9
at Array.forEach (native)
at Object._cp (D:\a\1\s\platforms\android\cordova\node_modules\shelljs\src\cp.js:157:11)
at Object.cp (D:\a\1\s\platforms\android\cordova\node_modules\shelljs\src\common.js:186:23)
at D:\a\1\s\platforms\android\cordova\lib\builders\GradleBuilder.js:182:15

And the hook, after_platform_add/010_install_plugins.js, has the following script;

#!/usr/bin/env node

/**
 * Install all plugins listed in package.json
 * https://raw.githubusercontent.com/diegonetto/generator-ionic/master/templates/hooks/after_platform_add/install_plugins.js
 */
var exec = require('child_process').exec;
var sys = require('sys');

var packageJSON = null;

try {
  packageJSON = require('../../package.json');
} catch (ex) {
  console.log('\nThere was an error fetching your package.json file.');
  console.log('\nPlease ensure a valid package.json is in the root of this project\n');
  return;
}

packageJSON.cordovaPlugins = packageJSON.cordovaPlugins || [];
packageJSON.cordovaPlugins.forEach(function(plugin) {
  exec('cordova plugin add ' + plugin, function(error, stdout) {
    sys.puts(stdout);
  });
});

Here is a gist with the log files for each of the above build configurations.

Build config log files

Locally I have my ionic command line at v2.0.0 and my app has ionic v1.3.2 installed via Bower. Builds work as expected via ionic run android or ionic build android.

Post-Feb 14th error when referencing P12 file for iOS "Command failed: /bin/sh -c /usr/bin/security find-identity -v -p codesigning ..."

This is due to the Apple's WWDR certificate expiring on this date and an old certificate still being present on the system.

Follow the steps outlined by Apple here: https://developer.apple.com/support/certificates/expiration/

In particular, be sure see "What should I do if Xcode doesn’t recognize my distribution certificate?" and be sure to remove any expired certificates as this can cause the error to occur even after you've installed updated certificates. This also affects development certs despite the title.

As an improvement, we should improve error messaging here.

Ionic Cordova iOS Build Failed - Scheme not found

Hi,

Am trying to use VSTS for Ionic2 iOS build and IPA file generation. The highlevel flow is given below which am using.

  1. Get sources from VSTS Git & clean the previous build folders
  2. NPM Install
  3. Ionic platform add and Ionic Build
  4. XCODE Build for IPA

The steps 1-3 are working fine without any issues but the step 4 is failing.

The error am getting is:

xcodebuild: error: The project named "TestProject" does not contain a scheme named "TestProject". The "-list" option can be used to find the names of the schemes in the project

Is there any option to set the scheme while the VSTS tasks are being run? Please let me know as we are unable to proceed further.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.