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 ?
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");
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.
I fixed this issue by adding firebase-settings.crashlytics.com to allow domain list in network-security-config
This may help
https://stackoverflow.com/a/70858796/8499308
Related
I have a issue with Firebase Function Integration, when I type :E:\APPS\Main Code\Android Code\app\GameRoom>firebase login
This is what I get:
? Allow Firebase to collect anonymous CLI usage and error reporting information? Yes
Visit this URL on any device to log in: https://accounts.google.com/o/oauth2/auth?client_id=563584335885-fgrh(...) Waiting for authentication…
Error: An unexpected error has occurred.
on debug debug Error: spawn cmd ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19) at onErrorNT (internal/child_process.js:456:16) at processTicksAndRejections (internal/process/task_queues.js:77:11)
I try with firebase login—no-localhost, but the same thing ,dosen’t work
If I click on the link I DON`T receive the message : Woohoo!
Firebase CLI Login Successful
You are logged in to the Firebase Command-Line interface. You can immediately close this window and continue using the CLI.
Thank you
If you're on windows then try running a separate cmd as admin and then use firebase login
I did setup for firebase in App messaging. Created campaign and my app can't deliver it.
In logcat I got following logs
2019-02-26 11:22:40.616 16131-16131/app.package.name I/FIAM.Headless: Starting InAppMessaging runtime with Instance ID ciy4xtnJqBQ
2019-02-26 11:22:42.153 16131-16131/app.package.name I/FIAM.Headless: Setting display event listener
2019-02-26 11:22:42.457 16131-16131/app.package.name I/FIAM.Headless: went foreground
2019-02-26 11:22:42.464 16131-16157/app.package.name I/FIAM.Headless: Forcing fetch from service rather than cache. Test Device: false | App Fresh Install: true
2019-02-26 11:22:42.472 16131-16157/app.package.name W/FIAM.Headless: Recoverable exception while reading cache: /data/user/0/app.package.name/files/fiam_impressions_store_file: open failed: ENOENT (No such file or directory)
2019-02-26 11:22:42.483 16131-16157/app.package.name I/FIAM.Headless: Fetching campaigns from service.
2019-02-26 11:22:42.999 16131-16157/app.package.name W/FIAM.Headless: Service fetch error: PERMISSION_DENIED: Requests to this API firebaseinappmessaging.googleapis.com method google.internal.firebase.inappmessaging.v1.sdkserving.InAppMessagingSdkServing.FetchEligibleCampaigns are blocked.
Setup
Android studio 3.3.1
com.google.firebase:firebase-inappmessaging-display:17.0.5
com.google.firebase:firebase-core:16.0.7
Firebase in app messaging API enabled in Google Cloud Console
What could be reason of?
2019-02-26 11:22:42.999 16131-16157/app.package.name W/FIAM.Headless: Service fetch error: PERMISSION_DENIED: Requests to this API firebaseinappmessaging.googleapis.com method google.internal.firebase.inappmessaging.v1.sdkserving.InAppMessagingSdkServing.FetchEligibleCampaigns are blocked.
The reason of the issue was restriction on API key for Android app. So InAppMessaging API was enabled for the whole project but it also require add InAppMessaging API to the specific platform API key restriction.
you have to add the firebase InApp Messaging permission to your Google Cloud API, can be done from the Google Cloud Console
I'm running my instrumented tests on Firebase Test Lab and want non-fatal exceptions to be reported to Crashlytics.
However, calling Crashlytics.logException() doesn't send the report immediately. After enabling core.debuggable(true) I see this when sending report:
D/CrashlyticsCore: Crashlytics is logging non-fatal exception "java.lang.Throwable: java.lang.Throwable" from thread main
But the report is not visible on Crashlytics dashboard until I restart the app, and then I see:
D/CrashlyticsCore: Checking for crash reports...
D/CrashlyticsCore: Found crash report /data/user/0/.../files/.Fabric/com.crashlytics.sdk.android.crashlytics-core/nonfatal-sessions/....cls
D/CrashlyticsCore: Attempting to send 1 report(s)
D/CrashlyticsCore: Adding single file ....cls to report ...
D/CrashlyticsCore: Sending report to: https://reports.crashlytics.com/spi/v1/platforms/android/apps/org.dasfoo.delern.instrumented/reports
D/CrashlyticsCore: Create report request ID: null
D/CrashlyticsCore: Result was: 202
I/CrashlyticsCore: Crashlytics report upload complete: ...
D/CrashlyticsCore: Removing report at /data/user/0/.../files/.Fabric/com.crashlytics.sdk.android.crashlytics-core/nonfatal-sessions/....cls
D/CrashlyticsCore: Checking for crash reports...
D/CrashlyticsCore: No reports found.
This is not ideal for production use cases, but it will at least work when user restarts the app. In tests, this never works because Firebase Test Lab does not restart the app (restarting the app means tests will fail).
Is there any workaround to allow Crashlytics to send non-fatal reports from the instrumented tests?
Used packages:
com.crashlytics.sdk.android:crashlytics:2.6.8#aar
io.fabric.tools:gradle:1.24.0
UPD: rephrased the question and title. I am looking for an option to alter Crashlytics default behavior, since it seems like a reasonable feature to have.
There isn't a way to report non-fatal events in the current session. The app needs to be restarted for non-fatal events to get reported to Crashlytics.
import com.google.firebase.crash.FirebaseCrash;
FirebaseCrash.report(new Exception("Error in CreateMobileAlertNative "+e.getStackTrace()));
I used to get non-fatal exception on crashlytics by using this FirebaseCrash class, I put some codes on my catch,via which i used to get those reports, try this once.
I added app link feature with autoVerify set for my app following link
On testing the app, it worked in the begining. Then after reinstalling the build, not working.
On debugging what I found is the response time for my .well-known/assetlinks.json file is > 1sec.
which gives timeout error on test-url https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://example.com&relation=delegate_permission/common.handle_all_urls
{
"maxAge": "599.999999353s",
"debugString": "********************* ERRORS *********************\n* Error: deadline_exceeded: Timeout occurred while fetching Web statements from https://example.com./.well-known/assetlinks.json (which is equivalent to 'https://example.com/.well-known/assetlinks.json') using download from the web (ID 1).\n********************* INFO MESSAGES *********************\n* Info: No statements were found that match your query\n"
}
Looks like because of this timeout, verification is failing.
I would like to know whether app/system retry verification at any point later if verification failed on install (may be because of connection issue or temporary website down)?
Unfortunately Android M does not automatically reattempt verification if it fails due to timeout or connectivity issues. As you found in this guide the next attempt will occur on app update or re-install.
I have been integrating Google Sign-In into an app as described at https://developers.google.com/identity/sign-in/android/start-integrating. Using https://developers.google.com/identity/sign-in/android/sign-in?configured as a model, I got sign-in working correctly with my debug keystore.
When I merged the pull request and attempted to switch configuration out for a new keystore for a release build, the sign-in process started to inexplicably fail. With a bit of digging, I found the same error detailed at New Google sign in Android.
Status{statusCode=unknown status code: 12501, resolution=null}
These posts led me to believe that perhaps I had configured the keys wrong. However, after double checking and creating a new keystore and configuration files several times, the error continued happening. I also manually checked the RSA1 for the keystore that signed my release APK. It is the one registered with Google. Finally, I noticed some errors in the log
W/SurfaceFlinger﹕ couldn't log to binary event log: overflow.
W/AccountChipsFragment﹕ Recording consent failed.
V/GLSActivity﹕ AuthDelegateWrapperCreated with selected intent: Intent { cmp=com.google.android.gms/.auth.DefaultAuthDelegateService }
V/GLSActivity﹕ AuthDelegateWrapperCreated with selected intent: Intent { cmp=com.google.android.gms/.auth.DefaultAuthDelegateService }
D/ConnectivityService﹕ updateNetworkScore for NetworkAgentInfo [WIFI () - 106] to 59
D/ConnectivityService﹕ rematching NetworkAgentInfo [WIFI () - 106]
V/BaseAuthAsyncOperation﹕ access token request failed
As it turns out, the suggestions in the answer I linked were correct. The problem was that the method I was using to inject the Server Client ID into the build worked for debug, but a typo caused it to fail in a release build, so my Server Client ID was actually null.