Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled exception logging - Urgently needed #9989

Closed
Forestbrook opened this issue Sep 8, 2022 · 3 comments
Closed

Unhandled exception logging - Urgently needed #9989

Forestbrook opened this issue Sep 8, 2022 · 3 comments
Labels
platform/iOS 🍎 t/bug Something isn't working

Comments

@Forestbrook
Copy link

Forestbrook commented Sep 8, 2022

Description

We are close to release our Maui app on iOS to a lot of users, so we urgently need a way to log unhandled exceptions.

As I understand AppCenter is not (yet?) available for Maui, so I tried to implement basic logging myself.

But it seems there is currently no way to catch unhandled exceptions on iOS.

When running under the debugger the AppDomain.CurrentDomain.UnhandledException event is thrown as expected. But when running WITHOUT debugger the event seems not to be thrown.

Same with try/catch on UIApplication.Main.

Can this be fixed urgently please and/or is there another way to log unhandled exceptions?

Steps to Reproduce

  1. Build and run the MauiUnhandledExceptionTest project on an iPhone or iPad with debugger attached.
  2. Press the button "Show saved exception" => App shows "No exception data found".
  3. Press the button "Throw exception" and continue until the app is crashed.
  4. Restart the app WITHOUT the debugger attached.
  5. Press the button "Show saved exception" => App shows the thrown exception.
  6. Press the button "Throw exception" => App crashes.
  7. Restart the app
  8. Press the button "Show saved exception" => App shows "No exception data found".

Link to public reproduction project repository

https://github.com/Forestbrook/MauiUnhandledExceptionTest

Version with bug

6.0.400

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

iOS 15

Did you find any workaround?

No response

Relevant log output

No response

@Forestbrook Forestbrook added the t/bug Something isn't working label Sep 8, 2022
@Forestbrook
Copy link
Author

See also #8463 and #5535

@jingliancui
Copy link
Contributor

@Forestbrook
Alternative trying use Tencent bugly.
https://bugly.qq.com/v2/downloads

That nuget package I binded last year. Maybe too old, or you can bind the new version by yourself.
https://www.nuget.org/packages/XamarinLibrary.Xamarin.iOS.Tencent.Bugly

Hope it can help you.

@mattleibow
Copy link
Member

Duplicate of #8463

@mattleibow mattleibow marked this as a duplicate of #8463 Sep 8, 2022
@mattleibow mattleibow closed this as not planned Won't fix, can't repro, duplicate, stale Sep 8, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Oct 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
platform/iOS 🍎 t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants