CrashlyticsInitProvider skipping initialization OR Settings request failed - android

I have a project which had crashlytics, fabric or whatever somewhere in the past. Now, when I'm trying to set it up once again and add this to manifest:
<meta-data
android:name="io.fabric.ApiKey"
android:value="my_key_which_came_from_previous_developer"
/>
I get the "CrashlyticsInitProvider skipping initialization" without any detailed description.
But if I remove the code above and add
<meta-data
android:name="my_key_which_came_from_previous_developer"
tools:node="remove"
/>
I get it somehow initialized BUT have the new problem -
I/System.out: [CDS][DNS]Unable to resolve host
"settings.crashlytics.com": No address associated with hostname
E/Fabric: Settings request failed.
So it either receives the settings or initializes the crashlytics. What do I do? Is there a way to completely remove and reinstall crashlytics for my application?

The problem was in proguard turned on and not properly configured to work with crashlytics. If the minifyEnabled option was set to "true" it wouldn't receive setting on the initial run. Nevertheless, it worked fine sending results if installed with proguard enabled.

Related

Cannot Find the Reported APM Logs on the Huawei Devices

When the Huawei APM SDK is integrated, there was no app performance data on the App performance management page. I wanted to locate the problem based on the Logcat logs on the device.
However, I'm not sure where these logs are kept or if I have to enable them in some way?
I checked the APM documentation and found out how to access the logs:
Open the AndroidManifest.xml file of the app, and add the meta-data element to the application.
<application>
<meta-data
android:name="apms_debug_log_enabled"
android:value=" true" />
</application>
After the APM debug log function is enabled, you can use the Logcat log filter function com.huawei.agc.apms or apms to view the logs.

Firebase Crashlytics not reporting crashes when manually enabled

Crashlytics works just fine without opt-in reporting. But it stops reporting anything as soon as I set up opt-in reporting according to the tutorial.
Specifically, I added the following content to AndroidManifest.xml
<meta-data
android:name="firebase_crashlytics_collection_enabled"
android:value="false" />
And I added the following into the onCreate:
Fabric.with(this, Crashlytics())
With a debugger, I am sure that the above line has been executed.
However, nothing is reported to the Crashlytics. Instead, the logger gives the following,
D/Fabric: Falling back to Crashlytics key lookup from Manifest
D/Fabric: Falling back to Crashlytics key lookup from Strings
D/Fabric: Generating Crashlytics ApiKey from google_app_id in Strings
D/Fabric: Using AdvertisingInfo from Preference Store
D/Fabric: Falling back to Crashlytics key lookup from Manifest
D/Fabric: Falling back to Crashlytics key lookup from Strings
D/Fabric: Build ID is: ...
D/CrashlyticsCore: Crashlytics is disabled, because data collection is disabled by Firebase.
D/Fabric: Initializing io.fabric.sdk.android:fabric [Version: 1.4.6.29], with the following kits:
com.crashlytics.sdk.android:crashlytics [Version: 2.9.7.29]
com.crashlytics.sdk.android:beta [Version: 1.2.10.27]
com.crashlytics.sdk.android:answers [Version: 1.4.5.29]
com.crashlytics.sdk.android.crashlytics-core [Version: 2.6.6.29]
D/Fabric: Not fetching settings, because data collection is disabled by Firebase.
D/Fabric: Falling back to Crashlytics key lookup from Manifest
D/Fabric: Falling back to Crashlytics key lookup from Strings
D/Fabric: Build ID is: ...
D/Fabric: Analytics collection disabled, because data collection is disabled by Firebase.
D/Fabric: Could not get parcel from Google Play Service to capture AdvertisingId
D/Fabric: Could not get parcel from Google Play Service to capture Advertising limitAdTracking
D/Fabric: AdvertisingInfo not present
D/Fabric: Asychronously getting Advertising Info and storing it to preferences
I have noticed this interesting line: D/CrashlyticsCore: Crashlytics is disabled, because data collection is disabled by Firebase. which is probably the cause of the issue. Yet I can't find any information about this log.
There is an issue with Firebase Crashlytics 2.9.7 preventing opt-in reporting as described in the documentation to work: the start of Crashlytics from code will not be performed.
For the time being downgrading to 2.9.6 will enable your code to work properly.
Please follow this answer
https://stackoverflow.com/a/59906454/6743289
For those wish to use crashlytics for their android app who haven't been using crashlytics of fiber.io, there are certain changes in the way you FirebaseApp is initialized which you will find in the above link.
Use following dependencies for android.
Paste it into build.gradle app:
implementation('com.crashlytics.sdk.android:crashlytics:2.9.6#aar') {
transitive = true
}
Upgrade it from 2.9.5 to 2.9.6.
It works for me.
Add this line into Application class
Fabric.with(this, Crashlytics())
Crashlytics 2.9.8 has been released which fixes the bug. I've tested to confirm. The changelog:
2.9.8 December 21, 2018
Fixed bug with firebase_crashlytics_collection_enabled flag that erroneously disabled data collection under some circumstances.
Initialization of app is not mentioned anywhere to get crashlytics report on our console!
Step 1. First follow the official doc's link to include all dependencies as it is given there and setup your firebase app through firebase console.
Step 2. Now do the following initialization in your base application class or base activity class.
FirebaseApp.initializeApp(getApplicationContext());
FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(true);
Now clean you project and do some force crash for few times, you should be able to see your crashlytics report on your firebase console

Firebase Crash Reporting, disable reports for debug builds

