• 8
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

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

      • 2
    • You need to enable it for you app: adb shell setprop debug.firebase.analytics.app ***package_name***
      • 2
    • V/FA-SVC: Successful upload. Got network response. code, size: 204, 0; Firebase says My app is connected on first use. But still can't see Debug Events; I did adb shell setprop on app package; also matched gmp_app_id: 1:8427#####:android:7dd######### in json file. Am on Spark plan! @LokeshTiwari
    • Also doesn't work for me - did everything as per the documentation. DebugView always says "No devices available" in the top left selector.

Test device setup

To enable sending of DebugView data on a connected Android test device for a configured Firebase Analytics app, execute the following command:

adb shell setprop debug.firebase.analytics.app [your_app_package_name]

This behavior persists until you explicitly disable it by executing the following command:

adb shell setprop debug.firebase.analytics.app .none.
  • 41
Reply Report
      • 2
    • If you have more than one emulator running, you have to use adb -s SERIAL (SERIAL for the unique id of the emulator). If one device and one emulator are connected you can use shortcuts: adb -d ... for device and adb -e ... for emulator.
      • 1
    • I have the app installed and simulator is in debug mode any other prerequisite required to see the data in firebase? The app is a React Native android app and for react native iOS app all data are tracked from real devices.

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.

  • 18
Reply Report

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).

  • 12
Reply Report
    • Do you execute the adb command on the android device/emulator, or in the development machine's terminal? If the latter, how does it know which emulator to affect, or does it do all of them?
      • 1
    • To answer my own question, you enter it on the development machines terminal. However, the quotes around packagename was the issue. It worked for me with no quotes.
    • Also make sure you have the right package name. My debug package name was different because I was using build variants and hence .dev was added to my debug build

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.

enter image description here

  • 5
Reply Report

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.

  • 3
Reply Report

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.

  • 1
Reply Report