'Firebase Analytics Debug View does not show anything
I linked my Android app with Firebase using Android Studio Which created and set my google-service.json into my project.
When i debug my event logging in logcat i got :
V/FA-SVC: Successful upload. Got network response. code, size: 204, 0
But nothing is showing into firebase console debug view
Solution 1:[1]
Test device setup
To enable sending of DebugView data on a connected Android test device for a configured Firebase Analytics app, you can follow the step below:
If you are simply working with single build variant, the following command is enough:
adb shell setprop debug.firebase.analytics.app [your_app_package_name]
But if you are working with multiple build variants with different application IDs which are not the same as the app package name, be sure to execute the following command:
adb shell setprop debug.firebase.analytics.app [your_application_id]
Here, application ID is the app ID of your build variant found in the corresponding gradle file. For example, lets say you have x.gradle and y.gradle for two build variants x and y, and you also have the general build.gradle file. To debug the build variant x with application ID com.abc.x, the command will be:
adb shell setprop debug.firebase.analytics.app com.abc.x
Similarly, to debug the build variant y with application ID com.abc.y, the command will be:
adb shell setprop debug.firebase.analytics.app com.abc.y
This behavior persists until you explicitly disable it by executing the following command:
adb shell setprop debug.firebase.analytics.app .none.
Solution 2:[2]
- Run your app in debug mode
- Goto Developer Options -> Select debug app -> Select
You will see your device listed in Firebase DebugView
Solution 3:[3]
After performing steps from Enabling debug mode, make sure that date and time on your debug device or emulator and on your PC is correct.
If after correcting the date and time events are still not showing on DebugView, clear the app storage. Then restart the app and try again.
Solution 4:[4]
Enabling debug logging is different from enabling debug mode. As Frank van Puffelen suggested in his comment, to enable debug mode you need to set "debug.firebase.analytics.app" property to your app package name.
You can do this using adb with the following command:
adb shell setprop debug.firebase.analytics.app "your.app.package.name"
You can find the package name of your app inside your AndroidManifest.xml
as the package
attribute on the manifest
element (first element in the xml document).
Solution 5:[5]
Also make sure that you have the latest Google Play Services installed in the device/emulator or nothing is guaranteed to work.
If you go to the settings on your emulator, there is Update button for that. Unfortunately it requires you to sign-in via your Google account.
Solution 6:[6]
In my case, even running the adb shell setprop debug.firebase.analytics.app "your.app.package.name"
didn't help. While I was hopelessly trying to find something, I decided to check the firebase plugin for Android Studio for something related and found out under the section for analytics that the following commands are needed for verbose logging:
adb shell setprop log.tag.FA VERBOSE
adb shell setprop log.tag.FA-SVC VERBOSE
adb logcat -v time -s FA FA-SVC
I thought that it might be helpful at least to see if the app is sending out some tracking information to the servers at all and run those commands. For my big surprise, it helped also the DebugView and I was then able to see my device.
Solution 7:[7]
Disable any ad-blocking mechanism in your debugging device. This was the problem here. I had AdAway enabled.
I know the question is old, however it may help someone.
Solution 8:[8]
As others have mentioned, I think commonly the issue here is using the wrong package name. I had this problem with an app I recently started collaborating on, and using the package attribute from AndroidManifest.xml wasn't working. I suspected that the build was appending something to the package name but couldn't find the place where this was defined. The simplest way I found to discover the actual package name was to launch "Attach debugger to Android process" in the top bar on Android Studio, which then shows a list of processes with their associated package names on the AVD. Sure enough, using the correctly-appended package name taken from this list did then cause Firebase Analytics Debug View to wake up.
Solution 9:[9]
For me the problem was using "package name" in the adb command as they suggest in the docs. But whay you must use is the applicationId of your build. Though they are the same a lot of times they can be different if you specify another appId in build.gradle
file or add postfixes for some specific build variants.
I don't know why they always use the "package name" words for it, since it just means the way we organize our code.
Solution 10:[10]
I had problems with events and devices not showing up in the Firebase Debug View.
Found out that my pi-hole on my network was eating all the events. So if if you have any kind of ad blocker on your network, disable it and try again.
Solution 11:[11]
I configured everything correctly and had an emulator and a device running. The emulator events showed up, but the device didn't. 2 hours later I figured out that there is a device-selector in the DebugView
and selecting the device was showing the events all the time:
Solution 12:[12]
After reading the comment here, I found it helpful to run the following commands from a terminal:
adb kill-server
adb start-server
adb shell setprop debug.firebase.analytics.app package_name
Then I was able to select my emulator from the Firebase debug device list and see Firebase events from an app running in Android Studio Bumblebee | 2021.1.1 Beta 1
Solution 13:[13]
If you are on iOS simulator. Try this:
Step1 : "Erase All content and settings" on simulator and let the simulator start again
Step2 : start your app
Step3 : Close the firebase debug tab and start again.
The debug logs were not coming for me and after doing this I am successfully getting the logs.
Note : The above thing happened atleast 7/8 times from past few days.
Solution 14:[14]
Delete the App on the device/emulator first!
From the terminal run:
adb shell setprop debug.firebase.analytics.app [your_app_package_name]
Then rebuild/debug the app on your device/emulator.
Finally your debug data will show up in Firebase > Analytics > DebugView
People have said "erase content and settings" and "clear the app storage"...etc, but I didn't get it and have spent hours trying to get this working. All you need to do to clear this out is delete the app from your the device. Debug won't work unless all the app data is cleared out.
If you are looking for your_app_package_name, its in your AndroidManifest.xml file under package.
Solution 15:[15]
I'm not sure if you have received your answer or not, but one thing that got me snagged up was all the directions say to do, is enter this command and use your package name. BUT, if you are using flavors and adding package suffixes then you must make sure you have that in the shell command as well.
If you have a dev / uat / prod variant/flavor combo , make sure that you are adding the suffix if you have one. In my instance I have a '.dev' suffix, so my command looks as follows:
adb shell setprop debug.firebase.analytics.app com.myapp.something.dev
Solution 16:[16]
First of all check if your bebugging device is connected to the internet, because without an active internet connection Firebase will of course not receive any debugging data.
Secondly, your debugging device may be showing multiple times on Firebase Analytics Debug View, like mine was.
Strangely enough, you'll have to select the correct item corresponding to your currently running device so that you can see the live logs. It looks like Google keeps your device listed from previous debugging sessions, rather than replacing the session with the current one, which in my opinion would be the right approach to follow.
Solution 17:[17]
I faced a similar situation. I ran the following command on Windows device
adb shell setprop debug.firebase.analytics.app "app_package_name"
You can find out from AndroidManifest.xml
file.
It's worked.
Solution 18:[18]
Solution 19:[19]
In my case, I did two things:
Firstly
I add the following command in android studio Terminal
adb shell setprop debug.firebase.analytics.app [your_application_id]
Secondly:
I went to the Developer Options on my phyiscal device, and i clicked "Select debug app", then i chose my app.
then my device appeared on Debug View devices.
Solution 20:[20]
If everything is properly set up and still Debug View is not working
I face this issue even though I have enabled the Debug view via command and cross-checked with some other device & system which works properly. But somehow it was not working on my emulator. This might also happen on a real device.
Solution for not working only on a specific device or emulator in the system:
To see the logs & events in Debug View. We need to make sure that the emulator or device Date & Time with Timezone are set to our local time which should be also the same in the analytics console. After making same date and time I was able to see the logs & event in Debug View.
I hope this might help those who have followed all the things correctly but missed this case.
Solution 21:[21]
In my case, I replaced previous google-services.json file with new one. For this case, I needed to remove the "build" folder, rebuild the project, did debug run on device also followed other steps like, adb shell setprop debug.firebase.analytics.app "your.app.package.name" too. Then it worked.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow