Help with Exception Type: System.ArgumentNullException

I have a work flow that has completely working fine. With no changes, at least that I made, I started getting the Exception Type: System.ArgumentNullException.

image

My in_arg with their values:

What I have done:

  • I have ensured that all my arguments have values.
  • Tried to debug, but I cant because the work flow wont even start.

full error message:
Message: Value cannot be null.
Parameter name: source

Exception Type: System.ArgumentNullException

System.ArgumentNullException: Value cannot be null.
Parameter name: source   at System.Linq.Enumerable.Contains[TSource](IEnumerable`1 source, TSource value, IEqualityComparer`1 comparer)
   at System.Linq.Enumerable.Contains[TSource](IEnumerable`1 source, TSource value)
   at lambda_method(Closure , ActivityContext )
   at Microsoft.VisualBasic.Activities.VisualBasicValue`1.Execute(CodeActivityContext context)
   at System.Activities.CodeActivity`1.InternalExecuteInResolutionContext(CodeActivityContext context)
   at System.Activities.Runtime.ActivityExecutor.ExecuteInResolutionContext[T](ActivityInstance parentInstance, Activity`1 expressionActivity)
   at System.Activities.Variable`1.PopulateDefault(ActivityExecutor executor, ActivityInstance parentInstance, Location location)
   at System.Activities.ActivityInstance.ResolveVariable(Variable variable, ActivityExecutor executor)
   at System.Activities.ActivityInstance.ResolveVariables(ActivityExecutor executor)
   at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

Hi @Yomi_Oluwadara

This can occur when there’s a mismatch between the version of a package referenced in your project and the version that the project is trying to use during execution Check Package Versions,open the package manager Update or downgrade packages to ensure compatibility.

Check the below thread to get more info

You can also Make sure that IN/OUT argument is set with value and is passed properly to a variable in the workflow,
–to check whether the argument is assigned or not click on ARGUMENTS property in the property panel and not the import arguments as it will freshly import arguments without any value

@pravallikapaluri I have read that thread but still could not find a solution that works.

Also this is a library that I have not published, so no process is calling it as of now.

It means this error occures when launching the “Main” workflow?

Cheers

@J0ska
Thanks, any insights on how to troubleshoot?

You did not answer my question but I assume the answer “yes”.

In such case I would look for a problem in default values of variables defined at outer scope of the workflow - an example in the acreenshot

Cheers

Sorry, answer is Yes. I will go and check the scoping of these args.

No problem. Just let know if this was the root cause.
Cheers

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.