{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/ApplicationInsights-aspnetcore/issues/512","repository_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-aspnetcore","labels_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-aspnetcore/issues/512/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-aspnetcore/issues/512/comments","events_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-aspnetcore/issues/512/events","html_url":"https://github.com/Microsoft/ApplicationInsights-aspnetcore/issues/512","id":247407131,"number":512,"title":"Exception while initializing WebSessionTelemetryInitializer - NullReferenceException: Object reference not set to an instance of an object.","user":{"login":"davenewza","id":6212830,"avatar_url":"https://avatars2.githubusercontent.com/u/6212830?v=4","gravatar_id":"","url":"https://api.github.com/users/davenewza","html_url":"https://github.com/davenewza","followers_url":"https://api.github.com/users/davenewza/followers","following_url":"https://api.github.com/users/davenewza/following{/other_user}","gists_url":"https://api.github.com/users/davenewza/gists{/gist_id}","starred_url":"https://api.github.com/users/davenewza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davenewza/subscriptions","organizations_url":"https://api.github.com/users/davenewza/orgs","repos_url":"https://api.github.com/users/davenewza/repos","events_url":"https://api.github.com/users/davenewza/events{/privacy}","received_events_url":"https://api.github.com/users/davenewza/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-08-02T14:24:16Z","updated_at":"2017-11-03T22:15:35Z","closed_at":null,"author_association":"NONE","body":"The following trace message is logged in our Application Insights service occasionally and we are unable to reproduce it.\r\n\r\n> AI (Internal): [msg=Log Error];[msg=Exception while initializing Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.WebSessionTelemetryInitializer, exception message - System.NullReferenceException: Object reference not set to an instance of an object.\r\n>    at Microsoft.AspNetCore.Http.Internal.DefaultHttpRequest.get_Cookies()\r\n>    at Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.WebSessionTelemetryInitializer.UpdateRequestTelemetryFromPlatformContext(RequestTelemetry requestTelemetry, HttpContext platformContext)\r\n>    at Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.WebSessionTelemetryInitializer.OnInitializeTelemetry(HttpContext platformContext, RequestTelemetry requestTelemetry, ITelemetry telemetry)\r\n>    at Microsoft.ApplicationInsights.TelemetryClient.Initialize(ITelemetry telemetry)]\r\n\r\nWe are using `Microsoft.ApplicationInsights.AspNetCore 2.0.1`. \r\n\r\nCan anyone provide context as to why this might be happening?"},"comment":{"url":"https://api.github.com/repos/Microsoft/ApplicationInsights-aspnetcore/issues/comments/341840594","html_url":"https://github.com/Microsoft/ApplicationInsights-aspnetcore/issues/512#issuecomment-341840594","issue_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-aspnetcore/issues/512","id":341840594,"user":{"login":"cijothomas","id":5232798,"avatar_url":"https://avatars3.githubusercontent.com/u/5232798?v=4","gravatar_id":"","url":"https://api.github.com/users/cijothomas","html_url":"https://github.com/cijothomas","followers_url":"https://api.github.com/users/cijothomas/followers","following_url":"https://api.github.com/users/cijothomas/following{/other_user}","gists_url":"https://api.github.com/users/cijothomas/gists{/gist_id}","starred_url":"https://api.github.com/users/cijothomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cijothomas/subscriptions","organizations_url":"https://api.github.com/users/cijothomas/orgs","repos_url":"https://api.github.com/users/cijothomas/repos","events_url":"https://api.github.com/users/cijothomas/events{/privacy}","received_events_url":"https://api.github.com/users/cijothomas/received_events","type":"User","site_admin":false},"created_at":"2017-11-03T22:15:35Z","updated_at":"2017-11-03T22:15:35Z","author_association":"CONTRIBUTOR","body":"This can occur if the Context.Request is null for some reason here.\r\nhttps://github.com/Microsoft/ApplicationInsights-aspnetcore/blob/develop/src/Microsoft.ApplicationInsights.AspNetCore/TelemetryInitializers/WebSessionTelemetryInitializer.cs#L40\r\n\r\nFor .net framework SDK, this check is not done though. Will check if this is super rare or more common, and based on that, will do the fix."}}
{"actor":{"display_login":"cijothomas"}}