-
Notifications
You must be signed in to change notification settings - Fork 38
InsecureCookieAnalyzer: System.NullReferenceException error #54
Comments
Do you have complete stacktrace ? |
We've seen same error in our internal TFS builds (offline environment). There's no stacktrace from analyzer in logs. Can you please point me to some guide how to enable more detailed logs for analyzers during build process in order to create requested stacktrace? |
@vlm--- |
I am seeing a similar issue, with v2.3.0, installed yesterday (16 Feb 2017). Over 9000 instances of the message in my Error List (text/stack follows). Let me know how I can assist.
|
@leahey Could you provide a approximation of the method |
Certainly - it follows. However, be aware that this error is occurring on many different methods, not just Evaluate(). public GrekResponse<RemoResult> Evaluate( int id )
{
var result = new GrekResponse<RemoResult>();
var user = MyUser;
try
{
var remo = _remoService.Evaluate(user.GetUserProxyInfo(), user.User, id);
result.IsSuccess = true;
result.Data = remo;
}
catch ( UnauthorizedAccessException ex )
{
result.IsUnauthorizedAccessError = true;
LogError( () => string.Format( "{0} => {1}", ex.Message, ex.StackTrace ) );
}
catch ( Exception ex )
{
LogError( ex );
}
result.ErrorMessages = ModelState.ErrorMessages();
return result;
} |
It looks like my generics were mis-rendered. I'll attach a file instead. |
Additional info, I was creating a console app just for some testing, and I got for the following:
|
@leahey Sorry for the delay. |
Hello. Evaluate() has an HttpPostAttribute, but nothing else. |
Any developments on this? I'm having to filter out thousands of AD0001 warnings. |
@leahey I have created a test case that scan the two samples provided before. And it does not create any fault in the test environment and in integration in VS 2017. I will provide a debug extension that will try to isolate better the problem. I would have like to reproduce it so far this seems like the next step. |
Seeing another instance of a very similar error on a almost standard new web project in Visual Studio 2017 update 3 preview 6 using RoslynSecurityGuard 2.3.0.0.
Code that's causing the error:
|
Compiler error:
Warning AD0001 Analyzer 'RoslynSecurityGuard.Analyzers.CsrfTokenAnalyzer' threw an exception of type 'System.NullReferenceException' with message 'Object reference not set to an instance of an object.'.
The text was updated successfully, but these errors were encountered: