App doesn't start when deployed on the market - android

I have an app that works on my device while debugging on Android Studio. It works too when I generate the apk copy it to my phone and install it from there. But it doesn't work anymore if i install it from the market.
I just have an error message "Unfortunately, xxxxx has stopped". I checked the crash report in Google Play Console but I have 0 crash, at least for now... Is there a way to get some crash log or some clue to debug this ?

Install crashlytics or firebase crash dependencies and you'll be able to see the crash logs on their consoles. If you don't want that, you yourself can override the Thread.UncaughtexceptionHandler and set your custom handler as the default handler. Just Google how to do that as it's a lengthy thing to explain here.
Also if you are using proguard, firebase crash will need other configurations apart from just adding the dependency. Crashlytics handles this on its own.

Related

Crashlytics works on production but doesn't work on test

It's a weird situation. I have a react native app that has a test and production environment. On the production side, my app is correctly integrated with crashlytics. But when I try to integrate on test apk, I see only "App detected and we're waiting for a crash!"
SS
Test and prod use the same application, the only difference is google-service.json files. I've not found anything. Please help.
Some notes:
I've tried on emulator and physical devices.
When I try to see dashboard for prod build, I can see correctly.
I don't think that it is related by package versions(Because it works on prod). So I didn't put those.
I 've seen " Crashlytics automatic data collection DISABLED by API" with adb logcat -s FirebaseCrashlytics command
When running the app, if you see the "App detected and we're waiting for a crash!" message, that means that the SDK was able to connect with the back end. But something could be preventing the SDK from sending crashes.
The first thing to do would be checking if the mapping file contains the parameter firebase_crashlytics_collection_enabled and if it is set to false. Check this document.
If so, you can override this parameter opting in with the code:
Firebase.crashlytics.setCrashlyticsCollectionEnabled(true)

How to Upload Android APK to Fabric Beta

What I want?
I have an Android App that I want to upload to Fabric Beta.
How do I want it ?
I want to upload my Android App to Fabric Beta using Fastlane.
What goes wrong ?
After running my fastlane fastlane beta command, I get a nice report that everything is fine and I should see my app on Fabric dashboard:
[16:06:57]: Uploading the build to Crashlytics Beta. Time for some ☕️.
[[16:07:03]: Build successfully uploaded to Crashlytics Beta 🌷
[[16:07:03]: Visit https://fabric.io/_/beta to add release notes and notify testers.
But when I go https://fabric.io/_/beta, my app DOES NOT appear there !
What else did I try?
Tried the official integration doc. Installed the Fabric plugin on Android Studio.Logged in with my credentials,selected my app bundle identifier and always get throwed to credentials screen from the "All Kits" screen.Looks like a bug to me.Didn't find solution for that anywhere.
Did I try to integrate Fabrik SDK by hand and run the app ?
Yes I did, and the app still didn't appear in the Fabric dashboard.Didn't see any related errors in the logcat.
What about uploading using Gradle Plugin?
That one was tricky because I had to fix numerous errors and provide fabric.properties file with my credentials, but eventually got a promising message :
Task :application:crashlyticsUploadDistributionGoogleProdStagingAlpha
Uploading /Users/yanbraslavsky/booking-app/application/build/outputs/apk/googleProd/stagingAlpha/application-google-prod-stagingAlpha.apk to Crashlytics...
BUILD SUCCESSFUL in 6s
And still no app in the Fabric dashboard.
What do I want now?
I have an Android App that I want to upload to Fabric Beta...
Fabric/Firebaser here -
This issue was solved over the Fabric support channel! When attempting to upload a Beta distribution to Fabric, first make sure that the app is onboarded properly (visible on your dashboard at fabric.io). If it isn't, the above can happen where you still get a successful upload result without being able to view the distribution.
If you've included all the Fabric dependencies and are still having trouble seeing the app on your dashboard, try running a clean of the project, then building, waiting some time, and running the app. If you still can't see the app after a few minutes, reach out to the Fabric support address with your package name/bundle ID.
Also make sure that your build.gradle is properly configured if you have multiple build configurations. In this particular app, the issue was in the applicationIdSuffix of one of the build configurations. Finally, check that you've used the correct API key and build secret from the Fabric organization settings - this ensures that you have permission to upload the Beta distribution and puts it in the right place.

Why i can't enable crash report on Firebase?

I register on firebase and i followed the steps from Android studio everything looks fine, i found my app in firebase console and some stats for my app.
But the most important is to see when my app crash and i also want to get some info from variables before the crash, so from Android Studio again i add the the crash report but nothing happened, then i follow the steps on the site...still nothing.
When my app runs the test crash lines examples from firebase site it crashes also at firebase console at the crash section nothigh is appeared except the install in fabric & install in firebase options
I just needed to Update everything on Android Studio and make use of latest vesions.

How can I know whether user installed my .apk failed or successed?

Android will send a broadcast if the .apk install successful ,such as replaced,removed and added, but How can I get an message about .apk install failed?
This might help..
ACRA is a library enabling Android Application to automatically post their crash reports to a report server. It is targeted to android applications developers to help them get data from their applications when they crash or behave erroneously.Check this link for more...
https://github.com/ACRA/acra
Why dont you try integrating Google new Analytics feature "Firebase Analytics" into your app. Its simple and provides lots of information and Statistics about your App after user installation.
Its Firebase crashing reports Fatal and Non-Fatal crashes and also provides detailed information such as the device on which the crash occurred, the version of your app, the line number in which the crash happened and also the reason for the crash.
For more reference https://firebase.google.com/docs/analytics/ refer this documentation.
1 use the adb method install the apk
2 do the "adb install ..." in your code
3 return the status result if faile this is return like INSTALL_FAILED_OLDER_SDK INSTALL_FAILED_ALREADY_EXISTS INSTALL_FAILED_INVALID_APK
hope this is useful

Android - Tracking release build crashes / exceptions / ANRs'

How do I check for errors or log errors in release version of my app?
Activity crashes the app in release version but working in debug version. How do I check for errors?
You have a few options before you:
1. If your app is already live, then the Play Store records all exceptions thrown by apps on connected devices. Log into your Google Play Store account and see here.
2. If you need even more detail, the Google Play Services library has deeper support for crash analysis than what you normally get from the Play Store. See here.
3. You can add a support package like Crashlytics that will provide real-time analysis for apps in the wild.
4. Log.e(), Log.v(), Log.i() and Log.wtf() emit log messages even in release mode, and can be observed in the Logcat.
Add crash reporting libraries like ACRA to check error logs in release mode.
Here is link for ACRA library

Categories

Resources