microsoft / appcenter-sdk-dotnet

Development repository for the App Center SDK for .NET platforms, including Xamarin
Other
308 stars 141 forks source link

Manually sending Exceptions #140

Closed vimception closed 6 years ago

vimception commented 7 years ago

The Xamarin Insights SDK has the possibility to manually send an Exception object to the backend. This is very useful in cases where you are able to try/catch Exceptions from which you can recover (show message to user) but would like to have more insights into how and when these occur in a production app. I don't see that possibility in the current mobile center SDK. There is however the possibility to send a test crash (void GenerateTestCrash ();), so I don't see how it could be hard generalizing this to accept an Exception object. The only option I see at this point is to serialize the exception object and to send it as a Analytics event to the backend, which feels like a hack. Am I missing something, is this a feature on the roadmap or is this not considered?

Thanks.

ElektrojungeAtWork commented 6 years ago

@rodhemphill you might be interested in removing this from our public GH issue. ;)

rodhemphill commented 6 years ago

@TroubleMakerBen Ooops ...

jahmai-ca commented 6 years ago

@rodhemphill Don't worry, we're all friends, we can keep a secret ;-)

alexsorokoletov commented 6 years ago

+1 to Demystifier https://github.com/benaadams/Ben.Demystifier Also Xamarin Insights had a nice feature to track available memory on Android devices. Helped in several situations to figure out what's going on.

image

ElektrojungeAtWork commented 6 years ago

@alexsorokoletov that's another great feature request.

FYI: yes the SDK team's board has work items in "Active" and "Ready for work" this sprint. No ETA yet, but we're seeing the light at the end of the tunnel, folks!

alexsorokoletov commented 6 years ago

I hope this feature finally comes out. Meanwhile this is what we have to use. As you can see, data in events is being cut out. So that makes this "error reporting" kind of useful and kind of useless since not always top frame in stack trace makes sense.

Please either fix properties length in custom events or allow reporting custom exceptions.

screenshot 2018-01-12 10 44 08
elamalani commented 6 years ago

@alexsorokoletov App Center recommends using custom events to store exceptions only as a "temporary" workaround till we support handled exceptions.

We are actively working on handed exceptions support and the feature would be live soon.There is still no ETA yet. Once ready, we could give you early access if you'd like and you can share your feedback and help us fix issues.

alexsorokoletov commented 6 years ago

Thank you, @elamalani. I understand this is a workaround. I only wanted to share that this workaround is pretty limited by itself.

We all will be eager to get access to this feature. Thank you for your hard work, AppCenter team.

mikehachen commented 6 years ago

@elamalani I would love to be a beta tester of this feature! How can I apply?

Thank you for your help! Mike

elamalani commented 6 years ago

@alexsorokoletov @mikehachen Thanks for your help. We'll keep this thread posted once we are ready to give early access.

Immons commented 6 years ago

@elamalani honestly, how hard it is to add handled exceptions support? you have service for sending exceptions, so just add method "SendHandledException" to "Crashes" lib. Really, waiting over 1 year for such trivial thing, makes you look like incompetent fools.

elamalani commented 6 years ago

@Immons We understand that this feature was requested almost a year back. It took us long because of other commitment and priorities. To make this feature useful and meaningful, a lot more is going on from a service perspective than just adding a method.

That said, I promise that we are actively working on it since last few weeks. We are almost there and are left with some final tasks to make sure it works great end to end for being production ready. If you look at the product roadmap, this is the only feature listed for Crashes. Please wait for a few more weeks and this will be live for usage.

peteschmitz commented 6 years ago

Please wait for a few more weeks and this will be live for usage.

This is going to sound like a broken record, but for those of us using Insights, we need to roll out an RC with equivalent monitoring before that service becomes entirely defunct. Which happens to be "in a few more weeks".

At the very least, please give us a front-end interface to work with and worry about plugging it your end later.

blparr commented 6 years ago

Hello everyone, I have very good news for everyone in this thread! Handled Errors in Xamarin are now available for preview in App Center!

If you are interested in getting early access to this feature, please contact us via our support system (blue button on the right in the App portal), and we will enable the feature for your account. In this preview release, we are looking for your feedback and identification of any potential issues, so please talk to us and let us know what you think!

Thanks all for your patience on getting this feature ready! Have an amazing rest of your day.

Blanca

guperrot commented 6 years ago

Released in version 1.5.0 of the Nugets

WilliamABradley commented 6 years ago

@guperrot does this support UWP?

guperrot commented 6 years ago

Only Xamarin @WilliamABradley

guperrot commented 6 years ago

Keeping issue opened as UWP not supported and discussion still active here anyway.

EmilAlipiev commented 6 years ago

I think he meant that xamarin uwp or in another words, if exception occurs in shared library on xamarin forms app, is it logged also?

WilliamABradley commented 6 years ago

No I mean native UWP support :) Is this due to using the built-in Windows Reporting? Or the fact that .NET Native needs to be Symbolicated?

EmilAlipiev commented 6 years ago

xamarin UWP doesnt work obviously, I tried running my xamarin forms project in UWP and threw an exception in the shared library but it is not displayed anywhere. Tried running in android and also doesnt work. I tested both below but my Errors tab is empty. I already have a set up for crashes and works fine in Android

   Microsoft.AppCenter.Crashes.Crashes.TrackError(ex); 
 var extradata = new Dictionary<string, string>();
    Microsoft.AppCenter.Crashes.Crashes.TrackError(ex, extradata);
EmilAlipiev commented 6 years ago

Opp actually it works. It's just arrived 10 mins later. It displays as below.

image

device type is not detailed as xamarin insights though xamarin insights; image

app center: image

EmilAlipiev commented 6 years ago

There is a problem. I threw the exception 3 times; 2 times in debug mode 1 in release mode and exception in release mode isnt appearing. see the image below. it shows 3 total daily but 2 total count and 18mins ago (it should be 2 mins) last one.

All 3 are present in xamarin insights with full information

image

EmilAlipiev commented 6 years ago

When I want to update an exception from "Open" to "Ignore" or "Closed", it throws exception as below

image

elamalani commented 6 years ago

@EmilAlipiev Thanks for trying out this new feature and sharing your feedback. If you'd like to report bugs in handled exception, can you reach out to the team via support by clicking on the blue icon on the lower right of App Center portal?

guperrot commented 6 years ago

@EmilAlipiev UWP runtime (windows) is not supported, the shared/portable/.net standard library support that we offer is just to make it work with both Android and iOS (for example in Xamarin Forms for Xamarin runtime), but the API call will do nothing on a UWP application.

@WilliamABradley handled errors could work in the future for UWP independently of the windows error reporting, but symbols would then be a problem. I unfortunately am not able to communicate ETA or more on that feature at the moment.

WilliamABradley commented 6 years ago

@guperrot I thought that was half the reason for this request, since HockeyApp can do it, this should too, since this is supposed to have replaced Hockeyapp already. So the whole time of this being "in the works", was that just for Xamarin?

I really want to update my UWP apps to App Center, but this issue is holding me back completely.

asierpn commented 6 years ago

I'm in the same situation than @WilliamABradley , my app points to Xamarin iOS, Xamarin Android and UWP. If you want to make UWP a great platform for users and developers you should give it the same priority. Working with two analytical platforms is not desirable.

yaronlevi commented 6 years ago

Any update on when the feature will be ready? (Be able to manually send a JS exception to AppCenter).

guperrot commented 6 years ago

Hi, @yaronlevi we don't have any ETA on React-Native or Cordova platforms (we use different github repositories to track feature requests and issues for each of those: https://github.com/Microsoft/AppCenter-SDK-React-Native/issues and https://github.com/Microsoft/AppCenter-SDK-Cordova/issues).

This ticket is still open for UWP only as this is the .NET SDK repository.

amccorma commented 6 years ago

My errors are not showing up with Crashes.TrackError. If I look at the "log" I am seeing the error logged, but nothing shows up in Crashes.

Log:

