question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DropDatabaseObjects - System.ArgumentNullException: Value cannot be null. Parameter name: source

See original GitHub issue

I get an occasional error listed below. I assume it occurs on line #370 in .SqlTableDependency`1.DropDatabaseObjects():

var dropMessages = string.Join(Environment.NewLine, _processableMessages.Select(pm => string.Format("IF EXISTS (SELECT * FROM sys.service_message_types WITH (NOLOCK) WHERE name = N'{0}') DROP MESSAGE TYPE [{0}];", pm)));

Should not it check for _processableMessages being null?

System.ArgumentNullException: Value cannot be null. Parameter name: source at System.Linq.Enumerable.Select[TSource,TResult](IEnumerable`1 source, Func`2 selector)
at TableDependency.SqlClient.SqlTableDependency`1.DropDatabaseObjects()
at TableDependency.SqlClient.Base.TableDependency`1.Stop()
at TableDependency.SqlClient.Base.TableDependency`1.Dispose(Boolean disposing)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
christiandelbiancocommented, Sep 6, 2018

Fixed in source code and in NuGet package version 8.5.2

0reactions
christiandelbiancocommented, Dec 8, 2018

Release v. 8.5.2 in Nuget available starting from Moday 10 December 2018. Regards.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Value cannot be null. Parameter name: source
Somewhere inside the DbContext is a value that is IEnumerable and is queried with Any() (or Where() or Select() or any other LINQ-method), ......
Read more >
Question - Value cannot be null. Parameter name: source
Hello, Please Help in this regard as I was very happy complete one phase of my work there was no error and everything...
Read more >
Value cannot be null parameter name:Source - Unity Forum
Question Argument Null Exception: Value cannot be null parameter name:Source.
Read more >
[Solved] Value cannot be null. Parameter name: source
Value cannot be null. Parameter name: source · 1. Change your parameter from user_Id to User_Id (Uppercase U) also try with string type...
Read more >
Why do I get an error "value cannot be null (Parameter ...
I am using the example code from https://learn.microsoft.com/en-us/answers/questions/299791/saving-to-appsettingsjson.html.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found