0

I'm trying to setup my build definition with YAML. I'm using the AppCenterDistribute task. It requires and endpoint to MS App Center. I've setup one as per this tutorial.

However, I got that error message:

"Step input serverEndpoint references endpoint Appcenter which could not be found. The service endpoint does not exist or has not been authorized for use."

This is exactly the same issue as this post although I've made sure that I AM in the correct VSTS project.

What could be the problem? I can't even run my build now.

Here's the YAML section:

variables:

APKName: 'com.project.this.apk'
- task: AppCenterDistribute@1
displayName: Deploy APK to App Center
inputs:
  serverEndpoint: Appcenter
  appSlug: 'Project/Learn'
  appFile: '$(build.artifactstagingdirectory)\$(APKName)'
  symbolsIncludeParentDirectory: false
  releaseNotesInput: Notes

Note that I do have a normal VSTS web build (with a slightly different name) in the same VSTS project that does build and can distribute using the same endpoint to App Center.

Here's the error when I submit a YAML build:

Submit build error

krlzlx
  • 5,752
  • 14
  • 47
  • 55
ossentoo
  • 1,675
  • 2
  • 20
  • 44

2 Answers2

1

I can also reproduce the issue when the App Center Distribute task is added in a YAML build definition.

And I also create an issue App Center Distribute task show errors when queuing YAML build for it. You can follow up.

Marina Liu
  • 36,876
  • 5
  • 61
  • 74
1

You followed the App Center tutorial but you still have to create the Endpoint in VSTS which I think is what you're missing. It cannot be done through your Yaml.

To do so, connect to VSTS and start creating a new empty-process build definition MANUALLY for the SAME project. Add the the "App Center Distribute" task. There is a dropdown for the endpoint. It is empty and there is a "New" button to create one. Do so and give it the name that you use in your Yaml. Then you can cancel your build definition creation and use your Yaml.

enter image description here

UPDATE:

I replied too fast as you said you already have a build defintion working fine with your App Center endpoint. I still keep the above as it could help others.

However, when I compare your Yaml to mine, I notice that I use quotes while you don't. That may be the issue (also I may just have quotes because I have a space in my endpoint name and you don't).

serverEndpoint: 'App Center'

On your existing working build definition, did you try the "View Yaml" button on the top right corner? This gives you the corresponding yaml and it is very useful :-)

enter image description here

François
  • 3,164
  • 25
  • 58
  • Have you queued your yaml build yet? The quotes makes no change. Since your server name `App Center` contains blank space, the quotes are necessary. While my service name is `MyAppCenter` without blank space, quotes are unnecessary in my yml file. – Marina Liu Jun 04 '18 at 09:10
  • As I've said on github, I can't click on Queue Build button due to the error. Also, I have already setup the serviceendpoint. my web ui build works as expected. – ossentoo Jun 04 '18 at 11:34