3de43ce0 HANDLEDERROR - {"error_id":"da0d44c7-e4d3-4475-94e2-1143cde41dbf"} 17:29:13
3de43ce0 HANDLEDERROR - {"error_id":"ca732a79-bbaa-4b9d-b6eb-e918bb2bf6a3"} 17:29:14
3de43ce0 HANDLEDERROR - {"error_id":"f8e227ff-3dcc-49ba-a420-f0f92f919ddc"} 17:29:15
3de43ce0 HANDLEDERROR - {"error_id":"50fb4b85-052a-46fd-8b9c-4ff4c77b9c7b"} 17:29:15
3de43ce0 HANDLEDERROR - {"error_id":"0a698e4d-0376-4882-9f56-47f140d51965"} 17:29:15
3de43ce0 HANDLEDERROR - {"error_id":"d792e725-52cf-4523-bb26-b8199a152697"} 17:29:15
3de43ce0 HANDLEDERROR - {"error_id":"367ec9f0-9b58-4e13-9aa8-0e6eb578b7e8"} 17:29:16
3de43ce0 HANDLEDERROR - {"error_id":"f8471b4c-519c-4e88-b06d-a3788f505681"} 17:29:16
3de43ce0 HANDLEDERROR - {"error_id":"4f24a837-21b3-4714-8f2c-521a09343a69"} 17:29:16
3de43ce0 HANDLEDERROR - {"error_id":"52f98aec-6e85-4e7a-a232-4f9e33e2ff4b"
elamalani commented 6 years ago

@amccorma Can you please open a support ticket with us by clicking on the blue icon on lower-right of App Center portal? That will help our product team better investigate your issue. Thanks!

antony-scott commented 6 years ago

You need to get the feature enabled. Go to app centre and click the "chat" (blue) button, ask there. That's what I did and I now have an "errors" section just below crashes. That's where they all appear.

On 12 March 2018 at 19:08, amccorma notifications@github.com wrote:

My errors are not showing up with Crashes.TrackError. If I look at the "log" I am seeing the error logged, but nothing shows up in Crashes.

Log: 3de43ce0 HANDLEDERROR - {"error_id":"da0d44c7-e4d3- 4475-94e2-1143cde41dbf"} 17:29:13 3de43ce0 HANDLEDERROR - {"error_id":"ca732a79-bbaa- 4b9d-b6eb-e918bb2bf6a3"} 17:29:14 3de43ce0 HANDLEDERROR - {"error_id":"f8e227ff-3dcc- 49ba-a420-f0f92f919ddc"} 17:29:15 3de43ce0 HANDLEDERROR - {"error_id":"50fb4b85-052a- 46fd-8b9c-4ff4c77b9c7b"} 17:29:15 3de43ce0 HANDLEDERROR - {"error_id":"0a698e4d-0376- 4882-9f56-47f140d51965"} 17:29:15 3de43ce0 HANDLEDERROR - {"error_id":"d792e725-52cf- 4523-bb26-b8199a152697"} 17:29:15 3de43ce0 HANDLEDERROR - {"error_id":"367ec9f0-9b58- 4e13-9aa8-0e6eb578b7e8"} 17:29:16 3de43ce0 HANDLEDERROR - {"error_id":"f8471b4c-519c- 4e88-b06d-a3788f505681"} 17:29:16 3de43ce0 HANDLEDERROR - {"error_id":"4f24a837-21b3- 4714-8f2c-521a09343a69"} 17:29:16 3de43ce0 HANDLEDERROR - {"error_id":"52f98aec-6e85-4e7a-a232-4f9e33e2ff4b"

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Microsoft/AppCenter-SDK-DotNet/issues/140#issuecomment-372428272, or mute the thread https://github.com/notifications/unsubscribe-auth/ABr26ElgIIyTblq_lFdaUD1Jp9vHWW5rks5tdseagaJpZM4MIZ4K .

blparr commented 6 years ago

The feature is now enabled for everyone, so there's no need to request access any longer. You should be seeing your errors in the "Errors" tab under Diagnostics. If that's not the case, please contact us via support system as my colleague @elamalani indicated. Thank you!

amccorma commented 6 years ago

will open a ticket

guperrot commented 6 years ago

Hi, to everyone in this thread, if you get any problem with the feature on Xamarin, please create a support ticket on the portal directly using the blue chat button.

Let's leave this thread open only for visibility about UWP missing support.

asierpn commented 6 years ago

Since last week UWP crashes are not being symbolicated in HockeyApp, and their support has not responded to me in two days. I have an answer of a member of AppCenter of last Monday telling me to check the checksums of the uploaded symbols, which are all fine. So at this moment how can UWP developers resolve the issues of their apps? Is there any alternative that works?

lumaxis commented 6 years ago

@aesirpn Hey! I also just gave you an update in your support ticket. We are still investigating the exact root cause of the UWP symbolication issue which is unfortunately taking us longer than initially expected.

asierpn commented 6 years ago

@lumaxis thanks for the update, I'm calmer now.

padresmurfa commented 6 years ago

The Handled Errors preview is looking great, @blparr .

A search feature would be a most excellent addition. I'd really be happy to be able to search by date range and custom properties.

EmilAlipiev commented 6 years ago

It doesn't look great to me. still properties are truncated. this should be most important issue, I believe. I have reported that already more than 1 month ago. how hard to just extend it :)

ElektrojungeAtWork commented 6 years ago

Hi @EmilAlipiev,

thanks for the feedback. There will be a new SDK soon that increases the length of properties to match those of Xamarin Insights.

taori commented 6 years ago

@TroubleMakerBen praise the lord!

Kukkimonsuta commented 6 years ago

@TroubleMakerBen Could you check how InnerException is handled? I'm seeing message of inner exception on the list of errors but on detail and on all reports I see just the top most stuff. Error group #1574482851

guperrot commented 6 years ago

Hi @Kukkimonsuta. The thread is very long and we keep it open only to track missing features from Xamarin Insights like uwp or limits on properties.

For specific issues using the feature please create a support ticket using the blue chat button from any page of https://appcenter.ms.

rodhemphill commented 6 years ago

Hi @padresmurfa, you must be kidding, have you actually used it? I can't get the stack traces or the events leading up to the error, plus I've raised a support ticket requesting help ... a nice "hi, I'll find someone to help you" ... 2 weeks ago.

Hi @guperrot, we have some serious problem here with our app and I was hoping that this new error feature would at least give us the same facility as Insights. In fact it really is quite bad. We raised a support ticket and basically we had to turn off AppCenter and go back to Insight and put in a desperate effort to try and get the app stable before you close down Insights which will put us completely in the dark. I have raise a support ticket. I got no help. The "Error" feature doesn't work for us. What do we do now?

padresmurfa commented 6 years ago

yes, @rodhemphill, I have actually used it :)

It doesn't do everything I need out of the box, but with a little love and care its giving me most of the things I need. Pretty great work for a preview really, IMO.

I'm mostly just missing a search feature at the moment, and more properties would also be nice. Seems like only 5 are displayed in the UI.

I'm also seeing some timestamps in the future, so probably client timestamps are being used in some or all cases. It would be great use UTC instead. The client's time is nice to have as well for other purposes, but the UTC time is more important, e.g. for matching against server logs.

blparr commented 6 years ago

Hello, @padresmurfa We will have more properties as part of our next SDK release.

@rodhemphill I can't find your conversation in any of our open tickets, please open up a new one or send me an email at blparr at microsoft dot com and I'll make sure I find you help.

Regarding events before an error and others, we plan to improve the feature set in the coming months but we don't have an ETA we can share for that yet.

Thank you, Blanca

padresmurfa commented 6 years ago

Thanks @blparr :)

By the way, if you did have a search feature that could search by properties and show both errors and events, then people could use the property system to see the events before an error.

All that people would really need to do is put some sort of sessionId and sequence number in the custom properties, and voila, they're set.

I wouldn't be surprised if some wizard in your team could whip something like that up really fast using the Analytics\Events search function as a template.

Best regards, and thanks for keeping us posted!

rodhemphill commented 6 years ago

@blparr Thanks Blanca - will send you a detailed email.

@padresmurfa David, I'm not sure of a search feature, but it would be very helpful to me if you can confirm what you are seeing as I see very limited information. Without the events I have no idea how anyone can work out what a users was doing at the time of a crash so when I couldn't see a stacktrace I pretty much gave up. But if it works for you maybe I'm using it wrong:

What I get is a list of error groups. e.g. For an error group of: "Object reference not set to an instance of an object - System.Exception"

  1. Are you getting stacktraces?
  2. Are you seeing more than 2 error properties?