GithubHelp home page GithubHelp logo

bitstadium / hockeysdk-windows Goto Github PK

View Code? Open in Web Editor NEW
89.0 39.0 61.0 13.17 MB

HockeyApp was retired and the SDKs are deprecated. Please use App Center instead.

Home Page: https://github.com/microsoft/appcenter-sdk-dotnet

License: MIT License

C# 99.80% CSS 0.07% PowerShell 0.01% Smalltalk 0.12%

hockeysdk-windows's Introduction

Test Status Build Status

HockeySDK for Windows

The official Windows SDK for the http://www.hockeyapp.com.

Feature Support

Platform Name Crash Reporting Beta Distribution Feedback Authentication Custom Events Usage Metrics
Windows 10 Universal Windows Platform (UWP)
Windows 8.1 (WinRT)
Windows Phone (Silverlight) 8.0, 8.1
HockeySDK.WPF 4.5
PCL

Onboarding Instructions

  1. Add nuget package:
Platform Nuget Package Manager Console Command
Windows 10 (UWP) Install-Package HockeySDK.UWP -Pre
Windows 8.1 (WinRT) Install-Package HockeySDK.WINRT -Pre
Windows Phone 8.1 (Silverlight), Windows Phone 8.0 (Silverlight) Install-Package HockeySDK.WP -Pre
WPF 4.5 Install-Package HockeySDK.WPF -Pre
  1. In App.xaml.cs file add the following line in usage declaration section:
    using Microsoft.HockeyApp;
  2. In App.xaml.cs file add the following line in App class constructor:
    Microsoft.HockeyApp.HockeyClient.Current.Configure(“Your_App_ID”);
  3. If you are using HockeySDK.WinRT or HockeySDK.WP, in App.xaml.cs add the following line at the end of the async void Application_Launching(object sender, LaunchingEventArgs e), or in OnStartup(StartupEventArgs e) for HockeySDK.WPF45.
    await HockeyClient.Current.SendCrashesAsync();
    Or if you want to send crashes automatically without asking for user confirmation:
    await HockeyClient.Current.SendCrashesAsync(true);
  4. Enable Internet(Client) Capability in package manifest.

Demo Applications

https://github.com/bitstadium/HockeySDK-WindowsDemo

Documentation

https://support.hockeyapp.net/kb/client-integration-windows-and-windows-phone

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Contributor License

You must sign a Contributor License Agreement before submitting your pull request. To complete the Contributor License Agreement (CLA), you will need to submit a request via the form and then electronically sign the CLA when you receive the email containing the link to the document. You need to sign the CLA only once to cover submission to any Microsoft OSS project.

Support

If you have any questions, problems or suggestions, please contact us at [email protected].

WinForms SDK

There is no official support for WinForms SDK. The code under https://github.com/bitstadium/HockeySDK-Windows/tree/develop/Src/Kit.WinForms45 was written by the community and is kept there for sharing purpose only. We tend to accept pull requests but with no validations and you should use it on your own risk.

hockeysdk-windows's People

Contributors

achocron avatar andreasmo avatar ashtom avatar brandonh-msft avatar dkackman avatar elamalani avatar guperrot avatar holgergubbels avatar izikl avatar iziklisbon avatar jakuboleksy avatar lumaxis avatar matkovivan avatar mihailsm avatar mihania avatar randomengy avatar rmaclean avatar rzhw avatar sandyarmstrong avatar schuettecarsten avatar scottisafool avatar sergei-nikitin avatar tapanila avatar theel0ja avatar thelakkatmadhav avatar threescreenstudios avatar wjkelley avatar yura-yaroshevich avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hockeysdk-windows's Issues

Suggestions when developing a new App with HockeySDK

We were originally looking at Application Insight to provide both crash reporting and telemetry analysis for an existing application. All the features are there and we are especially interested in the telemetry.

Looking at the preseason branch it seems that the entire SDK is going to be a carbon copy of the current Application Insight SDK. Would it be wise to target the Application Insight SDK for now and switch over later this year to HockeyApp after it has been merged with both Application Insight and Xamarin Insight?

Second question, could you provide a tentative timeline for HockeyApp and give an estimation when it will be feature par with Application Insight?

TelemetryClient is internal

Limited to only being able to track even data using the simple method inside the HockeyClient, which lacks a lot of the parameters available in the TelemetryClient.

Init.ps1 fails in VS2015

Init.ps1 seems to give an error report in the output tab for Package Manager:

You cannot call a method on a null-valued expression.
At C:\Users\Jesse Leskinen\.nuget\packages\hockeysdk.uwp\4.1.5\tools\init.ps1:3 char:1
+ $project.DTE.ItemOperations.Navigate('https://github.com/bitstadium/H ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

400 error bad request when sending crash - HockeySDK_WinForms45

Can you help me. Why this simple code throw 400 error bad request when sending crash?
Status is protocol error. I referenced HockeySDK_Portable45 and HockeySDK_WinForms45.
Can't send any crash ;/ Please guide me how can I fix it.

    static void Main()
    {
        HockeyClientWinFormsExtensions.Configure(HockeyClient.Current, "appid", false);
        Task task = HockeyClientWinFormsExtensions.SendCrashesAsync(HockeyClient.Current);
        task.Wait();
        var aggr = new AggregateException("AggregateExceptionFromDemoApp", new ArgumentException("TestArgumentException from DemoApp"), new InvalidOperationException("InvalidOperationException from DemoApp"));
        throw aggr;
        //Application.Run(new MainForm());
    }

WinForms platform doesn't work

WinForms platform doesn't contain IPlatformService implementation.
And call ServiceLocator.GetService<Services.IPlatformService>() in method SdkVersionPropertyContextInitializer.GetAssemblyVersion() throw an exception.

Implementation of IPlatformService like for WPF platform is missing.

AskUserForAgreementAsync throws NullReferenceException

File: HockeySDK-Windows\HockeySDK_WP81\Universal\CrashHandler.cs
Version: 2.2.2
Platform: WP8.1 Universal

AskUserForAgreementAsync does not handle the case where the user dismisses the message dialog using the back button on windows phone which means that ShowAsync returns null and the return clause will throw an exception

 SendCrashReportsAsync in App.xaml.cs:658 caught exception: System.NullReferenceException: Object reference not set to an instance of an object. at HockeyApp.CrashHandler.<AskUserForAgreementAsync>d__c.MoveNext() --- End of stack trace from previous location where exception was thrown
protected virtual async Task<bool> AskUserForAgreementAsync()
        {
            var messageDialog = new MessageDialog(LocalizedStrings.LocalizedResources.SendCrashQuestion, LocalizedStrings.LocalizedResources.CrashData);

            // Add commands and set their command ids
            messageDialog.Commands.Add(new UICommand(LocalizedStrings.LocalizedResources.Send, null, true));
            messageDialog.Commands.Add(new UICommand(LocalizedStrings.LocalizedResources.Delete, null, false));

            // Set the command that will be invoked by default
            messageDialog.DefaultCommandIndex = 1;

            // Show the message dialog and get the event that was invoked via the async operator
            var commandChosen = await messageDialog.ShowAsync();

            return (Boolean)commandChosen.Id;
        }

Exception when checking for updates

Good afternoon.

I am running an WPF app in Windows 7 64 bits with Visual Studio 2013, using HockeySDKCore 2.2.2 and HockeySDKWPF 2.2.2. Following this link http://support.hockeyapp.net/kb/client-integration-android-other-platforms/hockeyapp-for-windows-wpf-apps, I am trying to send crashes asynchronously and checking for updates.

The part of sending crashes asynchoronously is working fine but I am getting an Exception on the code related to check for updates. When I arrived to the code I get a NullReferenceException.
But even more, when I have a version to update I get the previous exception plus a RunTimeBinderException, where I am told that the HockeyApp.ResourceWrapper doesn't contain a definition for UpdateHeader.

Any tip of what can I be doing wrong?

Thank you

exceptiononstartupjpg
hockeyappcrashwhenneedtoupdate

WinRT: Unhandled exception will not be saved

If the application crashed and closed with an unhandled exception then the exception will not be saved. The cause is the async method HandleException in the class CrashHandler. If the application crashed then the application is not waiting for the asyc method. I removed temporary all async calls from the method HandleException and now all Exceptions are saved.

Issue with signing package

Hi!
As I need to sign my assembly and none of HockeyApp (HockeySDK.WPF.2.2.2) and HockeyAppPCL (HockeySDK.Core.2.2.2) have a strong name I need to add them a strong name.

For this, I sign your packages with the package StrongNaming https://www.nuget.org/packages/Nivot.StrongNaming/.

The problem after signing with StrongNaming is that I have realised that HockeyApp packages stop working. They throw an exception (which doesn't crash the app) and do nothing.

Can you give me any tip of how can I sign these packages?

Add ability to send handled exception similar to BugSense

Please, implement ability to manually send exception with attached extra data to HockeyApp.
This functionality is analogous to functionality from BugSense

LimitedCrashExtraDataList extrasExtraDataList = new LimitedCrashExtraDataList
{
  new CrashExtraData("TestApp1", "Log Exception Message1"),
  new CrashExtraData("TestApp2", "Log Exception Message2")
};
BugSenseLogResult logResult = BugSenseHandler.Instance.LogException(ex, extrasExtraDataList);

The descriptionLoader callback is not so convenient to use, because it can't access the context in which exception was thrown/handled to generate informative description.

As I can see there are internal (link)

internal void HandleException(Exception e)

method which is close to LogException from BugSense.

For my own purposes I've changed the definition of HandleException

public void HandleException(Exception e, string descriptionOverride = null)
{

    ICrashData cd = HockeyClient.Instance.CreateCrashData(e, this._crashLogInfo);

    if (!String.IsNullOrEmpty(descriptionOverride))
    {
        cd.Description = descriptionOverride;
    }
....

But I don't like this code, it has bad design and I need to use custom version of Hockey SDK. That is inappropriate in perspective.

Could you please implement a special API to send manually caught exceptions with ability to add extra data related to exception?

Unable to install HockeySDK.WP 4.1.5 into a Windows Phone 8.1 project in a PCL

When trying to install this I get "Install-Package : Could not install package 'HockeySDK.WP 4.1.5'. You are trying to install this package into a project that targets 'WindowsPhoneApp,Version=v8.1', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.". I know it is something to do with the targets but am unsure on what to edit in the package.

Support for logging events with custom parameters in UWP apps

Right now ("HockeySDK.UWP": "4.1.0-build65440") it's only possible to log events in UWP apps like this:
HockeyClient.Current.TrackEvent("folderSelected");

There is no option to log events custom parameters like:

{
"event":"folderSelected",
"params":{"name":"inbox"}
}

WinForms - use GetEntryAssembly when retrieving version

In HockeyPlatformHelperWinForms, the AppVersion property has the following code:

_appVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString();

This returns the version of the base HockeyApp assembly.

GetEntryAssembly will return the version of the application.

Inconsistent DateTimeOffset parsing from settings

UserContextInitializer casts userAcquisitionDate directly from object to DateTimeOffset

SessionTelemetryModule casts previousSessionEnd to a string and then calls DateTimeOffset.Parse

This requires an SDK (like WinForms) that is deserializing settings into dictionaries to store one as a DateTimeOffset and the other as a string in order to avoid an InvalidCastException during initialization.

If you agree this is awkward, I can rationalize and provide a PR but need to know which, or if some other, approach is preferred.

Error installing nuget package on a WinRT 8.1 project: Install-Package HockeySDK.WinRT

Here's the error message:

Install failed. Rolling back...
Install-Package : Could not install package 'HockeySDK.WINRT 2.0.4'. You are trying to install this package into a project that targets '.NETCore,Version=v4.5.1', but the
package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
At line:1 char:1

  • Install-Package HockeySDK.WinRT
  • - CategoryInfo          : NotSpecified: (:) [Install-Package], InvalidOperationException
    - FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
    

Calling HockeyClient.Current.Configure again should not crash the app

I just implemented this SDK for the first time on a WP 8.1 RT app, followed the instructions and placed the Configure call in the OnLaunched method in app.xaml.cs and I got this crash after navigating away and back to the app.

The exception thrown is from the AppIdentifier setter in HockeyClient.cs

An analytics/crash reporting SDK should never throw exceptions, especially when it would be easy enough to ignore and just log a warning or at the very least only throw those exceptions in debug mode.

HockeyApp is not a core functionality of an app, it's a library meant to help the developer. It doesn't help the developer if such a library causes crashes for end users

WinForms - need a way to chain exception handlers

Please provide a way to create application level exception handlers in addition to the ones created by HockeyAppClient.

The WPF implementation provides this using RegisterCustomUnhandledExceptionLogic.

sending telemetry at high scale

Say I have a very popular UWP application, which could in bursts more than 500 requests per second (which i think is the current limit).

My scenario is:
Send push notification and when received by all devices (e.g. hundreds of millions lets say) then they all send an event from the background task that is triggered. NotificationHubs can send something like 2 million push notifications a second.

Does hockeyapp support this scenario?
What should the code look like to support this scenario?
What happens when requests fail due to too many requests?

AsyncLock and HttpClient

In HockeySDK_Portable45 HockeyApp.Extensions.AsyncLock the following
return wait.IsCompleted ? m_releaser : wait.ContinueWith((_, state) => (IDisposable)state, m_releaser.Result, CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default);

The option TaskContinuationOptions.ExecuteSynchronously can cause deadlocks with HttpClient. This should only be used with short running operations. See:
https://msdn.microsoft.com/en-us/library/system.threading.tasks.taskcontinuationoptions(v=vs.110).aspx

HockeySDK.WinRT 4.1.3 removes stack trace and message

Nearly every crash I get on my app doesn't have a stacktrace or message.

I don't know if its just on WinRT but if you access the Property of an exception once it's "gone" on the 2nd access.

Back then, I had to use ExceptionDispatchinfo while sending the crashes to BugSense, then it worked, so maybe it could fix it in Hockey too?

AggregateException from TaskScheduler.UnobservedTaskException

image

This isn't helpful info, can we improve it ? Its got no stacktrace, it doesn't say what exceptions are in the agg exception. Let's serialize AggregateException better. App insights has classes that serialized this exception better, it would get out inner exceptions etc.

Also are we sure that unobservedtaskexceptions even crash the app? I thought they were just exceptions that are handled and wouldn't cause a crash.

Context here is UWP

Windows Phone 8.1 (WinRT) - Debug works, Release not

Is this a bug or by-design that the pre version isn't working in release mode?

Could not load file or assembly 'Microsoft.HockeyApp.Core45, Version=4.1.1.17552, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

If I build in debug mode, everything works.

DragMove crash

I am using the wpf version of sdk and have the crash report which seems to come from hockeyapp framework. User got this during version upgrade popup dialog when clicking several times with mouse.

OS: Windows
Windows: 6.3.10586.0
Date: 2016-02-10T21:17:40.9785015Z

System.InvalidOperationException: Can only call DragMove when primary mouse button is down.
at System.Windows.Window.DragMove()
at HockeyApp.Gui.UpdateWindow.<.ctor>b__9(Object param0, MouseButtonEventArgs param1)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Apps with HockeySDK WP 4.1.1 fails Store certification - CrossGen failed

I've added HockeySDK WP 4.1.1 NuGet to my Windows Phone 8.1 Silverlight app and since then I'm unable to submit it to Windows Store. The submission process fails with error code(s) 2001.

After chatting with Microsoft Support we've found out that there is indeed bug in the latest HockeySDK NuGet package - the "compilation in the cloud" fails with:

CrossGen failed
Error processing assembly D:\data\PkgProc\fBVQQ2ARnEa4yjqaJeiH8A\Extracted\Microsoft.HockeyAppKit.dll
Raw error code: 2148733978

This happens on VS2015 Update 3, UWP Tools 1.4.0 and NuGet 3.5.0.1484

Description longer than 32k causes internal exception

When a description is sent to the server, HockeySDK uses Uri.EscapeDataString() to escape it. Unfortunately, this method only supports 32k strongs (as written in MSDN, in fact it supports up to 64k), so longer descriptions cause in internal exception.

See #57 for a fix.

Send feedback with attachment and empty subject line gives wrong error message

If you try to send feedback from a Windows 8.1 device without a message, but with an attached file the following error is shown:

Could not send Feedback. Are you sure you're connected to the internet?

If you try to send without a message and without an attached file, a different (and presumably correct) error is shown:

Please enter a message or add an image as an attachment.

SendCrashesNowAsync can cause its own crash

HockeyApp just sent me this suspicious crash report:

System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread.
  at unknown location

Aggregated Exception [0]: System.IO.IOException: The process cannot access the file 'C:\Users\svishwanath\AppData\Local\HockeyCrashes\crashinfo_79bca321-59f1-4323-b09e-2a34fc4a0054.log' because it is being used by another process.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.File.InternalDelete(String path, Boolean checkHost)
   at System.IO.File.Delete(String path)
   at HockeyApp.CrashHandler.<SendCrashesNowAsync>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at HockeyApp.HockeyClientWPF.<SendCrashesNowAsync>d__0.MoveNext()

As you can see, this originated in the SendCrashesNowAsync method. I can think of a few reasons why a user might not have access to a specific report file. In this case, the SDK should fail gracefully, and attempt to send the reports the next time around.

Vague documentation for WP/WinRT/UWP apps

Some notes to the SDK documentation:

  • there is no mention how to initialize Windows Phone 8.1 WinRT (wpa81) apps in the guide even though HockeySDK.WINRT SDK supports them as well.
  • it's not clear if this line should placed in the App constructor on the first line, or after InitializeComponent() or it does not matter:
    HockeyClient.Current.Configure(“Your_App_ID”);
  • there is no SendCrashesAsync method in the HockeyClient SDK for WINRT and UWP (4.1.1-build10067). The guide suggest I need to use this call in WINRT apps.
  • there is no event Application.Launching in WINRT or UWP apps where I should place the call mentioned above.

HockeyClient.Current.Configure could not be found

I cannot execute
Microsoft.HockeyApp.HockeyClient.Current.Configure("abcdef");
because HockeyClient.Client returns IHockeyClient which does not contain definition of the Configure method.

This issue is new to HockeySDK for UWP 4.1.1.

AppDomain.Current.UnhandledException doesn't work with Windows Forms SDK

When configuring the HockeyApp Client with

HockeyApp.Current.Configure("myappid", false);

I never get log files written probably. I tried to debug this down, it seems that writing async to the file System in this case is throwing an unhandled system exception. After using SendCrashesAsync() I get this stack trace

   bei System.Runtime.Serialization.Json.DataContractJsonSerializer.InternalReadObject(XmlReaderDelegator xmlReader, Boolean verifyObjectName)
   bei System.Runtime.Serialization.XmlObjectSerializer.InternalReadObject(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver)
   bei System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver)
   bei System.Runtime.Serialization.Json.DataContractJsonSerializer.ReadObject(XmlDictionaryReader reader)
   bei System.Runtime.Serialization.Json.DataContractJsonSerializer.ReadObject(Stream stream)
   bei HockeyApp.Model.CrashData.Deserialize(Stream inputStream) in C:\src\HockeySDK-Windows\HockeySDK_Portable\Model\CrashData.cs:Zeile 197.
   bei HockeyApp.HockeyClient.Deserialize(Stream inputStream) in C:\src\HockeySDK-Windows\HockeySDK_Portable\HockeyClient.cs:Zeile 468.
   bei HockeyApp.HockeyClient.<SendCrashesAndDeleteAfterwardsAsync>d__96.MoveNext() in C:\src\HockeySDK-Windows\HockeySDK_Portable\HockeyClient.cs:Zeile 584.

This would make sense as the write throws an unexcpected exception.

When configuring the Client with

HockeyApp.Current.Configure("myappid", true);

Exceptions will be caught and swallowed and written correctly to disk. SendCrashesAsync() is sending those correctly afterwards.

It seems that Async file operations in the unhandled exception handler of the AppDomain in a Windows Forms app causing a Problem.

TaskScheduler.UnobservedTaskException: Should not log and exit on .NET 4.5

Issue #27 has only added an API for ignoring non-fatal UnobservedTaskException on WPF.

How should we go about this on the other platforms? Shouldn't adding a handler for UnobservedTaskException be configurable in the first place, instead of manually removing it after calling Configure()?

Even worse, on some platforms (e.g. Windows 8.1, Windows Phone 8.1), the SDK causes the app to exit (Application.Current.Exit();) though by default on .NET 4.5 the app would happily continue functioning without ever needing to crash.

winforms hocket

I see that you have an alpha untested winforms version of hockey, the nuget package however is not published. I have tried adding it as a manual local source but can't figure out how to install it.

Could you publish some instructions on how to import the winforms nuget package manually? I would like to trial and test it for you.

Thanks

HockeyClient.Flush null ref

In my UWP app, I call HockeyClient.Current.Flush when the app enters Background execution, like so:

private void OnEnteredBackground(object sender, EnteredBackgroundEventArgs e)
{
    using (e.GetDeferral())
    {
        HockeyClient.Current.Flush();
    }
}

This works well except when the app is opened and closed quickly. In this case, HockeyApp null refs on this line, despite HockeyClient.Current.IsTelemetryInitialized returning true.

Apps with HA SDK crashing on systems where FIPS-compliant algorithm policy is not being used

HA uses MD5CryptoServiceProvider and it's ctor may throw InvalidOperationException when "FIPS-compliant algorithm policy is not being used".

Relevant part of Event Log:

...
Exception Info: System.InvalidOperationException
   at System.Security.Cryptography.MD5CryptoServiceProvider..ctor()
   at Microsoft.HockeyApp.HockeyClientWPFExtensions.GetMD5Hash(System.String)
   at Microsoft.HockeyApp.HockeyClientWPFExtensions.get_AppIdHash()
   at Microsoft.HockeyApp.HockeyPlatformHelperWPF+<GetFileNamesAsync>d__10.MoveNext()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
   at Microsoft.HockeyApp.HockeyClient+<GetCrashFileNamesAsync>d__101.MoveNext()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
   at Microsoft.HockeyApp.HockeyClient+<AnyCrashesAvailableAsync>d__103.MoveNext()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
   at Microsoft.HockeyApp.HockeyClientWPFExtensions+<SendCrashesAsync>d__19.MoveNext()
...

Extend API to allow customizations of the send crash dialog

Currently SendCrashesAsync() does show a MessageBox, but there is currently no way to customize the dialog of that decision. It would be nice if HockeySDK would invoke a handler which then can display a more fancy dialog window and just return the user decision to send crash reports back to the HockeySDK.

AggregateExceptions should be unpacked for more clarity

AggregateExceptions, often thrown by Tasks, are logged successfully but because they are all rolled up they are of little use to a developer. All we'll see is:

System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread.

It would be great if these could be unpacked and the inner exception data was logged in a kind of recursive fashion. The same goes for exceptions that have a non-null InnerException property.

UWP: UnhandledExceptionTelemetryModule.CreateCrashTelemetry should handle AggregateException

When an unhandled exception is caught from Tasks, accoring to the following MSDN link, the exception might not contain a valid information or stack trace data:
http://stackoverflow.com/questions/32739013/stacktrace-reported-by-unhandledexceptioneventargs-exception-becomes-null-after

So we have some crashes like this:

Date/Time:       2016-11-21T13:22:45.159Z
OS Version:      Windows 10.0.14393.447
Report Version:  104

Exception Type:  System.AggregateException
Crashed Thread:  3

Application Specific Information:
TaskExceptionHolder_UnhandledException

There are no more information in the crash. So it might be helpful if UnhandledExceptionTelemetryModule.CreateCrashTelemetry would handle AggregateException and add stack traces and crash details from the inner exceptions of the AggregateException.

I also think that TaskScheduler_UnobservedTaskException should be unregistered from TaskScheduler.UnobservedTaskException in the Dispose method of this class.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.