Skip to content
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

[BUG]: "Object reference not set to an instance of an object" error throwing by DownloadSecureFile task #4962

Open
1 of 4 tasks
mauriciomutte opened this issue Aug 27, 2024 · 10 comments

Comments

@mauriciomutte
Copy link

mauriciomutte commented Aug 27, 2024

What happened?

All pipelines that use the DownloadSecureFile task are failing with the error “Object reference not defined for an instance of an object” during the "Initialize job" step.

What did you do?

Upon noticing the issue, I investigated the error logs and identified that the problem consistently occurs during the "Initialize job" step whenever the DownloadSecureFile task is executed. I ran the pipeline in debug mode and extracted logs to gain more detailed insights into the failure (see it in "Relevant log output" section). I also reviewed recent changes to the pipeline configurations and dependencies that might have introduced this issue.

We did a test by removing the “DownloadSecureFile@1” step from the pipeline and the error didn't happen

What did you expect to happen?

I expected the pipeline to execute smoothly, with the DownloadSecureFile task successfully downloading the necessary secure files and proceeding to the subsequent steps without encountering any errors.

Versions

  • Azure DevOps agent 3.243.1
  • Ubuntu 22.04.4 LTS

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

No response

Version controll system

No response

Relevant log output

Prepare build directory.
##[debug]Creating build directory: '/home/vsts/work/1'
##[debug]Delete existing artifacts directory: '/home/vsts/work/1/a'
##[debug]Creating artifacts directory: '/home/vsts/work/1/a'
##[debug]Delete existing test results directory: '/home/vsts/work/1/TestResults'
##[debug]Creating test results directory: '/home/vsts/work/1/TestResults'
##[debug]Creating binaries directory: '/home/vsts/work/1/b'
##[debug]Creating source directory: '/home/vsts/work/1/s'
Set build variables.
Download all required tasks.
Downloading task: NodeTool (0.235.1)
##[debug]Task 'NodeTool' has been downloaded into '/home/vsts/work/_tasks/NodeTool_31c75bbb-bcdf-4706-8d7c-4da6a1959bc2/0.235.1'.
Downloading task: CmdLine (2.244.3)
##[debug]Task 'CmdLine' has been downloaded into '/home/vsts/work/_tasks/CmdLine_d9bafed4-0b18-4f58-968d-86655b4d2ce9/2.244.3'.
Downloading task: DownloadSecureFile (1.244.1)
##[debug]Task 'DownloadSecureFile' has been downloaded into '/home/vsts/work/_tasks/DownloadSecureFile_2a6ca863-f2ce-4f4d-8bcb-15e64608ec4b/1.244.1'.
##[error]Object reference not set to an instance of an object.
##[debug]System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.VisualStudio.Services.Agent.Worker.TaskManager.CheckIfTaskNodeRunnerIsDeprecated(IExecutionContext executionContext, TaskStepDefinitionReference task) in /mnt/vss/_work/1/s/src/Agent.Worker/TaskManager.cs:line 382
   at Microsoft.VisualStudio.Services.Agent.Worker.TaskManager.DownloadAsync(IExecutionContext executionContext, IEnumerable`1 steps) in /mnt/vss/_work/1/s/src/Agent.Worker/TaskManager.cs:line 100
   at Microsoft.VisualStudio.Services.Agent.Worker.JobExtension.InitializeJob(IExecutionContext jobContext, AgentJobRequestMessage message) in /mnt/vss/_work/1/s/src/Agent.Worker/JobExtension.cs:line 140
Finishing: Initialize job
@phmonte
Copy link

phmonte commented Aug 27, 2024

I believe it may have something to do with this implementation here

The download task does not have the "execution" field, DownloadSecureFileTask

@willianantunes
Copy link

It seems this PR solves it.

@juucustodio
Copy link

I have the same problem in all my Azure DevOps Pipelines

@jonathanpaul25
Copy link

I have the same problem in all my Azure Devops Pipelines.

1 similar comment
@neemias-carvalho-movti
Copy link

I have the same problem in all my Azure Devops Pipelines.

@mmrazik
Copy link
Contributor

mmrazik commented Aug 28, 2024

Sorry for the regression. We are working on a fix.

@mmrazik
Copy link
Contributor

mmrazik commented Aug 28, 2024

Thank you for great report! This helped us to identify this quickly. We rolled back a feature flag which is bypassing this faulty code path and it should be mitigated for all of you (I was able to repro and verify the fix in my pipeline).
We will do a proper fix and some repair items.

@willianantunes
Copy link

willianantunes commented Aug 28, 2024

@mmrazik why do we use fixed versions of all components in Azure DevOps if they can be broken by a change? Why Microsoft does not respect Semantic Versioning? Unacceptable. We had to waste a bunch of time replacing DownloadSecureFile with an in-house solution. Who will pay for it?

We are considering moving all pipelines to another plataform.

@willianantunes
Copy link

I thought it was new, but I found the following issue:

Unbelievable.

@ricardochaves
Copy link

A system maintained by Microsoft generates a very high expectation of high quality in those who buy this system.
This is not the first time that things stop working like this.
This latest problem shows that you do not have tests to guarantee quality.
You do not guarantee versioning.

I am curious to know what "production ready" means in the Azure Devops team.

I am seriously questioning why we are using this product here, tests with other competitors will begin in the company.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants