You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fatal | Process() cancelled due to failure
EXEC : error | error : spawn EINVAL [D:\a\_work\1\s\azure-sdk\sdk\resourcehealth\Azure.ResourceManager.ResourceHealth\src\Azure.ResourceManager.ResourceHealth.csproj]
error | Autorest completed with an error. If you think the error message is unclear, or is a bug, please declare an issues at https://github.com/Azure/autorest/issues with the error message you are seeing.
C:\Users\cloudtest\.nuget\packages\microsoft.azure.autorest.csharp\3.0.0-alpha.20240519.1\buildMultiTargeting\Microsoft.Azure.AutoRest.CSharp.targets(57,5): error MSB3073: The command "npx autorest@ --max-memory-size=8192 --skip-csproj --skip-upgrade-check --version=3.9.7 D:\a\_work\1\s\azure-sdk\sdk\resourcehealth\Azure.ResourceManager.ResourceHealth\src/autorest.md --use=C:\Users\cloudtest\.nuget\packages\microsoft.azure.autorest.csharp\3.0.0-alpha.20240519.1\buildMultiTargeting\../tools/net7.0/any/ --clear-output-folder=true --shared-source-folders="D:\a\_work\1\s\azure-sdk\eng\/../sdk/core/Azure.Core/src/Shared/;C:\Users\cloudtest\.nuget\packages\microsoft.azure.autorest.csharp\3.0.0-alpha.20240519.1\buildMultiTargeting\../content/Generator.Shared/" --output-folder=D:\a\_work\1\s\azure-sdk\sdk\resourcehealth\Azure.ResourceManager.ResourceHealth\src/Generated --namespace=Azure.ResourceManager.ResourceHealth" exited with code 1. [D:\a\_work\1\s\azure-sdk\sdk\resourcehealth\Azure.ResourceManager.ResourceHealth\src\Azure.ResourceManager.ResourceHealth.csproj]
After analysis, we thought it's due to a security enhancement introduced in node v18.20.2: nodejs/node#52554
The fix is to pass { shell: true } when invoking spawn(). I searched the codes of autorest, and I found there are several invocation of spawn(). I guess they are for invoking generators. Can we have an alpha build so that we can try on our pipeline to verify the fix?
Expected behavior autorest should run without error on Windows server 2022 + node v18.20.2
Additional context
The text was updated successfully, but these errors were encountered:
We are running into this error as well. We are using the legacy C# generator, so the v3: true flag does not work in our case. Any suggestions for a different workaround?
Well, if legacy one is still needed, and if your problem persists in your build pipelines, the only workaround could be changing your build agent to a linux one (i.e. ubuntu-latest) from windows (windows-latest).
Before filling a bug
Describe the bug
Starting from May 17, there were autorest errors in one of our pipeline: https://dev.azure.com/azure-sdk/internal/_build?definitionId=5990&_a=summary
After analysis, we thought it's due to a security enhancement introduced in node v18.20.2: nodejs/node#52554
The fix is to pass
{ shell: true }
when invokingspawn()
. I searched the codes ofautorest
, and I found there are several invocation ofspawn()
. I guess they are for invoking generators. Can we have an alpha build so that we can try on our pipeline to verify the fix?Expected behavior
autorest
should run without error on Windows server 2022 + node v18.20.2Additional context
The text was updated successfully, but these errors were encountered: