Skip to content
This repository has been archived by the owner on Sep 14, 2020. It is now read-only.

Reporting unhandled errors not working on non-debug env. #47

Closed
Andreyco opened this issue Dec 19, 2016 · 6 comments · Fixed by #51
Closed

Reporting unhandled errors not working on non-debug env. #47

Andreyco opened this issue Dec 19, 2016 · 6 comments · Fixed by #51

Comments

@Andreyco
Copy link

Andreyco commented Dec 19, 2016

Symptoms:
Having staging/release (or call it production) environment...

  • Bugsnag does not capture unhandled errors
  • Bugsnag does sent reports when notify is used.

All works as expected in development environment.

Possible source of this problem - default error handler.
What I understand, default error handler just shuts the app down - there is no time for Bugsnag to complete notification request.

Possible solution (maybe?)

  • pass control to default handler when request is resolved. Control would be passed with delay.
  • cache and send reports on next start (this would probably require passing control to default handler with delay anyway)

Notes:

  • despite I tested Android only, it affects iOS as well.
@Andreyco
Copy link
Author

Issue found. Without passing control to default error handler, I see error notification in Bugsnag Dashboard.

@Andreyco Andreyco changed the title [Android] Reporting unhandled errors not working on non-debug env. Reporting unhandled errors not working on non-debug env. Dec 19, 2016
@kattrali
Copy link
Contributor

Thanks for the detailed report, @Andreyco. This is potentially related to bugsnag/bugsnag-android#136, though I think your possible solution is correct, and the uncaught handler should wait for notify to complete. The next steps will be to add a callback to notify to ensure it is completed and also to move forward on the linked issue, to ensure that case is also handled. This is an android-specific issue since reports are written to disk synchronously when a crash occurs on iOS.

kattrali added a commit that referenced this issue Dec 22, 2016
This changeset adds support for static clearUser method and fix for
asynchronous fatal reports not being sent (#47)
kattrali added a commit that referenced this issue Dec 23, 2016
* Bump bugsnag-android version

This changeset adds support for static clearUser method and fix for
asynchronous fatal reports not being sent (#47)
@Andreyco
Copy link
Author

TY!

@vikeri
Copy link

vikeri commented Dec 26, 2016

Hmm, I still have this issue even though I updated to 1.2.0. Any ideas?

@borhub
Copy link

borhub commented Jan 11, 2017

@vikeri The root cause might be same as bugsnag/bugsnag-android#138 (regression in bugsnag/bugsnag-android#137 ) ? For which the corresponding code change in this repo could be 91db633 and the bump from 3.7.0 to 3.7.1 in #51 cc @kattrali

@vikeri
Copy link

vikeri commented Jan 11, 2017

@borhub Ok, is this fixed in 1.2.2?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants