Azure-devops-docs: Missing required params from body

Created on 25 Mar 2020  Â·  13Comments  Â·  Source: MicrosoftDocs/azure-devops-docs

It seems like for iOS it is not working or the documentation lack information. If I want to use this task I always receive:
##[error]"{\"error\":\"Error: Missing required params from body: build_version, unique_identifier, Service id: {ID}\"}"


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Pri2 cba devops-cicd-tasktech devopprod needs-more-info support-request

Most helpful comment

@WilliamAntonRohm please find below the whole pipeline(Please note I replaced correct values with XYZ, which are project depending):

pool:
  name: Azure Pipelines
  demands: xcode

steps:
- task: InstallAppleCertificate@2
  displayName: 'Install an Apple certificate'
  inputs:
    certSecureFile: '6b7b57d2-29b9-469d-af11-bdb2d8cd6688'
    certPwd: '$(P12password)'

- task: InstallAppleProvisioningProfile@1
  displayName: 'Install an Apple provisioning profile'
  inputs:
    provProfileSecureFile: '3a7911af-33ff-4a07-af66-618c4242edf2'

- task: Xcode@5
  displayName: 'Xcode clean build'
  inputs:
    actions: 'clean build'
    xcWorkspacePath: '$(Parameters.xcWorkspacePath)'
    scheme: '$(Parameters.scheme)'
    xcodeVersion: '$(Parameters.xcodeVersion)'
    packageApp: true
    exportOptions: specify
    exportMethod: enterprise
    exportTeamId: XYZ

- task: AppCenterDistribute@3
  displayName: 'Deploy **/*.ipa to Visual Studio App Center'
  inputs:
    serverEndpoint: 'XYZ'
    appSlug: 'XYZ'
    appFile: '**/*.ipa'
    symbolsIncludeParentDirectory: false
    releaseNotesInput: Updates
    isSilent: false

All 13 comments

@car5tenV -- thank you for your feedback. Please provide more context around your general task.

Meanwhile, you may find answers here:

@WilliamAntonRohm please find below the whole pipeline(Please note I replaced correct values with XYZ, which are project depending):

pool:
  name: Azure Pipelines
  demands: xcode

steps:
- task: InstallAppleCertificate@2
  displayName: 'Install an Apple certificate'
  inputs:
    certSecureFile: '6b7b57d2-29b9-469d-af11-bdb2d8cd6688'
    certPwd: '$(P12password)'

- task: InstallAppleProvisioningProfile@1
  displayName: 'Install an Apple provisioning profile'
  inputs:
    provProfileSecureFile: '3a7911af-33ff-4a07-af66-618c4242edf2'

- task: Xcode@5
  displayName: 'Xcode clean build'
  inputs:
    actions: 'clean build'
    xcWorkspacePath: '$(Parameters.xcWorkspacePath)'
    scheme: '$(Parameters.scheme)'
    xcodeVersion: '$(Parameters.xcodeVersion)'
    packageApp: true
    exportOptions: specify
    exportMethod: enterprise
    exportTeamId: XYZ

- task: AppCenterDistribute@3
  displayName: 'Deploy **/*.ipa to Visual Studio App Center'
  inputs:
    serverEndpoint: 'XYZ'
    appSlug: 'XYZ'
    appFile: '**/*.ipa'
    symbolsIncludeParentDirectory: false
    releaseNotesInput: Updates
    isSilent: false

@car5tenV -- thank you for clarifying. It looks like you're working through an issue with your scenario or implementation, rather than an issue with the documentation. Here are a couple of options where you might consider asking your question:

@car5tenV I‘ve got the same error. Have you solved this error?

@xxycode nope unfortunately I didnt' find a fix for this. I added a hook in app center to get triggered once a push to a branch is made

@xxycode , were you able to solve the issue? I too am facing this.

I have solved this issue. My code signing was wrong. It works well after I fix my code signing.

@xxycode Can you elaborate on what the fix was for your code signing? I am running into this issue right now

@xxycode Can you elaborate on what the fix was for your code signing? I am running into this issue right now

When I copy provision file, I named "embedded.mobileprovision" to "embedded.provisionprofile", the right name is "embedded.mobileprovision".

@xxycode , please can you help me I don't know what to watch anymore. I have the same error: ## [error] "{\" error \ ": \" Error: Missing required params from body: build_version, unique_identifier, Service id: {ID} \ "}"

Here is my configuration by replacing the variables that depend on the project with xyz.
Thanks in advance

steps:
- task: InstallAppleCertificate@2
  displayName: 'Install an Apple certificate-Distribution'
  inputs:
    certSecureFile: 'Distribution.p12'
    certPwd: '$(P12password)'

steps:
- task: InstallAppleProvisioningProfile@1
  displayName: 'Install an Apple provisioning profile-Distribution-AdHoc'
  inputs:
    provProfileSecureFile: 'xyz.mobileprovision'


variables:
  Scheme-STUB: 'XYZ'

steps:
- task: Xcode@5
  displayName: 'Xcode archive-Release-STUB'
  inputs:
    actions: 'clean build'
    xcWorkspacePath: '$(Parameters.xcWorkspacePath)'
    scheme: '$(Scheme-STUB)'
    xcodeVersion: '$(Parameters.xcodeVersion)'
    packageApp: true
    exportOptions: specify
    exportMethod: 'ad-hoc'
    exportTeamId: xyz
    signingOption: manual
    signingIdentity: '$(APPLE_CERTIFICATE_SIGNING_IDENTITY)'
    provisioningProfileUuid: '$(APPLE_PROV_PROFILE_UUID)'
    args: 'CODE_SIGNING_ALLOWED=NO'

 steps:
- task: AppCenterDistribute@3
  displayName: 'Deploy **/*.ipa Stub to Visual Studio App Center'
  inputs:
    serverEndpoint: 'xyz'
    appSlug: 'xyz'
    appFile: '**/*.ipa'
    symbolsIncludeParentDirectory: false
    releaseNotesInput: 'Stub release'
    isMandatory: true
    distributionGroupId: 'xyz'
    isSilent: true


For anyone having issues with this, our application has several extensions with their own provisioning profiles and the signing was not working properly until we created a plist file and used that option

  • task: Xcode@5
    inputs:
    actions: 'clean build archive'
    xcWorkspacePath: 'xyzapp/xyzapp.xcworkspace'
    scheme: 'xyzapp-$(Configuration)'
    xcodeVersion: 'specifyPath' # Options: 8, 9, 10, default, specifyPath
    xcodeDeveloperDir: '/Applications/Xcode_11.4.1.app/Contents/Developer'
    signingOption: 'default'
    teamId: $(TeamId)
    packageApp: true
    exportOptions: 'plist'
    exportOptionsPlist: 'xyzapp/exportOptions.plist'
    exportMethod: 'ad-hoc'
    exportTeamId: $(TeamId)
    workingDirectory: 'xyzapp'

Here's an example of the plist file we specify:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>compileBitcode</key>
    <true/>
    <key>destination</key>
    <string>export</string>
    <key>method</key>
    <string>ad-hoc</string>
    <key>provisioningProfiles</key>
    <dict>
        <key>com.xyzapp.app</key>
        <string>xyzapp QA</string>
        <key>com.xyzapp.app.NotificationService</key>
        <string>xyzapp Notification Service QA</string>
        <key>com.xyzapp.app.ShareExtension</key>
        <string>xyzapp Share QA</string>
    </dict>
    <key>signingCertificate</key>
    <string>Apple Distribution</string>
    <key>signingStyle</key>
    <string>manual</string>
    <key>stripSwiftSymbols</key>
    <true/>
    <key>teamID</key>
    <string>YOUR_TEAM_ID_HERE</string>
    <key>thinning</key>
    <string>&lt;none&gt;</string>
</dict>
</plist>

@ShaunFS Thanks a lot, you solved the problem for me :)

@SalvoSwift21 Glad to hear it, we struggled with this problem for quite a while

Was this page helpful?
0 / 5 - 0 ratings