We are doing the beta-test of our android app this time. Is there any way to stop android emulators from sending crash reports to the Firebase Console?
First we have to look at the devices of each problem to manually close them because we don't see if the problem comes from developing/testing or from a beta-tester.
Use this in your custom Application class onCreate method:
FirebaseCrash.setCrashCollectionEnabled(!BuildConfig.DEBUG);
If you compile the debug APK for emulators you are fine
You can add a meta-data entry to the AndroidManifest.xml for your app to disable Crash Reporting at build time.
<meta-data android:name="firebase_crash_collection_enabled" android:value="false" />
Or you can disable by adding in Application or MainActivity,
FirebaseCrash.setCrashCollectionEnabled(false);
For more info check this link,
https://firebase.google.com/docs/crash/disable-sdk

Android Play Store Error -505

When uploading an APK to the Android Developer Console, everything goes normal, but there are a certain subset of users on android 5.0 and up that are unable to install or upgrade the APK. These users see a Google Play Store error 505.
There are several different resources that tell you that the 505 error is a conflict of permission. Starting in Android Lollipop, you are no longer able to have duplicate custom permissions with the same name https://developer.android.com/about/versions/android-5.0-changes.html#custom_permissions. If you check stackoverflow for this error you'll find multiple reports of people offering this as a solution. While this can sometimes be the cause of this error there are several other reasons that this, and other conflicts can happen.
1. More than one app defines the same permission
If two completely different apps define the same permission e.g if you have a user and a manager app, and both of them have something along the lines of:
<permission
android:name="same.package.name.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
2. Same app signed by different keys
You have the same app, but signed by different keys. For example if you had a release version and a debug version, you'll hit a conflict because the system sees this as two different apps requesting the same permission.
3. Conflicting authorities
But there is an entirely different situation that can occur, which is less obvious. The 505 error can also occur with conflicting authorities. If two different apps declare the same provider, such as
<provider
android:name=".provider.YourProvider"
android:authorities="com.roqbot.client.YourProvider"
android:exported="false" />
This can also provide a conflict.
The last, and hardest conflict to spot, is one that can happen with Google Play Services 8.1 and up. If you do not define an application id in your build.gradle file like this:
defaultConfig {
applicationId "com.example.my.app"
}
it is possible that it will auto-generate a provider that can conflict with other apps. To check this, go into your your build>intermediates>manifests>full>release>AndroidManifest.xml and look for
<provider
android:name="com.google.android.gms.measurement.AppMeasurementContentProvider"
android:authorities="com.google.android.gms.google_measurement_service"
android:exported="false" />
Here the authority name will conflict with other apps. If you add the applicationId to the default config, it will change this authority to
<provider
android:name="com.google.android.gms.measurement.AppMeasurementContentProvider"
android:authorities="com.example.my.app.google_measurement_service"
android:exported="false" />
This is very subtle and appears to be a bug starting in google play services 8.1. The issue can be seen discussed here. https://code.google.com/p/android/issues/detail?id=189079&can=1&q=error%20505&sort=-opened&colspec=ID%20Status%20Priority%20Owner%20Summary%20Stars%20Reporter%20Opened
The point to remember is that it may be several things, and the only thing you can verify for sure with a 505 error is that there is a conflict of some sort, and that it may or may not necessarily be a custom permission conflict.
If you are using the Facebook SDK and following the official sample code, you might also encounter the issue. In my case, I was using a same content provider name on 2 different app's manifest.
<provider
android:authorities="com.facebook.app.FacebookContentProvider123"
android:name="com.facebook.FacebookContentProvider"
android:exported="true" />
I forgot to change the default name com.facebook.app.FacebookContentProvider123. Finally fixed it by adding a dynamic applicationId as provider name.
<provider
android:authorities="com.facebook.app.FacebookContentProvider.${applicationId}"
android:name="com.facebook.FacebookContentProvider"
android:exported="true" />
Name Of The Error: Error 505
Problem: This is an unusual error code which is encountered during the updation or installation of the application from Google Play store. It shows up an error message stating “Unknown error code during Application installs 505”.
Following reasons are responsible for this error.
• It is mostly seen when you try to install an outdated version of the app.
• Error 505 can be caused due to the incompatibility of the app with your Android OS version.
• It can also arise due to cache conflict or data crash of the app.
• Error 505 may also arise due to Google Account Sync Problem.
Solution:
• At first restart your Android device, because this step usually works in getting rid off of any type of error. If it didn’t work and then try these simple steps.
• Clear Cache and Data of Google Play Store, Google Service Framework and Download Manager. To do this First of all go to Settings >> then Apps >> select All >> then Google Play Store and Clear cache and Clear data. Also Clear cache and Clear data for Google Services.

Android - "Unable to resolve host" - How to configure S3_UploaderActvity from Amazon AWS SDK samples?

I've followed Amazon's Getting Started guide, and (after Exporting the Amazon library, increasing the heap size available to Eclipse and adding the necessary permissions to the application manifest), I now have the sample S3_UploaderActivity Android app running.
However, when I try to upload an image I get this error message on my device's screen:
Unable to execute HTTP request: Unable to resolve host
"my-unique-namexxxxxxxxxxxxxxxpicture-bucket.s3-us-west-2.amazonaws.com": No address associated with hostname
Although this wasn't mentioned in the Getting Started guide, I presumably need to change the "my-unique-name" and "picture-bucket" strings (the latter which is stored in a constant called PICTURE_BUCKET).
But what do I change these values to??
Did you add the internet permission to your manifest file ?
<uses-permission android:name="android.permission.INTERNET" />

Categories

Resources