enable to see firebase error console log - android

I'm connecting to firebase from a android app. My app is supposed to be writing data to my firebase, but it isn't. I'm also not seeing any errors, warnings, etc. logged to the console. So how do I crank up logging for the firebase to see what's actually going on? Does such a thing exist? I tried searching the firebase API docs, but couldn't find anything.

Errors will be logged automatically.
You can get more verbose logging from the Firebase Database by calling:
FirebaseDatabase.getInstance().setLogLevel(Logger.Level.DEBUG);

Related

Android wear os. FirebaseMessaging: Failed to get FIS auth token, Firebase Installations Service is unavailable,Topic sync or token retrieval failed

I canĀ“t figure it out anymore, I've tested all kind of things, im testing to receive the token from firebase messaging. Im almost secure that first time i've received it but after that, no more and always the same error. this is being tested with android 11 wear os 3. so it is an emulator to a weareable.
The most common ways to solve this by comments is adding options to initialization or adding Firebase Installations api to the credentials of the api key, or checking the networkconfiguration xml with some options but nothing. nothing works.
I've testing with the last firebase bom(30.3.1), and tried with lower versions too.
at the begginings of the logs says "I/FirebaseInitProvider: FirebaseApp initialization successful" but then all errors after a while.

Add LogCat logs to Firebase Crashlytics

I'm using Firebase Crashlytics to report crashes. I'm using a game framework that handles logging for me and when running on Android, it logs to LogCat. I want to be able to include the LogCat logs with the crash report in Crashlytics. Is this possible?
I found this Library that could help (https://github.com/Ereza/LogcatReporter), but I'm not sure how well supported it is.
I know I can log like this:
FirebaseCrashlytics crashlytics = FirebaseCrashlytics.getInstance();
crashlytics.log("my message");
crashlytics.log("E/TAG: my message");
But I would prefer for the framework I'm using to handle the logging.
Any way to include those LogCat logs? Does Firebase have a built in supported way?
I suppose there is no feature to save logs into Firebase Crashlytics, but I found an interesting solution for saving logs into Firebase Realtime Database.

Where does Crashlytics.log(""); go?

I'm trying to set up my app with firebase+crashlytics for having a better error dashboard.
All the firebase stuff is already working and I'm able to access the features
I tested crashlytics with:
Crashlytics.getInstance().crash(); // Force a crash
and i'm able to see the stack trace on my dashboard (inside firebase)
but I'm trying to log non-fatal messages like:
Crashlytics.log("test");
And it doesn't appear anywhere
I followed the whole instructions at:
https://firebase.google.com/docs/crashlytics/customize-crash-reports
Still doesn't find any dashboard with the "test" messages
Where does it go? what am I missing?
Sending non-debug errors (e.g. your test message) logs to Crashlytics locally, but these exceptions are not uploaded until the app restarts.
As the documentation states:
Crashlytics batches logged exceptions together and sends them the next time the app launches.
This is presumably due to the primary Crashlytics functionality (reporting crashes) working in the same way, and non-fatal errors being a secondary concern using the same code flow.
Whilst this is unfortunate, there are many third party log-collating services that can handle the non-fatal errors.
Note: I'm aware you've received an answer in the comments from Crashlytics, I'm providing a more comprehensive answer for future visitors.
It's an old question any way i wanted to share what happens to messages logged using Crashlytics.log(msg); These logs are not immediately shown to dashboard. Crashlytics stores all the logged messages logged using log(msg) method and uploads it to server when a new Crash or Exception occurs.
You can see these messages in Firebase console under logs section as shown in below image
One more thing if you want to log exceptions there is another method for it Crashlytics.logException(exception)
Crashlytics isn't made for develop logging/debug, it is made to cluster hundreds/thousands of logs from different users at runtime, this may cause delays between the time the log message are recorded and when you will really be able to see them at the dashboard making it unusable for development debug.
If you want to use Crashlytics to follow the code workflow and debug during development, you will need to use the trick in this answer.
https://stackoverflow.com/a/69340289/5679560
As mentioned in below link
https://support.crashlytics.com/knowledgebase/articles/120066-how-do-i-use-logging
You can see this crashes on Crashlytics dashboard if you look at the specific crash itself.
The recommended way to add custom logging to your app is:
Crashlytics.log(int priority, String tag, String msg)

Firebase analytics - missing debugview?

I'm implementing firebase analytics and would like to see the events logged in the firebase console immediately. This should be possible in the debugview but it's not visible in my console.
What do I need to do in order to add the debugview?
Debugview as seen in firebase keynote
My firebase console
DebugView is currently only available to a limited set of developers. If will be made generally available soon (I don't have any details on the exact date though).
If you have been invited to join the early access program, but it isn't showing in the Console, reach out to Firebase support so we can help you troubleshoot.
If you haven't been invited to join that early access program, DebugView correctly won't show in your console. Hint: I highly recommend you read this blog post in that case.
Now Firebase Debug view is available .
You have to set your devices a prop using adb command .
If you are using emulator take care to have the latest version of play services .
Check out your GoogleService-Info.plist file if IS_ANALYTICS_ENABLED property is true.

Data stops being retrieved from Firebase database after a few hours

I've got an Android application that uses Firebase password and email authentication and the real time database. This all works completely fine when the user has just logged in.
However maybe a few hours later data will stop being shown even if the data changes in the database, it almost seems as though the user is no longer authenticated. But when I connect my device to the adb I can see in the log that the user is logged in with the correct uid and there are no errors being reported. The only strange thing I noticed is that there is no network requests in the network monitor.
Can anyone shed some light on what is happening? I'm not sure if it's a database problem or an authentication problem. I can provide any information needed
EDIT
Marked answer down below but also take a look at these instructions also when adding your SHA1 Keys to firebase, add both production and dev copies
You need to add SHA1 of your debug and production certificates to Firebase console.
It is needed so firebase knows your app has access to refresh access token.
Docs Reference: https://firebase.google.com/support/guides/launch-checklist

Categories

Resources