Azure-pipelines-tasks: ##[error]Failed to download or parse release-index.json with error: {}

Created on 22 Jul 2019  路  74Comments  路  Source: microsoft/azure-pipelines-tasks

Note

Issues in this repo are for tracking bugs, feature requests and questions for the tasks in this repo

For a list:
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks

If you have an issue or request for the Azure Pipelines service, use developer community instead:

https://developercommunity.visualstudio.com/spaces/21/index.html )

Required Information

Entering this information will route you directly to the right team and expedite traction.

Question, Bug, or Feature?
Type: Bug

Enter Task Name: UseDotNet@2

list here (V# not needed):
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks

Environment

Azure Pipelines

  • Agent - Hosted or Private:
    Hosted Windows 2019 with VS2019

Issue Description

Receive the following error downloading the .NETCore SDK: ##[error]Failed to download or parse release-index.json with error: {}

Task logs

[Enable debug logging and please provide the zip file containing all the logs for a speedy resolution]

Troubleshooting

Checkout how to troubleshoot failures and collect debug logs: https://docs.microsoft.com/en-us/vsts/build-release/actions/troubleshooting

Error logs

##[error]Failed to download or parse release-index.json with error: {}

WORKAROUND (yaml configuration):

Before:

- task: UseDotNet@2
  displayName: 'Install .NETCore SDK'
  inputs:
    version: '2.2.301'

After:

- task: UseDotNet@2
  displayName: 'Install .NETCore SDK'
  inputs:
    packageType: 'sdk'
    version: '2.2.301'
Release bug

Most helpful comment

this is happening again

All 74 comments

Potentially related / similar to: #10968

This seem to have been caused by some error introduced in the releases-index.json of dotnet/core repo.
You should be unblocked now. Do reopen if this occurs again.

I have just faced this issue in Azure Pipelines:

Starting: Use .NET Core sdk 2.2.301
==============================================================================
Task         : Use .NET Core
Description  : Acquires a specific version of the .NET Core SDK from the internet or the local cache and adds it to the PATH. Use this task to change the version of .NET Core used in subsequent tasks. Additionally provides proxy support.
Version      : 2.0.25
Author       : Microsoft Corporation
Help         : https://aka.ms/AA4xgy0
==============================================================================
Tool to install: .NET Core sdk version 2.2.301.
##[error]Failed to download or parse release-index.json with error: {"errno":"ETIMEDOUT","code":"ETIMEDOUT","syscall":"connect","address":"151.101.184.133","port":443}
Finishing: Use .NET Core sdk 2.2.301

I am getting the same error in our Private agent, Hosted agents it is working fine.

image

[error]Failed to download or parse release-index.json with error: {"errno":"ENOTFOUND","code":"ENOTFOUND","syscall":"getaddrinfo","hostname":"raw.githubusercontent.com","host":"raw.githubusercontent.com","port":443}

We are suddenly getting this error too.. Everything was working fine this morning.

We are suddenly getting this error too.. Everything was working fine this morning.

We're seeing it too.

We are seeing it as well. Worked fine this morning and the past 6 months

It's most likely due to ongoing issues at GitHub right now, see https://www.githubstatus.com/

I'm pretty sure it was GitHub as deckerbd mentioned. It started when the github problem started and resolved when they resolved it.

This issue just started happening this evening for me. Using version 2.* of the Use .NET Core task.
`Tool to install: .NET Core sdk version 2.1.500.

[debug]task result: Failed

[error]Failed to download or parse release-index.json with error: {}`

Please reopen

I just experienced this issue. I believe its still there. Please reopen

Task : Use .NET Core
Version : 2.165.2
Tool to install: .NET Core sdk version 3.x.

[error]Failed to download or parse release-index.json with error: {}

Just started experiencing this, azure devops server updated to current, using classic tasks but yaml looked like this.

steps:
- task: UseDotNet@2
  displayName: 'Use dotnet sdk 3.x'
  inputs:
    version: 3.x
    installationPath: '$(Agent.ToolsDirectory)/dotnet'

Solved it by adding 'sdk' to installation path. Guess the cache must've gotten corrupted or similar since it's been working from cache for some weeks(4-5) now.

this is happening again

We are seeing this too today, starting last night.

Happening with us now.

This is happening for us now too

happening again

This is now happening again

happening again

Happening also to us for the first time.

Same here. Happening as of this morning first time for us. Self Hosted Agent

Happening on Self Hosted Agent.

Same here. Happening on Azure Self Hosted Agent

Just wanted to note that the original post says the workaround is to add packageType: 'sdk' to the task's inputs... This exists already in my YAML configuration but the task is still failing.

This task fails based on Github dependencies. There's again an active Github availability issue. See https://www.githubstatus.com/

+1 to @frankkilcommins above. This task uses a github file for detecting SDK download path. That file is unreachable due to GitHub's unavailability.

@bishal-pdMSFT Does it make sense to have this dependency on github? Or at least have some sort of fallback?

@amirxnz agree. Pipelines aren't working at the moment.

+1

GitHub is having issues again. This happened yesterday as well and is disrupting development. @bishal-pdMSFT The workaround described in this ticket doesn't work. Should we start a different issue? All our .Net builds are failing and I know of no viable workaround.

Same...

We are seeing this issue now.

+1

+1

+1

Site says that fix has been deployed but I am still getting same error

+1

+1

+1

+1

+1

+1

+1

+1

Same here. +1

+1

+1

+!

We are having this issue suddenly today as well...

+1

Instead of '+1'-ing, I suggest a change in the UseDotnet task.

Why not caching the release list and use the old list when the new one can't be parsed or reached? A lot of the time the tools are cached anyways, so this might solve this issue for a lot of us.

cc @hiyadav, can this issue be opened again until it is really fixed?

+1. steel ave the same issue.

+1

Instead of '+1'-ing, I suggest a change in the UseDotnet task.

Why not caching the release list and use the old list when the new one can't be parsed or reached? A lot of the time the tools are cached anyways, so this might solve this issue for a lot of us.

cc @hiyadav, can this issue be opened again until it is really fixed?

Can you please elaborate how exactly to do this ?

I notice this is closed. The workaround does NOT work. Is there another open issue? By the way, I commented out UseDotNet@2 and it appears my pipeline succeeded.

+1

+1

Now it's working for me:
Before :
image

now:

image

btw it looks like the issue is resolved

working again.

Instead of '+1'-ing, I suggest a change in the UseDotnet task.
Why not caching the release list and use the old list when the new one can't be parsed or reached? A lot of the time the tools are cached anyways, so this might solve this issue for a lot of us.
cc @hiyadav, can this issue be opened again until it is really fixed?

Can you please elaborate how exactly to do this ?

First of all I don't know the details of the task....

In my opinion the following steps should be taken when running this task:

  1. Get the release list from github
  2. Parse the release list
  3. If successful, save the release list on the agent (tools directory, or the task directory, but this is where my knowledge of tasks lack)
  4. if parse was not successful, get the previously saved list and parse it.
  5. perform the rest of the tasks....

seems to be working now. the glitch is gone

seems to be working now

it recovered for me

works for me

In addition to what @dnperfors suggested with caching the releases-index.json file, perhaps mirroring it in a few other locations could also help? I believe the file is currently fetched from https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases-index.json - when the task was not working, this URL would return HTTP 500.

(I just noticed that @bishal-pdMSFT opened PR #12741 to avoid GitHub issues)

it recovered for me

I have seen this same issue today.

just got the same issue today as well

Seen today as well

Hello,
I have a similar error, I'm working on an automated tests pipeline on Azure to run on a Windows Self Hosted agent, my build pipelines are working, in this new pipeline, I have:

  - task: NuGetAuthenticate@0
    displayName: 'Authenticate with NuGet'

  - task: UseDotNet@2
    inputs:
      packageType: 'sdk'
      version: '3.1.101'
      installationPath: '$(Agent.ToolsDirectory)/dotnet'

  - task: DotNetCoreCLI@2
    inputs:
      command: test
      projects: 'src/myProject.Test.Core/*.csproj'
      testRunTitle: 'myProject'
      arguments: '--collect "Code coverage"'
      publishTestResults: true

I have this error: Failed to download or parse releases-index.json with error: {"code":"UNABLE_TO_GET_ISSUER_CERT_LOCALLY"}
As you can see in the logs:

##[debug]agent.proxyurl=http://proxy.myCie.com:443
##[debug]agent.proxyusername=undefined
##[debug]agent.proxypassword=undefined
##[debug]agent.proxybypasslist=["myCie.com,localhost,127.0.0.1","myCie.com","localhost","127.0.0.1"]
##[debug]agent.proxybypasslist=["myCie.com,localhost,127.0.0.1","myCie.com","localhost","127.0.0.1"]
##[debug]AZURE_HTTP_USER_AGENT=VSTS_xxx_build_173_0
Tool to install: .NET Core sdk version 3.1.101.
##[debug]task result: Failed
##[error]Failed to download or parse releases-index.json with error: {"code":"UNABLE_TO_GET_ISSUER_CERT_LOCALLY"}
##[debug]Processed: ##vso[task.issue type=error;]Failed to download or parse releases-index.json with error: {"code":"UNABLE_TO_GET_ISSUER_CERT_LOCALLY"}
##[section]Finishing: UseDotNet

I added the task "UseDotNet@2" because without it, I was having this:

##[warning].NET 5 has some compatibility issues with older Nuget versions(<=5.7), so if you are using an older Nuget version(and not dotnet cli) to restore, then the dotnet cli commands (e.g. dotnet build) which rely on such restored packages might fail. To mitigate such error, you can either: (1) - Use dotnet cli to restore, (2) - Use Nuget version 5.8 to restore, (3) - Use global.json using an older sdk version(<=3) to build 
##[debug]Processed: ##vso[task.issue type=warning;].NET 5 has some compatibility issues with older Nuget versions(<=5.7), so if you are using an older Nuget version(and not dotnet cli) to restore, then the dotnet cli commands (e.g. dotnet build) which rely on such restored packages might fail. To mitigate such error, you can either: (1) - Use dotnet cli to restore, (2) - Use Nuget version 5.8 to restore, (3) Use global.json using an older sdk version(<=3) to build 
##[debug]task result: Failed

I don't understand it as the build pipeline works, it seems it can't reach the releases-index.json file but again, as DotNet Core 5 is installed on the server, I'm confused.

Would you be able to help understand this and propose a solution or workaround ? Should I add a global.json file to the tests project ?

Thanks a lot for any help,
Claude

Was this page helpful?
0 / 5 - 0 ratings