Build Information could not be retrieved (BadRequest)

I’m trying to create a release from a build step in Azure Pipelines. I’m getting the following error.

  • The Build Information was successfully created and pushed to Octopus in the previous build step.
  • I don’t think the work item error is the problem as I’ve gotten this all to work in the past and the Build Information stored in Octopus still had those errors on it.
  • I’ve given the Personal Access Token access to everything and I still get that error.
  • I do have a release notes template set up in Octopus, but I haven’t changed it since it all worked last.

The Create-Release output from the Azure Pipeline is as follows:

Creating release…
There was a problem with your request.

  • Build Information could not be retrieved
  • Azure DevOps: Error while fetching work item references from Azure DevOps: 401 (Unauthorized). Please confirm the Personal Access Token is configured correctly in Azure DevOps Issue Tracker settings, and is authorized to read scopes ‘Build’ and ‘Work items’.

Error from Octopus Server (HTTP 400 BadRequest)
Exit code: -7
##[error]Error: The process ‘C:\hostedtoolcache\windows\octo\7.4.3442\x64\octo.cmd’ failed with exit code 4294967289
##[error]Failed to deploy release The process ‘C:\hostedtoolcache\windows\octo\7.4.3442\x64\octo.cmd’ failed with exit code 4294967289

Hi @cvandenbout,

Thanks for getting in touch, and welcome! I’m sorry to see you’re hitting this roadblock suddenly.

If I understand correctly, it looks like the connection to Octopus is just fine as it’s pushing the build information correctly, but it’s only hitting this 401 error when Octopus is reaching back out to Azure DevOps to fetch the build information. My guess would be that perhaps your personal access token has just expired unexpectedly. My apologies if you’ve ruled that out, but could you confirm whether or not that’s the case here?

If that can be ruled out, would you be willing to send through the full build log so we can get a better look at the context around this issue? Feel free to mark this thread as private, or email that to support@octopus.com for privacy.

I look forward to hearing back!

Best regards,

Kenny

Hi Kenneth, thanks for reaching out.

The PAC is still good and it’s currently set to Full Access. We use Jira to track work items, not Azure DevOps, so maybe that’s an issue.

I’ve sent the full build logs to support@octopus.com.

Thanks

Hi @cvandenbout,

It’s interesting that you say you’re using Jira rather than Azure to track work items, as the error is coming from our Azure Work Item integration.

Within Octopus, if you navigate to Configuration > Settings > Azure DevOps Issue Tracker I am guessing that this will have some configuration entered and will be enabled.

Is it possible that someone else would have configured this to test it out without realising that it may impact release creation for other users?

If you don’t have any work items within Azure, then the easiest fix here would be to change the Is Enabled field to Disabled. This should allow your releases to be created again.
If this does need to be Enabled, then I would try updating the Personal Access Token here with the one you know is valid and has full access. Just in case it has been changed somehow.

Regards,
Paul

Oh, wow. Yeah that worked. It’s just odd because I’ve had it work fine in the past even with that error coming up. I’ll let it be for a while to make sure it’s working.

Thanks!

Hi @cvandenbout,

Thanks for the confirmation! Please let us know if you come across any questions or concerns in the future. :slight_smile:

Best regards,

Kenny