0

I've developed an UWP app for a client: as we encountered some bugs that I can't reproduce on my device, we've implemented a crash reporting solution.

HockeyApp

In a first time, I used HockeyApp like this to use crash report:

HockeyClient.Current.Configure("xxxxxx",
  new TelemetryConfiguration() { EnableDiagnostics = true })
    .SetExceptionDescriptionLoader((Exception ex) =>
    {
      return "Exception HResult: " + ex.HResult.ToString();
    });

But as explained on another topic, the crashes were reported, but this didn't allow me to identify the problems as I didn't get enough details.

So as someone suggested I've uploaded the .pdb files from the Store to HockeyApp: but this time the symbols from the crashes and the .pdf files don't match.

I decided to use TrackEvent to analyze the problems. I've done somes tests on a function by adding:

Microsoft.HockeyApp.HockeyClient.Current.TrackTrace("MyViewModel - CheckUser()");

But the events are not reported in HockeyApp...

=> Would you have an explanation? Did I forgot anything? I will publish a new package on the Store and re-upload the .pdb files to HockeyApp, but I don't see what I could do else...

AppCenter

As AppCenter is now avaiable for UWP, I've done the same tests. I've implemented AppCenter like this:

AppCenter.Start("xxxxxx-xxx"
  , typeof(Analytics)
  , typeof(Crashes));

But unlike HockeyApp, crashes are not reported at all. AppCenter identifies well the app, as an entry is added on the "Crashes" tab with the current version number when the app is launched.

I also added Events with:

Analytics.TrackEvent("MyViewModel - CheckUser()");

But this time the events are well reported in AppCenter.

=> Did anyone ever use AppCenter for Crash Report on UWP? Is there anything else to add?

Conclusion

For now I have to use 2 tools, but it's not really helpful:

  • HockeyApp for crash report
  • AppCenter for Events

=>Do you have any other suggestions or tools that could help me?

Gold.strike
  • 1,269
  • 13
  • 47

2 Answers2

0

I decided to use TrackEvent to analyze the problems...But the events are not reported in HockeyApp...

If you want to use TrackEvent, you need to use TrackEvent() API instead of TrackTrace().

HockeyClient.Current.TrackEvent("Button Clicked");

You can check the custom events in your HockeyApp dashboard by log in your account -> click the app -> Events.

Notice that the custom event will not show immediately, usually it takes around 10-15 minutes. Also it has limits. see here.

As you mentioned, you need to upload the right .pdb files to HockeyApp dashboard, after that the crashes will be symbolicated.

It seems the app you uploaded is a store version.Therefore you need to download the .pdb files from Windows Dev Store. see here.

You can check whether it is a right one by comparing the Id of the.pdb and the Binary Image in your crash. For example,symbol I uploadBinaryImage of crash Both are e5502c5ddc5748a899a8182d8a52a659, it means the .pdb files are the right one.

Also in order to get symbolicated crashes, you need to make sure the crashes you made are from Store version (download from Windows Store).You cannot crash your app with the beta version or directly from Visual Studio with the .pdb from Store.

As for AppCenter, it is the next generation of HockeyApp and it is still in the preview. Crash reporting on windows now requires the app to be distributed through the Windows Store, crash for sideload is not supported yet. You can refer to the official doc here. However it will take place of HockeyApp in the long run, therefore you can wait for the official release of App Center.

  • Thanks for your feedback! Is there a way to use HockeyApp or AppCenter like `Debug.WriteLine(DateTime.Now.ToString("hh.mm.ss.ffffff") + ": xxxx");`? As I would like use TrackEvent to undestand why bugs occur, I need to be able to sort and order the traced events. I try to do it by adding a Dictionary containing the date as property (`new Dictionary { { "date", DateTime.Now.ToString() } }`), but this doesn't work... – Gold.strike Dec 07 '17 at 23:41
  • In Hockeyapp, you can track custom events with properties, but it will not show in HockeyApp dashboard, you need to bridge application insights and analyze data there. https://support.hockeyapp.net/kb/general-account-management-2/custom-events-with-application-insights. However if you use App Center, custom events with properties will show in App Center dashboard without bridge application insights. – Neal wang - MSFT Dec 08 '17 at 05:30
  • I first tried with properties for HockeyApp, but I didn't know that we can bridge Application Insights. I've done the same thing with AppCenter, but I didn't see the properties in the dashboard... Is there a way to "export" the traces from HockeyApp or AppCenter, or must I use Application Insights? – Gold.strike Dec 08 '17 at 06:13
  • If you use Hockeyapp and want to see the properties, application insights is a must. But for App Center, you can directly see the properties. You can see the properties when you log in your App center account->Analytics->Events – Neal wang - MSFT Dec 08 '17 at 06:59
0

We've also had the same issue as you but, good news, you can now use the AppCenter SDK also for crash reporting. https://learn.microsoft.com/en-us/appcenter/sdk/crashes/uwp. The way you've done it should work with the new version of the NuGet:

AppCenter.Start("xxxxxx-xxx" , typeof(Analytics) , typeof(Crashes));

I made a small test with a newer version of the NuGet than I did before, now 1.4 and I'm testing the

Crashes.GenerateTestCrash();

When you tried this in previous versions, the intellisense said that it wasn't yet available for UWP, but can now be executed.

Browsing the test crashes in the AppCenter portal however, displayed a "something went wrong on our end". This would probably "heal" overtime, but signals that the Crash reports in App Center indeed is still in preview.

I would also recommend using the Export feature to Application Insights to dig deeper in the logs.

jwweiler
  • 244
  • 4
  • 18