Flutter and Android Release Mode - android

How I can find out crash logs in release mode in a flutter. In the android studio, I am not able to get crash logs where the app is going to crash.

You can't get logs in release mode. If you want to collect crash logs in release mode please check crashlytics(free) product in firebase. With this product, you can remotely receive logs without connecting mobile to your computer.

To easily get crash logs, you can embed Firebase into your project and enable crash reporting into your flutter project.
So after the subscription, you can go to CrashAnalytics from your Firebase console and be able to see crash logs.
For more information on how to set up Firebase into your flutter application, check here: https://firebase.google.com/docs/flutter/setup

Android studio has a logcat right at the bottom. Although you might see a lot of extra things you don't need, but if a major error occurs in your app it'll show up there. You can also search with the title of your app for more refined results.

One another option in Android studio is to select Run > Flutter Run 'Main.dart' in release mode from top menu. You can see all logs in console. Try putting a break point if you want.

Related

White screen in production of ionic capacitor android app

I am using Angular 11 and ionic 5 for my app. And it runs without any errors on my device from the android studio in development. But when I sign my code and upload it for internal or closed (Alpha, Beta) testing on playstore,I see my splash screen for less than half a second and then a blank white screen.
I am using Sentry to log errors so I can debug my app during production. But I see no error in sentry at this point.
So my question is, how can I figure out what is going wrong ?
White screen usually means that an there is an error!
What I think you should do:
Test using production mode on your device in android studio. You should see the error in the logs.
Use a 3rd party like Browserstack to upload your app and see if you get any errors.
Check if you first ask for permissions before you use any device native functionality
If you still cant find the error, update all your libraries to the latest version
If nothing else works, start deleting/commenting parts of the app until it finally works. Start with the 3rd party plugins or push notifications, then any ionic plugin. Using this you should be able to identify where the problem is.

react-native-firebase crashlytics not showing up on firebase dashboard

I am using firebase crashlytics. I am causing a crash by doing
firebase.crashlytics().crash()
and I am not seeing the crash report on the firebase dashboard. The crash is working because on android i get this screen
and on ios the app freezes and i get brought to this page on xcode
But on the crashlytics dashboard on firebase the crashes are not showing up.
Is there any reason why the crashes are not showing up on crashlytics dashboard? I am using react-native-firebase. I know i installed it correctly because I tried causing the crashes natively on android with java and I am able to see the crash on crashlytics.
TL;DR: run react-native run-android --variant=release for Crashlytics to begin working properly, assuming you've set everything up correctly (which it certainly appears you have since firebase.crashlytics().crash() is crashing your application.)
Please note - in order for react-native run-android --variant=release to function properly, you will have needed to configure your APK for release builds according to the directions here: https://facebook.github.io/react-native/docs/signed-apk-android
I've never been happier to see my crash free users rating decrease :)
Let me know if you have any questions! Setting up signing can be a little confusing, so let me know if you have any questions.
This is a very frustrating issue, but fortunately, I've found the solution and I'm in exactly the same boat you are.
See that big red screen? That's React Native's way of telling you, during development, that you've made some kind of mistake. What isn't immediately obvious is that this red screen prevents errors from making it through to our error reporting tools. Running your app in release mode will prevent React Native from showing that red screen, and your error reporting tools will be able to report crashes.
As Gian has pointed out in another answer to this question, it appears that firebase.crashlytics().crash() is not functioning properly. However, this isn't quite true. Whenever you are operating in debug mode (anytime you can see the red screen, you're in what I'm calling debug mode), Crashlytics and other crash reporting tools cannot catch Native Exceptions, but they can catch Javascript exceptions.
Once you run the application in release mode as I’ve described above, Crashlyitcs will be able to catch Native Exceptions. If you look into Crashlytics.crash(), it’s actually an crash intentionally written in Java. In order for Crashlytics to actually ‘hear’ that the application is crashed due to a Native Exception, you have to be running in release mode, not debug mode.
Sorry for beating the dead horse down here, but I’ve been looking into this issue all morning and felt it pertinent to share this information to others suffering the same fate as I was.
In iOS you need to unlink the app from Xcode so that it doesn't freeze when a crash occurs.
Build the App.
Stop the project in Xcode without terminating the simulator or
device.
Then you can crash without Xcode freezing.
Reopen the app so that Firebase can send the crash report.
For more details on this, see here in the Firebase documentation.
It will definitely help you
Go to Edit Scheme
Run -> Info
Change the Build Configuration to release.
Now run the App
And crash your app manually. Now you can check on your crashlytics dashboard
Try this as well
Launch your simulator/iPhone
Press stop
Launch your app and force a crash
Relaunch the app from simulator/iPhone
See the crash report in the crashlytics dashboard.
firebase.crashlytics().crash() its not working properly.
I purposely made a bug to simulate a crash when i tap a button and that crash was caught and shown in the Crashlytics Dashboard inmediately.
Ej: I work with React Native so i changed a this.props.etc... to this.state.etc...
to create an "undefined is not a function exception".
Hope it helps!
which version of #react-native-firebase/crashlytics do you have on your package.json?
you'll need to use one of the versions released after June 2020 because otherwise it doesn't have the Fabric removal change. For example, I have to update to
"#react-native-firebase/app": "11.2.0",
"#react-native-firebase/crashlytics": "11.2.0",
Here you can check versions available:
https://www.npmjs.com/package/#react-native-firebase/crashlytics
its stupid from Firebase Teams, but the solution is :
1- Force the crash
2- Launching the app with ide or cli
3- stop launching app from ide or cli
4- launch the app from smilator like user normal
And you will see the crashs in firebase console.

android - approach to export logcat events

My android app has entered beta and a tester is encountering the android reporting the app has crashed. Is there a recommended approach for collecting logcat entries and emailing or moving the event off device? Testers have no access to the source code or android dev studio.
Have seen android report crash dumps and offer the choice to download the dump off device. Any pointers to an approach for this?
Use an analytics tool like crashlytics. When crashes occur they are logged in its dashboard, here you can view the stacktrace for the crash just like you would in the logcat.

Android crash report button not shown

I have developed an app and want to make sure that whenever an unexpected crash occurs, the user is able to send a crash report.
From Android 2.2 onward I read that Android has something build in for this. However, in my case, the application crashes in one special situation, but only the "Force close" button is shown.
The button is not shown in the app downloaded from the Market as well as when I install it directly on my telephone.
Must I perform some programmatic effort to achieve this?
Crash report options are given to users of Android >= 2.2. As a developer you don't need to do anything with your code just monitor your developer account for crash/freeze reports.
See this blog
You can add Crash Report SDK in your project. If an unexpected crash occurs, it will be reported to the crashlog.org platform. You can view the crash log on this platform, where offers Stack traces, Memory, Storage, Thread and Process information for debugging.

Flex Mobile log output in iOS

I'm trying to debug an issue on a Flex Mobile project. Specifically, in order to debug this I need to be using a release build for iOS (it is the only way the problem appears). I am having difficulty finding a way to view log messages on a release build. Has anybody been able to successfully see log messages in the Organizer console? If so, how did you accomplish it?
If it needs to be a release build, I can think of two options:
Using Google Analytics in the Flex mobile project and then log your errors to a "test" bucket so it doesn't get mixed up with your real reporting.
Save a txt file with log info, and then read it back in
Neither are great solutions, but I think it is the best you can do with a release build.

Categories

Resources