question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to report crashes using the new Firebase Crashlytics?

See original GitHub issue

In the new version of Firebase Crashlytics the function recordCustomExceptionName:reason:frameArray: is replaced by recordError.

See the following: https://firebase.google.com/docs/crashlytics/upgrade-sdk?platform=ios#recordcustomexceptionnamereasonframearray_is_replaced_by_recorderror

The alternative appears to be one of the following:

The ExceptionModel can be created using a name, reason, and stackTrace. This looks like the way to go but I cannot find a way to create a StackFrame using an address. The StackFrame only has a constructor for symbol, file, and line. Any ideas how to report the exception to Firebase now?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:6
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
Thomas-Voscommented, Sep 9, 2020

Firebase 6.32.0 fixes this issue:

class CrashlyticsCrashHandler: CrashkiosCrashHandler {
    override func crashParts(
        addresses: [KotlinLong],
        exceptionType: String,
        message: String
    ) {
        let exceptionModel = ExceptionModel(name: exceptionType, reason: message)
        exceptionModel.stackTrace = addresses.map {
            StackFrame(address: UInt(truncating: $0))
        }
        Crashlytics.crashlytics().record(exceptionModel: exceptionModel)
    }
}
1reaction
matteobianchi3commented, Sep 11, 2020

I have bitcode disabled. I’ve now added this script at the end of the build phases

# validation
"${PODS_ROOT}/FirebaseCrashlytics/upload-symbols" -val -gsp "${PROJECT_DIR}/${PROJECT}/GoogleService-Info.plist" -p ios -- "${DWARF_DSYM_FOLDER_PATH}"

# background upload
"${PODS_ROOT}/FirebaseCrashlytics/upload-symbols" -gsp "${PROJECT_DIR}/${PROJECT}/GoogleService-Info.plist" -p ios -- "${DWARF_DSYM_FOLDER_PATH}" > /dev/null 2>&1 &

and Crashlytics seems to be able to symbolicate custom Kotlin exception reports.

Using the simple “official” Crashlytics script "${PODS_ROOT}/FirebaseCrashlytics/run" doesn’t work since it only uploads the app’s dSYM and not the framework’s one.

Does all of this make sense to you?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Customize your Firebase Crashlytics crash reports - Google
This guide describes how to customize your crash reports using the Firebase Crashlytics SDK. By default, Crashlytics automatically collects crash reports ...
Read more >
iOS Firebase Crashlytics not showing up crashes in Dashboard
Launch your app from the home screen to run it without the debugger. Press the “Crash” button to trigger the crash. Run the...
Read more >
Crashlytics in the Firebase Console
Once you have Crashlytics up and running in your app, you can navigate to Crashlytics in your Firebase Console underneath 'Quality' and start...
Read more >
Using Firebase Crashlytics - FlutterFire
To send report data to Crashlytics, the application must be restarted. Crashlytics automatically sends any crash reports to Firebase the next time the ......
Read more >
Crash Report in Firebase Crashlytics - Javatpoint
By default, Firebase Crashlytics automatically collects crash reports for all app's users. We can use Opt-in Reporting by enabling more control over the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found