Skip to content

Crashes get lost #130

Open
Open
@am3n

Description

@am3n

When the user is offline or server is stopped, and a crash occurs, the crash get lost!
After many tests and read the this sdk source code, i found the issue.
When an error occurs, the app stops quickly and the caching not apply..

https://github.com/Countly/countly-sdk-android/blob/dd79709acce513d4c8564fe06c66ab39d9a02de1/sdk/src/main/java/ly/count/android/sdk/CountlyStore.java

and i solved it temporarily by adding a long run Thread.UncaughtExceptionHandler to my App.kt class, to delay the stop time

val def = Thread.getDefaultUncaughtExceptionHandler()
val handler = Thread.UncaughtExceptionHandler { t, e ->
    sleep(500)
    def?.uncaughtException(t, e)
}
Thread.setDefaultUncaughtExceptionHandler(handler)

val config = CountlyConfig(this, countlyAppKey, countlyUrl)
...
Countly.sharedInstance().init(config)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions