-
Notifications
You must be signed in to change notification settings - Fork 59
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
Exception "Aborted" when downloading tools from GitHub releases #194
Comments
We are also facing the same issue
Please let us know if there is any fix for this soon. Thanks. |
@piraces @lsynopsys thanks for reporting this issue, let us take a look at it |
@piraces, @lsynopsys, could you please provide some demo script to reproduce the issue? On my side it works as expected: const tool = require('azure-pipelines-tool-lib');
async function main() {
await tool.downloadTool('https://github.com/Azure/bicep/releases/download/v0.16.1/bicep-osx-x64');
}
main();
Error |
Having the same issue. Are there any best practices for hosting these downloadable artifacts to avoid such issues? |
Downgrade the version to "azure-pipelines-tool-lib": "^2.0.2", until the azure team fixes this issue. |
It is happening once again on cloud and self-hosted runners and this time with "azure-pipelines-tool-lib": "^2.0.2" as well, Do we have any fix? |
@lsynopsys the issue I believe comes from the server you download file from. You need to escalate it to server owners and figure out why it throttles your requests. To mitigate your issues you can add retries to your code or use agent image (or use docker-image) with pre-installed tool you try to download |
@sergey-koryshev It does not seem to be a problem of the server where it is downloading, because I have the same problem, and apparently are the agents hosted by azure, because with a self hosted agent works, doing the local test, it works, but when I change the pool to an agent hosted by azure, it comes out the error "Aborted" because apparently the connection stream is closed when writing the file. I have implemented in the code controls for retries and timeouts. Agent version in both 3.227.2 |
@sergey-koryshev event aborted when the file is open state is causing the issue for us https://github.com/microsoft/azure-pipelines-tool-lib/blob/master/tool.ts#L261 @henryd24 We have also observed the same issue, For the time being, we have removed the aborted state by importing tool.ts file into our repo. |
@lsynopsys yeah, doing what you said worked without any problem, thank you very much. I hope they fix this problem soon |
Since the change introduced in #189 , I have been observing that downloading from GitHub releases directly produces an "Aborted" exception but the binary just seems to be fine... I'm using Node 16.x,
For example when downloading Azure Bicep it produces the following output:
With version
2.0.2
of this library the warning about Content-Length is not shown and the binary it's always fine...Sample correct execution on version
2.0.2
: https://raulejea.visualstudio.com/Bicep%20Tasks/_build/results?buildId=378&view=logs&j=295e7618-5d04-5731-f417-e49cf049e2b1&t=99b7bc6e-aa6b-56e3-8d64-dbce029ad954Failing execution on version
2.0.4
: https://raulejea.visualstudio.com/Bicep%20Tasks/_build/results?buildId=376&view=logs&j=295e7618-5d04-5731-f417-e49cf049e2b1&t=99b7bc6e-aa6b-56e3-8d64-dbce029ad954The related extension: https://github.com/piraces/azure-devops-bicep-task
It's GitHub that it's currently aborting the request of could be another type of error?
Please let me know if you need more information about this behaviour.
Thanks!
The text was updated successfully, but these errors were encountered: