-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[REGRESSION]: Azure CLI@2 - toolExecutionError.indexOf is not a function #19726
Comments
I had a similar issue occur, but for me it was due to not passing in an appropriate Azure Subscription. Perhaps this could be your issue? Maybe try confirming whether this subscription exists or not 🤔 |
Yes, the reason our pipeline is failing in the first place is due to something else, but this issue is about the error not getting properly logged because of the |
Some issue for me with a service connection. |
Hello @ponbac, @JulianCodespotiMYOB and @jonmikeli As @ponbac noticed, my changes do not work properly. But the The most common reason for service connection error - is expired secrets. From my side, I'll try to revert the changes asap. |
Meanwhile, we can use the previous version of the task by using |
Adding a note that I am using service connections with federated identity and recevied the same error. Using @shanoor's comment about downgrading the task version bypassed the error. |
Just wanted to note that we are also having this issue and we are also using Workload Identity Federation. Downgrading as suggested by @shanoor fixes the issue. |
Hi @LeftTwixWand , Thank you for your answer. I will use the former version while the issue is solved. |
Same problem here, even using Workload Identity Federation |
Faced the issue today. We are using Workload Identity Federation as well. Edit: Used this Google Chrome extension to see the final rendered YAML: ADO Pipeline Assistant Relevant snippet from final rendered YAML:
|
if you use task: AzureCLI@2.236.0 then you will get the error: 'unable to locate executable file: 'powershell'. Please verify..... and this is the actual error. to resolve this just add the pool image as 'windows-latest' and it will work with task: AzureCLI@2 also. you need to add the below part in your script before the task pool:
|
New issue checklist
Task name
AzureCLI@2
Breaking task version
No response
Last working task version
No response
Regression Description
Our pipeline stopped working April 02 and the error message does not get logged since
toolExecutionError.indexOf is not a function
causes a crash.This seems to have been introduced in this commit: 9e519cb by @LeftTwixWand.
The problem seems to be that you try to use
indexOf
ontoolExecutionError
which in some cases is neither a string nor an array at e.g. https://github.com/microsoft/azure-pipelines-tasks/blob/master/Tasks/AzureCLIV2/azureclitask.ts#L101.Environment type (Please select at least one enviroment where you face this issue)
Azure DevOps Server type
dev.azure.com (formerly visualstudio.com)
Azure DevOps Server Version (if applicable)
No response
Operation system
windows-2022
Relevant log output
The text was updated successfully, but these errors were encountered: