firebase-android-sdk: Firebase crashlytics not able to read crash reports. (Reopened)

[READ] Step 1: Are you in the right place?

Issues filed here should be about bugs in the code in this repository. If you have a general question, need help debugging, or fall into some other category use one of these other channels:

  • For general technical questions, post a question on StackOverflow with the firebase tag.
  • For general Firebase discussion, use the firebase-talk google group.
  • For help troubleshooting your application that does not fall under one of the above categories, reach out to the personalized Firebase support channel.

[REQUIRED] Step 2: Describe your environment

  • Android Studio version: 4.0
  • Firebase Component: Crashlytics
  • Component version: 17.1.0

[REQUIRED] Step 3: Describe the problem

This issue has been already discussed here: #1559 I work on this exact project, too. Unfortunately an updating of Crashlytics to 17.1.0 doesn’t solve our problem.

Steps to reproduce:

--------- beginning of main
--------- beginning of system
06-24 13:48:45.524 13846 13846 D FirebaseCrashlytics: Firebase Analytics is available.
06-24 13:48:45.532 13846 13846 D FirebaseCrashlytics: Firebase Analytics listener registered successfully.
06-24 13:48:45.585 13846 13846 D FirebaseCrashlytics: Reading cached settings...
06-24 13:48:45.591 13846 13846 D FirebaseCrashlytics: No cached settings found.
06-24 13:48:45.591 13846 13846 D FirebaseCrashlytics: No cached settings data found.
06-24 13:48:45.591 13846 13846 D FirebaseCrashlytics: Reading cached settings...
06-24 13:48:45.592 13846 13846 D FirebaseCrashlytics: No cached settings found.
06-24 13:48:45.592 13846 13846 D FirebaseCrashlytics: No cached settings data found.
06-24 13:48:45.598 13846 13846 D FirebaseCrashlytics: Mapping file ID is: 00000000000000000000000000000000
06-24 13:48:45.599 13846 13846 I FirebaseCrashlytics: Initializing Crashlytics 17.1.0
06-24 13:48:45.601 13846 13846 D FirebaseCrashlytics: Installer package name is: null
06-24 13:48:45.701 13846 13846 D FirebaseCrashlytics: Exception handling initialization successful
06-24 13:48:45.759 13846 14187 D FirebaseCrashlytics: Created new Crashlytics IID: 7b65b42aad28469381da761e64e57e35
06-24 13:48:45.760 13846 14187 D FirebaseCrashlytics: Opening a new session with ID 5EF32F8D02BD-0001-3616-C922BEA85160
06-24 13:48:45.819 13846 14187 D FirebaseCrashlytics: Initialization marker file created.
06-24 13:48:45.820 13846 14187 D FirebaseCrashlytics: Registered Firebase Analytics event receiver for breadcrumbs
06-24 13:48:45.820 13846 14187 D FirebaseCrashlytics: Finalizing previously open sessions.
06-24 13:48:45.822 13846 14187 D FirebaseCrashlytics: No open sessions to be closed.
06-24 13:48:45.822 13846 14187 D FirebaseCrashlytics: Closed all previously open sessions
06-24 13:48:45.823 13846 14187 D FirebaseCrashlytics: No reports are available.
06-24 13:48:45.824 13846 14187 D FirebaseCrashlytics: Initialization marker file removed: true
06-24 13:48:47.201 13846 14218 D FirebaseCrashlytics: Requesting settings from https://firebase-settings.crashlytics.com/spi/v2/platforms/android/gmp/1:580326590415:android:1154727c0cc42e34/settings
06-24 13:48:47.201 13846 14218 D FirebaseCrashlytics: Settings query params were: {instance=8a346df2d411511704ced7e4265e806526a142b3, build_version=4053, display_version=1.18.9, source=1}
06-24 13:48:47.596 13846 14189 D FirebaseCrashlytics: Received Analytics message: 3 Bundle[{params=Bundle[{_o=auto, _sc=LoginActivity, _si=7079824460424181625}], name=_vs, timestampInMillis=1592995727515}]
06-24 13:48:47.613 13846 14187 E FirebaseCrashlytics: Could not open log file: /data/user/0/com.freshbooks.andromeda.debug/files/.com.google.firebase.crashlytics/log-files/crashlytics-userlog-5EF32F8D02BD-0001-3616-C922BEA85160.temp
06-24 13:48:47.613 13846 14187 E FirebaseCrashlytics: java.io.FileNotFoundException: /data/user/0/com.freshbooks.andromeda.debug/files/.com.google.firebase.crashlytics/log-files/crashlytics-userlog-5EF32F8D02BD-0001-3616-C922BEA85160.temp.tmp: open failed: ENOENT (
No such file or directory)
06-24 13:48:47.613 13846 14187 E FirebaseCrashlytics:   at libcore.io.IoBridge.open(IoBridge.java:496)
06-24 13:48:47.613 13846 14187 E FirebaseCrashlytics:   at java.io.RandomAccessFile.<init>(RandomAccessFile.java:289)
06-24 13:48:47.613 13846 14187 E FirebaseCrashlytics:   at com.google.firebase.crashlytics.internal.log.QueueFile.open(QueueFile.java:221)
06-24 13:48:47.613 13846 14187 E FirebaseCrashlytics:   at com.google.firebase.crashlytics.internal.log.QueueFile.initialize(QueueFile.java:202)
06-24 13:48:47.613 13846 14187 E FirebaseCrashlytics:   at com.google.firebase.crashlytics.internal.log.QueueFile.<init>(QueueFile.java:117)
06-24 13:48:47.613 13846 14187 E FirebaseCrashlytics:   at com.google.firebase.crashlytics.internal.log.QueueFileLogStore.openLogFile(QueueFileLogStore.java:128)
06-24 13:48:47.613 13846 14187 E FirebaseCrashlytics:   at com.google.firebase.crashlytics.internal.log.QueueFileLogStore.writeToLog(QueueFileLogStore.java:52)
06-24 13:48:47.613 13846 14187 E FirebaseCrashlytics:   at com.google.firebase.crashlytics.internal.log.LogFileManager.writeToLog(LogFileManager.java:85)
06-24 13:48:47.613 13846 14187 E FirebaseCrashlytics:   at com.google.firebase.crashlytics.internal.common.CrashlyticsController$10.call(CrashlyticsController.java:636)
06-24 13:48:47.613 13846 14187 E FirebaseCrashlytics:   at com.google.firebase.crashlytics.internal.common.CrashlyticsController$10.call(CrashlyticsController.java:632)
06-24 13:48:47.613 13846 14187 E FirebaseCrashlytics:   at com.google.firebase.crashlytics.internal.common.CrashlyticsBackgroundWorker$3.then(CrashlyticsBackgroundWorker.java:106)
06-24 13:48:47.613 13846 14187 E FirebaseCrashlytics:   at com.google.android.gms.tasks.zzd.run(Unknown Source:5)
06-24 13:48:47.613 13846 14187 E FirebaseCrashlytics:   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
06-24 13:48:47.613 13846 14187 E FirebaseCrashlytics:   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
06-24 13:48:47.613 13846 14187 E FirebaseCrashlytics:   at com.google.firebase.crashlytics.internal.common.ExecutorUtils$1$1.onRun(ExecutorUtils.java:60)
06-24 13:48:47.613 13846 14187 E FirebaseCrashlytics:   at com.google.firebase.crashlytics.internal.common.BackgroundPriorityRunnable.run(BackgroundPriorityRunnable.java:27)
06-24 13:48:47.613 13846 14187 E FirebaseCrashlytics:   at java.lang.Thread.run(Thread.java:919)
06-24 13:48:47.613 13846 14187 E FirebaseCrashlytics: Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
06-24 13:48:47.613 13846 14187 E FirebaseCrashlytics:   at libcore.io.Linux.open(Native Method)
06-24 13:48:47.613 13846 14187 E FirebaseCrashlytics:   at libcore.io.ForwardingOs.open(ForwardingOs.java:167)
06-24 13:48:47.613 13846 14187 E FirebaseCrashlytics:   at libcore.io.BlockGuardOs.open(BlockGuardOs.java:252)
06-24 13:48:47.613 13846 14187 E FirebaseCrashlytics:   at libcore.io.ForwardingOs.open(ForwardingOs.java:167)
06-24 13:48:47.613 13846 14187 E FirebaseCrashlytics:   at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:8002)
06-24 13:48:47.613 13846 14187 E FirebaseCrashlytics:   at libcore.io.IoBridge.open(IoBridge.java:482)
06-24 13:48:47.613 13846 14187 E FirebaseCrashlytics:   ... 16 more
06-24 13:48:47.672 13846 14189 D FirebaseCrashlytics: Received Analytics message: 3 Bundle[{params=Bundle[{_o=app, _sc=LoginActivity, _si=7079824460424181625, timestamp=2020-06-24 10:48:47, content_type=SyncRefactoredBuild}], name=welcome, timestampInMillis=1592995
727433}]
06-24 13:48:47.676 13846 14187 E FirebaseCrashlytics: Could not open log file: /data/user/0/com.freshbooks.andromeda.debug/files/.com.google.firebase.crashlytics/log-files/crashlytics-userlog-5EF32F8D02BD-0001-3616-C922BEA85160.temp
06-24 13:48:47.676 13846 14187 E FirebaseCrashlytics: java.io.FileNotFoundException: /data/user/0/com.freshbooks.andromeda.debug/files/.com.google.firebase.crashlytics/log-files/crashlytics-userlog-5EF32F8D02BD-0001-3616-C922BEA85160.temp.tmp: open failed: ENOENT (
No such file or directory)
06-24 13:48:47.676 13846 14187 E FirebaseCrashlytics:   at libcore.io.IoBridge.open(IoBridge.java:496)
06-24 13:48:47.676 13846 14187 E FirebaseCrashlytics:   at java.io.RandomAccessFile.<init>(RandomAccessFile.java:289)
06-24 13:48:47.676 13846 14187 E FirebaseCrashlytics:   at com.google.firebase.crashlytics.internal.log.QueueFile.open(QueueFile.java:221)
06-24 13:48:47.676 13846 14187 E FirebaseCrashlytics:   at com.google.firebase.crashlytics.internal.log.QueueFile.initialize(QueueFile.java:202)
06-24 13:48:47.676 13846 14187 E FirebaseCrashlytics:   at com.google.firebase.crashlytics.internal.log.QueueFile.<init>(QueueFile.java:117)
06-24 13:48:47.676 13846 14187 E FirebaseCrashlytics:   at com.google.firebase.crashlytics.internal.log.QueueFileLogStore.openLogFile(QueueFileLogStore.java:128)
06-24 13:48:47.676 13846 14187 E FirebaseCrashlytics:   at com.google.firebase.crashlytics.internal.log.QueueFileLogStore.writeToLog(QueueFileLogStore.java:52)
06-24 13:48:47.676 13846 14187 E FirebaseCrashlytics:   at com.google.firebase.crashlytics.internal.log.LogFileManager.writeToLog(LogFileManager.java:85)
06-24 13:48:47.676 13846 14187 E FirebaseCrashlytics:   at com.google.firebase.crashlytics.internal.common.CrashlyticsController$10.call(CrashlyticsController.java:636)
06-24 13:48:47.676 13846 14187 E FirebaseCrashlytics:   at com.google.firebase.crashlytics.internal.common.CrashlyticsController$10.call(CrashlyticsController.java:632)
06-24 13:48:47.676 13846 14187 E FirebaseCrashlytics:   at com.google.firebase.crashlytics.internal.common.CrashlyticsBackgroundWorker$3.then(CrashlyticsBackgroundWorker.java:106)
06-24 13:48:47.676 13846 14187 E FirebaseCrashlytics:   at com.google.android.gms.tasks.zzd.run(Unknown Source:5)
06-24 13:48:47.676 13846 14187 E FirebaseCrashlytics:   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
06-24 13:48:47.676 13846 14187 E FirebaseCrashlytics:   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
06-24 13:48:47.676 13846 14187 E FirebaseCrashlytics:   at com.google.firebase.crashlytics.internal.common.ExecutorUtils$1$1.onRun(ExecutorUtils.java:60)
06-24 13:48:47.676 13846 14187 E FirebaseCrashlytics:   at com.google.firebase.crashlytics.internal.common.BackgroundPriorityRunnable.run(BackgroundPriorityRunnable.java:27)
06-24 13:48:47.676 13846 14187 E FirebaseCrashlytics:   at java.lang.Thread.run(Thread.java:919)
06-24 13:48:47.676 13846 14187 E FirebaseCrashlytics: Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
06-24 13:48:47.676 13846 14187 E FirebaseCrashlytics:   at libcore.io.Linux.open(Native Method)
06-24 13:48:47.676 13846 14187 E FirebaseCrashlytics:   at libcore.io.ForwardingOs.open(ForwardingOs.java:167)
06-24 13:48:47.676 13846 14187 E FirebaseCrashlytics:   at libcore.io.BlockGuardOs.open(BlockGuardOs.java:252)
06-24 13:48:47.676 13846 14187 E FirebaseCrashlytics:   at libcore.io.ForwardingOs.open(ForwardingOs.java:167)
06-24 13:48:47.676 13846 14187 E FirebaseCrashlytics:   at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:8002)
06-24 13:48:47.676 13846 14187 E FirebaseCrashlytics:   at libcore.io.IoBridge.open(IoBridge.java:482)
06-24 13:48:47.676 13846 14187 E FirebaseCrashlytics:   ... 16 more
06-24 13:48:47.789 13846 14218 D FirebaseCrashlytics: Settings request ID: null
06-24 13:48:47.789 13846 14218 D FirebaseCrashlytics: Settings result was: 200
06-24 13:48:47.791 13846 14218 D FirebaseCrashlytics: Writing settings to cache file...
06-24 13:48:47.794 13846 14218 D FirebaseCrashlytics: Loaded settings: {"settings_version":3,"cache_duration":86400,"features":{"collect_logged_exceptions":true,"collect_reports":true,"collect_analytics":false,"prompt_enabled":false,"push_enabled":false,"firebase_c
rashlytics_enabled":false},"app":{"status":"activated","update_required":false,"report_upload_variant":1,"native_report_upload_variant":2},"fabric":{"org_id":"5ebc1bdfbc0faa762c000003","bundle_id":"com.freshbooks.andromeda.debug"},"expires_at":1593082127791}

During an investigation of this issue we found that project used Crashlytics from Fabric. But this lib has been removed since Oct 2017. I’ve tried to enable crashlytics collection with: FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(true) and had no success. Also tried to use Fabric Crashlytics integration.

With initialisation:

val crashlytics = Crashlytics.Builder()
        .core(CrashlyticsCore.Builder().disabled(false).build())
        .build()
Fabric.with(this, crashlytics)

And manifest:

<meta-data
            android:name="firebase_crashlytics_collection_enabled"
            android:value="true" />

Had no luck. Got this:

D/CrashlyticsCore: Crashlytics is handling uncaught exception "java.lang.ArrayIndexOutOfBoundsException: length=2; index=10" from thread main
D/CrashlyticsCore: No log data to include with this event.
D/CrashlyticsCore: Closing open sessions.
D/CrashlyticsCore: Closing session: 5EF21C7400FD-0001-0AFA-1576EEFD14FC
D/CrashlyticsCore: Collecting session parts for ID 5EF21C7400FD-0001-0AFA-1576EEFD14FC
D/CrashlyticsCore: Session 5EF21C7400FD-0001-0AFA-1576EEFD14FC has fatal exception: true
D/CrashlyticsCore: Session 5EF21C7400FD-0001-0AFA-1576EEFD14FC has non-fatal exceptions: false
D/CrashlyticsCore: Collecting SessionStart data for session ID 5EF21C7400FD-0001-0AFA-1576EEFD14FC
D/CrashlyticsCore: Collecting SessionUser data for session ID 5EF21C7400FD-0001-0AFA-1576EEFD14FC
D/CrashlyticsCore: Collecting SessionApp data for session ID 5EF21C7400FD-0001-0AFA-1576EEFD14FC
D/CrashlyticsCore: Collecting SessionOS data for session ID 5EF21C7400FD-0001-0AFA-1576EEFD14FC
D/CrashlyticsCore: Collecting SessionDevice data for session ID 5EF21C7400FD-0001-0AFA-1576EEFD14FC
D/CrashlyticsCore: Removing session part files for ID 5EF21C7400FD-0001-0AFA-1576EEFD14FC
D/CrashlyticsCore: Opening a new session with ID 5EF21CD502E8-0002-0AFA-1576EEFD14FC
D/CrashlyticsCore: Crashlytics completed exception processing. Invoking default exception handler.
D/CrashlyticsCore: Attempting to send crash report at time of crash...
I/FirebaseInitProvider: FirebaseApp initialization successful
I/CrashlyticsInitProvider: CrashlyticsInitProvider skipping initialization
D/Fabric: Build ID is: 55269ff8-e7ff-49af-888a-64f6646833be
I/CrashlyticsCore: Initializing Crashlytics Core 2.7.0.33
D/Fabric: Using AdvertisingInfo from Preference Store
D/Fabric: Build ID is: 55269ff8-e7ff-49af-888a-64f6646833be
D/Fabric: Build ID is: 55269ff8-e7ff-49af-888a-64f6646833be
D/CrashlyticsCore: Found previous crash marker.
D/CrashlyticsCore: Exception handling initialization successful
D/Fabric: Initializing io.fabric.sdk.android:fabric [Version: 1.4.8.32], with the following kits:
    com.crashlytics.sdk.android:crashlytics [Version: 2.10.1.34]
    com.crashlytics.sdk.android:answers [Version: 1.4.7.32]
    com.crashlytics.sdk.android:beta [Version: 1.2.10.27]
    com.crashlytics.sdk.android.crashlytics-core [Version: 2.7.0.33]
D/Fabric: Build ID is: 55269ff8-e7ff-49af-888a-64f6646833be
D/Fabric: Reading cached settings...
D/CrashlyticsCore: Opening a new session with ID 5EF21CF3017D-0001-1892-1576EEFD14FC
D/Fabric: Loaded cached settings: {"settings_version":2,"cache_duration":86400,"features":{"collect_logged_exceptions":true,"collect_reports":false,"collect_analytics":false,"prompt_enabled":false,"push_enabled":true,"firebase_crashlytics_enabled":false},"analytics":{"url":"https:\/\/e.crashlytics.com\/spi\/v2\/events","flush_interval_secs":600,"max_file_count_per_send":1,"track_custom_events":true,"track_predefined_events":true,"track_view_controllers":false,"flush_on_background":true,"max_byte_size_per_file":8000,"max_pending_send_file_count":100,"sampling_rate":1,"forward_to_google_analytics":false,"include_purchase_events_in_forwarded_events":false},"beta":{"update_suspend_duration":1209600,"update_endpoint":"https:\/\/api.crashlytics.com\/spi\/v2\/platforms\/android\/apps\/com.freshbooks.andromeda.debug\/beta_update_check"},"app":{"identifier":"com.freshbooks.andromeda.debug","status":"invalid","url":"https:\/\/api.crashlytics.com\/spi\/v1\/platforms\/android\/apps","reports_url":"https:\/\/reports.crashlytics.com\/spi\/v1\/platforms\/android\/apps\/com.freshbooks.andromeda.debug\/reports","ndk_reports_url":"https:\/\/reports.crashlytics.com\/sdk-api\/v1\/platforms\/android\/apps\/com.freshbooks.andromeda.debug\/minidumps","update_required":false},"session":{"log_buffer_size":64000,"max_chained_exception_depth":16,"max_complete_sessions_count":4,"max_custom_exception_events":8,"max_custom_key_value_pairs":64,"identifier_mask":255},"prompt":{"title":"Send Crash Report?","message":"Looks like we crashed! Please help us fix the prob...","send_button_title":"Send","show_cancel_button":true,"cancel_button_title":"Don't Send","show_always_send_button":true,"always_send_button_title":"Always Send"},"expires_at":1593011702384}
D/Fabric: Returning cached settings.
D/CrashlyticsCore: Initialization marker file created.
D/CrashlyticsCore: Collection of crash reports disabled in Crashlytics settings.
D/CrashlyticsCore: Initialization marker file removed: true
D/Fabric: Using AdvertisingInfo from Reflection Provider

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 3
  • Comments: 51 (14 by maintainers)

Most upvoted comments

@erickjuarezglobant Glad to hear it! Another person in another thread had a similar issue, here’s my response to them, which I hope will clarify some things for you. 😃 https://github.com/firebase/firebase-android-sdk/issues/1952#issuecomment-736659812

Hi @FALL1N1dev, the collect_reports field in the settings response is the one that matters, and it is true in your case. So your configuration appears to be correct.

When the RuntimeException occurs, you should see FirebaseCrashlytics logging output that starts with “Handling uncaught exception…”. That is missing from the logcat that you shared, which leads me to suspect one of two issues:

  1. Are you using another SDK that overrides the default exception handler? One way to check this is to check the class type of the object returned by Thread.getDefaultUncaughtExceptionHandler().

  2. Are you throwing the exception from a process other than the main app, such as service? If so, FirebaseApp needs to be initialized in each process.

Let us know how it goes after checking those two things.

Hi @moetouban et al,

We’re still working through some lingering issues like this that are proving hard to pin down, so we definitely haven’t forgotten about you! 😃 As a quick follow-up: you’re not able to see any crash reports at all, correct? And you’ve tried it out on multiple devices?

To answer your most recent question though - that settings response is only relevant to the legacy Fabric Crashlytics SDK, it does not change any behavior in the current Firebase Crashlytics SDK. It always comes back “false” for any apps that have migrated to Firebase or apps newly created within Firebase.

You shouldn’t need to manually override setCrashlyticsCollectionEnabled, as true is the default - but it also doesn’t hurt anything. 😃

Hey @mrwillis21 we are still having issues for crashes not appearing on firebase dashboard but we got some crashes reported from time to time. In the last 30 days we only got 3 crashes appearing on the dashboard but other tools we use report much much more. We are in process of consolidating the tools we are using for analytics, crash and performance monitoring into one and we would like to know whether we can have this issue solved for us before taking a decision. Screenshot_20210127-203501.png

edit: I believe that I have found the cause in our case. On Application creation, we’re configure an observer of the user’s logged-in state. If the user is logged out, we clear all application data, including the directory that Firebase Crashlytics is writing to.

Since Firebase Crashlytics initializes using a content provider, the directory it writes to is created before our Application class. Then, when our application class is created, our logged-in state listener is initialized and receives the initial logged-out state, which deletes the directory that Crashlytics had just created. Adding File(application.getFilesDir(), ".com.google.firebase.crashlytics") to a whitelist of files not to be deleted on logout seems to resolve the issue for us.

Leaving the original post for posterity:


Unfortunately I am also experiencing a similar issue in that my crash reports are not making it to the Firebase Crashlytics dashboard. I’m seeing a similar log as https://github.com/firebase/firebase-android-sdk/issues/1711#issuecomment-649541024 immediately following a crash that I am forcing:

2020-10-13 18:03:23.390 20527-20527/obfuscated.app.id D/FirebaseCrashlytics: Crashlytics is handling uncaught exception "java.lang.RuntimeException: Forcing crash 002" from thread main
2020-10-13 18:03:23.410 20527-20613/obfuscated.app.id D/FirebaseCrashlytics: No log data to include with this event.
2020-10-13 18:03:23.432 20527-20613/obfuscated.app.id D/FirebaseCrashlytics: Could not persist event for session OBFUSCATED-SESSION-ID
    java.io.FileNotFoundException: /data/user/0/obfuscated.app.id/files/.com.google.firebase.crashlytics/report-persistence/sessions/OBFUSCATED-SESSION-ID/event0000000000_ (No such file or directory)
        at java.io.FileOutputStream.open0(Native Method)
        at java.io.FileOutputStream.open(FileOutputStream.java:287)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:223)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:171)
        at com.google.firebase.crashlytics.internal.persistence.CrashlyticsReportPersistence.writeTextFile(CrashlyticsReportPersistence.java:464)
        at com.google.firebase.crashlytics.internal.persistence.CrashlyticsReportPersistence.persistEvent(CrashlyticsReportPersistence.java:152)
        at com.google.firebase.crashlytics.internal.common.SessionReportingCoordinator.persistEvent(SessionReportingCoordinator.java:253)
        at com.google.firebase.crashlytics.internal.common.SessionReportingCoordinator.persistFatalEvent(SessionReportingCoordinator.java:122)
        at com.google.firebase.crashlytics.internal.common.CrashlyticsController$6.call(CrashlyticsController.java:395)
        at com.google.firebase.crashlytics.internal.common.CrashlyticsController$6.call(CrashlyticsController.java:388)
        at com.google.firebase.crashlytics.internal.common.CrashlyticsBackgroundWorker$3.then(CrashlyticsBackgroundWorker.java:106)
        at com.google.android.gms.tasks.zzf.run(Unknown Source:2)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
        at com.google.firebase.crashlytics.internal.common.ExecutorUtils$1$1.onRun(ExecutorUtils.java:60)
        at com.google.firebase.crashlytics.internal.common.BackgroundPriorityRunnable.run(BackgroundPriorityRunnable.java:27)
        at java.lang.Thread.run(Thread.java:764)
2020-10-13 18:03:23.433 20527-20613/obfuscated.app.id E/FirebaseCrashlytics: Tried to write a fatal exception while no session was open.

Interestingly, when I was attempting to debug how and when Firebase Crashlytics was being initialized in our app, I found that when I add a breakpoint (pausing only current thread) to the beginning of doOpenSession() in the decompiled CrashlyticsController.class and quickly resuming once the breakpoint is hit then crash reporting (including breadcrumbs, messages, etc.) seem to work again. Additionally, I no longer see the Could not open log file: ... error logged at initialization. I’m not sure if that’s helpful in diagnosing, but it seems to possibly indicate a race condition somewhere with async initialization.

Project details

  • Firebase Crashlytics (NDK): 17.2.1
  • Firebase Analytics: 17.6.0
  • Multi-module project
    • Firebase Crashlytics Gradle plugin applied in application module
    • Firebase Crashlytics (NDK) library included in base module
  • Recently migrated from Fabric Crashlytics
  • Devices tested:
    • Android 6 emulator
    • Android 8.1 emulator
    • Android 9 emulator
    • Pixel 4XL Android 11

Please let me know if I can provide any other information!