Skip to content

darc add-subscription crashes with NullReferenceException #1522

@natemcmaster

Description

@natemcmaster

Repro

  1. Follow the steps in https://github.com/dotnet/arcade/blob/master/Documentation/DependencyFlowOnboarding.md to setup darc.
  2. Run darc add-subscription
  3. Edit file to these contents and save the file.
Channel: .NET Tools - Latest
Source Repository URL: https://github.com/dotnet/arcade
Target Repository URL: https://github.com/aspnet/AspLabs
Target Branch: master
Update Frequency: everyDay
Merge Policies:
- Name: AllChecksSuccessful

Result
Darc fails to add the subscription with this error:

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.DotNet.Darc.Models.PopUps.AddSubscriptionPopUp.ValidateMergePolicies(List`1 mergePolicies) in C:\enlistments\arcade\src\Microsoft.DotNet.Darc\src\Darc\Models\PopUps\AddSubscriptionPopUp.cs:line 103
   at Microsoft.DotNet.Darc.Models.PopUps.AddSubscriptionPopUp.ProcessContents(IList`1 contents) in C:\enlistments\arcade\src\Microsoft.DotNet.Darc\src\Darc\Models\PopUps\AddSubscriptionPopUp.cs:line 152
   at Microsoft.DotNet.Darc.Helpers.UxManager.<>c__DisplayClass5_1.<PopUp>b__1(Object sender, EventArgs e) in C:\enlistments\arcade\src\Microsoft.DotNet.Darc\src\Darc\Helpers\UxManager.cs:line 69
   at System.Diagnostics.Process.OnExited()
   at System.Diagnostics.Process.RaiseOnExited()
   at System.Diagnostics.Process.CompletionCallback(Object waitHandleContext, Boolean wasSignaled)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
[1]    76357 abort      dotnet ~/Downloads/darcosx/Microsoft.DotNet.Darc.dll add-subscription

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions