notAdev
notAdev

Reputation: 141

VSTS, create build definition gets AllowScriptsAuthAccess error

long time listener, first time caller! I've spent two days searching for an answer to this so hopefully someone here may be able to help.

I've set up a personal/free VSTS instance and created a project. One of the first tasks I want to do is setup the build pipeline, so create a new pipeline, define the agent pool as VS2017, connect to my Github repo etc, all of which is fine.

Next I try to add an Agent Job, again choosing VS2017 as the agent. With no other options chosen, if I try to save the build definition I get the following error message (and cannot save it);

The AllowScriptsAuthAccess build option is not supported in API versions greater than 4.0.

Allow scripts to access the OAuth token is unchecked on the Agent job configuration under phases and on the Build/Options tab (slider set to disabled)

I've googled and searched for all sorts of stuff to try and find someone with the same problem but it's almost like I'm the first to discover this - which is highly unlikely!! It has almost driven me to using Bing to search for a solution, but let's not get carried away.

Any ideas or suggestions would be greatly appreciated!

Upvotes: 9

Views: 1608

Answers (4)

notAdev
notAdev

Reputation: 141

So it turns out that turning off the "New YAML pipeline creation experience" and "New Navigation" under preview features fixes the problem, insofar as I can now create and save a build pipeline without the error.

Also, if you have "Build YAML Pipelines" enabled under preview features for the Organisation, you get the "View YAML" link that I was missing also.

Thanks all for your help. I'd be interested to know the root cause of this still. I'll update the Microsoft support ticket with the same and post back here if they have any insights.

Upvotes: 5

Chris Burns
Chris Burns

Reputation: 1

I had this issue and it turned out that I didn't have Build Admin permissions in VSTS for the project. Not a very helpful error message for this.

Upvotes: 0

Naughton
Naughton

Reputation: 129

I am assuming this is a bug in the VSTS system and it will likely be fixed soon. But for the time being, I found a workaround:

I was also getting the AllowScriptsAuthAccess error and struggled with it for hours. I don't think any of the configuration settings you mentioned have anything to do with it (free account, GitHub, OAuth token unchecked). To solve it, I converted the Agent Job to YAML (which is as easy as clicking "View YAML" in the upper right). Save the code to a file named .vsts-ci.yml, and save this in the root folder of your solution. Commit/push the new file, then queue the build. (Note that the conversion to YAML is one-way, so you may want to Clone your build.)

That should get rid of the AllowScriptsAuthAccess error. After that I had to add a few variables, but then it's just a matter of following the error messages.

I hope this helps. Sorry I can't answer this more authoritatively. Please post a comment if I am missing any steps.

Upvotes: 0

Andy Li-MSFT
Andy Li-MSFT

Reputation: 30442

There's an similar issue here:https://developercommunity.visualstudio.com/content/problem/123012/getting-multiconfiguration-build-option-not-suppor.html

Seems the build template was broken. So, you can try with other build templates or starting over with an empty template, then add the needed tasks manually to check if that works.

Besides, you can try below things:

  • Clean the caches on your client machine, also clean the browser caches, then check it again. See How to clear the TFS cache on client machines.
  • Create a new team project and create a new build pipeline within the new team project to check if that works

Upvotes: 0

Related Questions