{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/AppCenter-SDK-DotNet/issues/613","repository_url":"https://api.github.com/repos/Microsoft/AppCenter-SDK-DotNet","labels_url":"https://api.github.com/repos/Microsoft/AppCenter-SDK-DotNet/issues/613/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/AppCenter-SDK-DotNet/issues/613/comments","events_url":"https://api.github.com/repos/Microsoft/AppCenter-SDK-DotNet/issues/613/events","html_url":"https://github.com/Microsoft/AppCenter-SDK-DotNet/issues/613","id":301655422,"number":613,"title":"Analytics.TrackEvent is broken after handling UnhandledException event in UWP App","user":{"login":"jsiemens","id":6842499,"avatar_url":"https://avatars3.githubusercontent.com/u/6842499?v=4","gravatar_id":"","url":"https://api.github.com/users/jsiemens","html_url":"https://github.com/jsiemens","followers_url":"https://api.github.com/users/jsiemens/followers","following_url":"https://api.github.com/users/jsiemens/following{/other_user}","gists_url":"https://api.github.com/users/jsiemens/gists{/gist_id}","starred_url":"https://api.github.com/users/jsiemens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsiemens/subscriptions","organizations_url":"https://api.github.com/users/jsiemens/orgs","repos_url":"https://api.github.com/users/jsiemens/repos","events_url":"https://api.github.com/users/jsiemens/events{/privacy}","received_events_url":"https://api.github.com/users/jsiemens/received_events","type":"User","site_admin":false},"labels":[{"id":441399559,"url":"https://api.github.com/repos/Microsoft/AppCenter-SDK-DotNet/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-02T05:12:02Z","updated_at":"2018-03-02T23:15:57Z","closed_at":null,"author_association":"NONE","body":"After handling an otherwise unhandled exception, Analytics.TrackEvent becomes broken.\r\n\r\nI handle an unhandled exception as so in App.xaml.cs:\r\n\r\n        public App()\r\n        {\r\n            this.UnhandledException += App_UnhandledException;\r\n        }\r\n\r\n        private void App_UnhandledException(object sender, UnhandledExceptionEventArgs e)\r\n        {\r\n            e.Handled = true;\r\n        }\r\n\r\nHenceforth, all calls to Analytics.TrackEvent generate the following message in the debug output:\r\n\r\n[AppCenter] ERROR: Error persisting log\r\nMicrosoft.AppCenter.Storage.StorageException: The operation has been cancelled\r\n   at Microsoft.AppCenter.Storage.Storage.PutLog(String channelName, Log log)\r\n   at Microsoft.AppCenter.Channel.Channel.<PersistLogAsync>d__39.MoveNext()\r\n[AppCenter] ERROR: Error persisting log\r\n\r\nThe events are indeed not persisted."},"comment":{"url":"https://api.github.com/repos/Microsoft/AppCenter-SDK-DotNet/issues/comments/370084266","html_url":"https://github.com/Microsoft/AppCenter-SDK-DotNet/issues/613#issuecomment-370084266","issue_url":"https://api.github.com/repos/Microsoft/AppCenter-SDK-DotNet/issues/613","id":370084266,"user":{"login":"guperrot","id":623672,"avatar_url":"https://avatars3.githubusercontent.com/u/623672?v=4","gravatar_id":"","url":"https://api.github.com/users/guperrot","html_url":"https://github.com/guperrot","followers_url":"https://api.github.com/users/guperrot/followers","following_url":"https://api.github.com/users/guperrot/following{/other_user}","gists_url":"https://api.github.com/users/guperrot/gists{/gist_id}","starred_url":"https://api.github.com/users/guperrot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guperrot/subscriptions","organizations_url":"https://api.github.com/users/guperrot/orgs","repos_url":"https://api.github.com/users/guperrot/repos","events_url":"https://api.github.com/users/guperrot/events{/privacy}","received_events_url":"https://api.github.com/users/guperrot/received_events","type":"User","site_admin":false},"created_at":"2018-03-02T23:15:57Z","updated_at":"2018-03-02T23:15:57Z","author_association":"MEMBER","body":"I can confirm the bug, we are shutting down channel and making sure logs are persisted before application exits in error. Except we can't know if exception is handled. We will discuss what we can do to support this scenario."}}
{"actor":{"display_login":"guperrot"}}