Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase Crashlytics : Settings request failed - After migrate from fabric

After I migrate to crashlytics from fabric, crash reports does not shown on Firebase console anymore. I followed upgrade document for migration.

I tried force crash to test and i logged with adb logcat -s FirebaseCrashlytics, I noticed an error with reading settings. FirebaseCrashlytics: Settings request failed.

09-29 16:09:56.619   683   721 D FirebaseCrashlytics: Requesting settings from https://firebase-settings.crashlytics.com/spi/v2/platforms/android/gmp/1:657730209335:android:0f0486036fa5647e/settings
09-29 16:09:56.619   683   721 D FirebaseCrashlytics: Settings query params were: {instance=23c94567f3a0450c2c4276ef9c4f083d3e073ab9, build_version=714012888, display_version=7.14.0.128, source=1}
09-29 16:09:56.641   683   721 E FirebaseCrashlytics: Settings request failed.

Here is my 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_crashlytics_enabled":false},"app":{"status":"activated","update_required":false,"report_upload_variant":2,"native_report_upload_variant":2},"fabric":{"org_id":"5e00a1546bfe67fb08000062","bundle_id":"com.univera.android"}}

firebase_crashlytics_enabled" status false in settings.

Crashlytics enabled on console.

I m using version 17.2.1 implementation 'com.google.firebase:firebase-crashlytics:17.2.1' and i enabled CrashlyticsCollection FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(true);

Why firebase_crashlytics_enabled" status false in my settings and whats wrong about settings request.

Does anyone see the raports on firebase console after migrate from fabric ?

like image 866
erkan demir Avatar asked Sep 29 '20 13:09

erkan demir


2 Answers

Your app must execute the following line to initialize Firebase at start-up:

FirebaseApp.initializeApp(getContext());

Also, you may want to set a user id so that crashes are tagged with the user id in the Firebase console:

FirebaseAnalytics mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);
mFirebaseAnalytics.setUserId("yourUserTag");
like image 58
matdev Avatar answered Sep 29 '22 22:09

matdev


I faced the same issue, having this error :

E/FirebaseCrashlytics: Settings request failed.
java.net.SocketException: socket failed: EPERM (Operation not permitted)

This was a device specific issue. I have this error on a Xiaomi Mi A3, but when I launched the app on an emulator I had no error and the crashes appeared well in crashlytics. There is no need to initialize Firebase in your code as matdev said.

Try running your app on a different device or emulator and see if the problem persists.

like image 32
lolo.io Avatar answered Sep 29 '22 21:09

lolo.io