node.jsazure-devopsvisual-studio-cordova

Unable to determine Identity


When I use this build task on hosted macOS in azure devops, I'm getting some errors that are causing the build to fail at various steps.

Old Node Version You are running version v6.17.0 of Node.js, which is not supported by Angular CLI v6. The official Node.js version that is supported is 8.9 and greater. This only complains on the hosted macOS, when I build android using windows, this error does not come up. To fix it, I just installed 10.x of node using Node.js Tool Installer task.

Unable to determine identity Input to determineIdentity: {"cwd":"/Users/vsts/agent/2.150.3/work/1/s","unlockDefaultKeychain":false,"defaultKeychainPassword":"","p12":"/Users/vsts/agent/2.150.3/work/1/s/signing/ios/DEV/Developer Certificate.p12","p12pwd":"***"} TypeError [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string. Received type object at validateString (internal/validators.js:125:11)

Seems with the updated version of node, it is not passing the expected argument. I cannot get past this error. Here is the YAML for this build step:

steps:
- task: ms-vsclient.cordova-extension.cordovabuildtask.CordovaBuild@1
  displayName: 'Cordova Build ios'
  inputs:
    platform: ios
    configuration: Release
    antBuild: false
    p12: 'signing/ios/DEV/Developer Certificate.p12'
    p12pwd: '$(p12pwd)'
    provProfile: 'signing/ios/DEV/DEV.mobileprovision'
    removeProfile: true
    windowsPhoneOnly: false
    windowsOnly: false
    targetEmulator: false

Files are in correct location and password is set correctly as a build variable.

Please help!


Solution

  • At last it have been fixed by downgrading the node.js version.May be it could help some one. I was using ionic v1 projects may be the latest node.js was having some compatible issue with old version ionic v1, hence downgraded node to 6.7.0 and it worked like a charm.