Unable to see device and events log in DebugView - android

I'm trying to setup analytics with firebase on my react native app.
I have tried mutiples solutions from different forum like StackOverflow or Github.
Here's what I put in my code :
import analytics from '#react-native-firebase/analytics';
analytics().logEvent('TEST_EVENT');
And here's the solutions I try :
In GoogleService-Info make IS_ANALYTICS_ENABLED become true instead of false
Used the following command to see my events in the debug view:
adb shell setprop debug.firebase.analytics.app .none. //disable
adb shell setprop debug.firebase.analytics.app [app_name] //enable
See the logs with the following commands:
adb shell setprop log.tag.FA VERBOSE
adb shell setprop log.tag.FA-SVC VERBOSE
adb logcat -v time -s FA FA-SVC
And here's my logs :
09-08 18:21:23.401 V/FA (26224): Connecting to remote service
09-08 18:21:23.456 D/FA (26224): Connected to remote service
09-08 18:21:23.457 V/FA (26224): Processing queued up service tasks: 1
09-08 18:21:23.469 V/FA-SVC ( 3653): Logging event: origin=app,name=TEST_EVENT,params=Bundle[{ga_event_origin(_o)=app, ga_screen_class(_sc)=MainActivity, ga_screen_id(_si)=-8052166940190804487}]
09-08 18:21:23.488 V/FA-SVC ( 3653): Upload scheduled in approximately ms: 500
09-08 18:21:23.489 V/FA-SVC ( 3653): Unscheduling upload
09-08 18:21:23.490 V/FA-SVC ( 3653): Scheduling upload, millis: 500
09-08 18:21:23.492 V/FA-SVC ( 3653): Background event processing time, ms: 24
(...) " Bunch of informations, i don\'t want this to be too long. " (...)
09-08 18:21:39.578 V/FA (32176): Connecting to remote service
09-08 18:21:39.610 V/FA (32176): Connection attempt already in progress
09-08 18:21:39.620 V/FA (32176): Connection attempt already in progress
09-08 18:21:39.620 D/FA (32176): Setting app measurement enabled (FE): true
09-08 18:21:39.621 D/FA (32176): Updating Scion state (FE)
09-08 18:21:39.637 V/FA (32176): Connection attempt already in progress
09-08 18:21:39.637 D/FA (32176): Connected to remote service
09-08 18:21:39.637 V/FA (32176): Processing queued up service tasks: 4
09-08 18:21:39.654 V/FA-SVC ( 3653): Saving default event parameters, appId, data size: com.google.android.youtube, 2
09-08 18:21:44.657 V/FA (32176): Inactivity, disconnecting from the service
I'm sure it's not a problem from my phone bc when I run ./adb devices
I can see my phone:
List of devices attached
MUN0219130000631 device
Even on the side of Firebase, i got the firebase authentification and real-time database which works very well.
But in debug View console, I am unable to see the logs or even device available.
Firebase screenshot
Thanks in advance for your time !
p.s: It's my first post on StackOverflow, be kind and let me know if i can do it better next time

Related

FA: Inactivity, disconnecting from the service

Error
*V/FA: Activity resumed, time: 710539857
V/FA: Connection attempt already in progress
V/FA: Connection attempt already in progress
D/FA: Connected to remote service
V/FA: Processing queued up service tasks: 4
I/WM-WorkerWrapper: Worker result SUCCESS for Work [ id=75f5f87c-7328-4690-a1a6-f6363ce20d91, tags={ com.actofit.coach_pro.worker.GetClubInvitesWorker, GetClubInvitesWorker } ]
V/FA: Inactivity, disconnecting from the service*
Farther Process is not working.
I try below steps:
Uninstall the app from your mobile/emulator.
Then go to the File option in the main menubar in the android studio.
Then click on Invalidatecasha/restart.

Android Studio logcat only shows Firebase Analytics

It started happening a few days ago and I already tried many solutions but nothing helped. What I tried:
Invalidate cache / restart
Restart logcat
Revoke USB debugging authorizations
Selecting "No filters"
Reinstall app
Switch log level between verbose, error and debug
increase log buffer size from developer options
Logcat (log level: verbose | only selected application):
2020-11-29 20:03:05.165 18576-18615/com.tashila.mywalletfree.debug V/FA: App measurement collection enabled
2020-11-29 20:03:05.168 18576-18615/com.tashila.mywalletfree.debug V/FA: App measurement enabled for app package, google app id: com.tashila.mywalletfree.debug, 1:615339790521:android:a54ce30e1047dc49fdcb68
2020-11-29 20:03:05.169 18576-18615/com.tashila.mywalletfree.debug I/FA: App measurement initialized, version: 33025
2020-11-29 20:03:05.169 18576-18615/com.tashila.mywalletfree.debug I/FA: To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
2020-11-29 20:03:05.170 18576-18615/com.tashila.mywalletfree.debug I/FA: To enable faster debug mode event logging run:
adb shell setprop debug.firebase.analytics.app com.tashila.mywalletfree.debug
2020-11-29 20:03:05.170 18576-18615/com.tashila.mywalletfree.debug D/FA: Debug-level message logging enabled
2020-11-29 20:03:05.218 18576-18608/com.tashila.mywalletfree.debug V/FA: onActivityCreated
2020-11-29 20:03:05.255 18576-18615/com.tashila.mywalletfree.debug V/FA: Connecting to remote service
2020-11-29 20:03:05.286 18576-18615/com.tashila.mywalletfree.debug V/FA: Connection attempt already in progress
2020-11-29 20:03:05.300 18576-18615/com.tashila.mywalletfree.debug V/FA: Connection attempt already in progress
2020-11-29 20:03:05.635 18576-18615/com.tashila.mywalletfree.debug I/FA: Tag Manager is not found and thus will not be used
2020-11-29 20:03:05.672 18576-18615/com.tashila.mywalletfree.debug V/FA: Connection attempt already in progress
2020-11-29 20:03:05.969 18576-18615/com.tashila.mywalletfree.debug V/FA: Activity resumed, time: 1034755035
2020-11-29 20:03:06.027 18576-18615/com.tashila.mywalletfree.debug V/FA: Connection attempt already in progress
2020-11-29 20:03:06.030 18576-18615/com.tashila.mywalletfree.debug V/FA: Connection attempt already in progress
2020-11-29 20:03:06.710 18576-18615/com.tashila.mywalletfree.debug D/FA: Connected to remote service
2020-11-29 20:03:06.711 18576-18615/com.tashila.mywalletfree.debug V/FA: Processing queued up service tasks: 6
2020-11-29 20:03:11.837 18576-18615/com.tashila.mywalletfree.debug V/FA: Inactivity, disconnecting from the service
2020-11-29 20:05:02.316 18576-18681/com.tashila.mywalletfree.debug V/FA: Recording user engagement, ms: 116300
2020-11-29 20:05:02.329 18576-18681/com.tashila.mywalletfree.debug V/FA: Connecting to remote service
2020-11-29 20:05:02.579 18576-18681/com.tashila.mywalletfree.debug V/FA: Activity paused, time: 1034871354
2020-11-29 20:05:02.696 18576-18681/com.tashila.mywalletfree.debug V/FA: Connection attempt already in progress
2020-11-29 20:05:02.700 18576-18681/com.tashila.mywalletfree.debug D/FA: Connected to remote service
2020-11-29 20:05:02.702 18576-18681/com.tashila.mywalletfree.debug V/FA: Processing queued up service tasks: 2
Log from 'Run' tab
11/29 20:50:59: Launching 'app' on Xiaomi Redmi Note 8.
App restart successful without requiring a re-install.
$ adb shell am start -n "com.tashila.mywalletfree.debug/com.tashila.mywalletfree.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Connected to process 23766 on device 'xiaomi-redmi_note_8-142ae1cf'.
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
V/FA: App measurement collection enabled
V/FA: App measurement enabled for app package, google app id: com.tashila.mywalletfree.debug, 1:615339790521:android:a54ce30e1047dc49fdcb68
I/FA: App measurement initialized, version: 33025
To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
To enable faster debug mode event logging run:
adb shell setprop debug.firebase.analytics.app com.tashila.mywalletfree.debug
D/FA: Debug-level message logging enabled
V/FA: Connecting to remote service
V/FA: onActivityCreated
V/FA: Connection attempt already in progress
V/FA: Connection attempt already in progress
I/FA: Tag Manager is not found and thus will not be used
V/FA: Connection attempt already in progress
V/FA: Activity resumed, time: 1037630815
V/FA: Connection attempt already in progress
V/FA: Connection attempt already in progress
D/FA: Connected to remote service
V/FA: Processing queued up service tasks: 6
V/FA: Inactivity, disconnecting from the service
V/FA: Connecting to remote service
D/FA: Connected to remote service
V/FA: Processing queued up service tasks: 1
V/FA: Inactivity, disconnecting from the service
V/FA: Recording user engagement, ms: 72971
V/FA: Connecting to remote service
V/FA: Activity paused, time: 1037703790
V/FA: Connection attempt already in progress
D/FA: Connected to remote service
V/FA: Processing queued up service tasks: 2
What should I do to fix this? I've been struggling to fix this for days. Please help
In case anybody faces this problem again, I had the same problem and also tried everything listed above (which didn't help). In such a case, this appears to be a problem not of Android Studio or Logcat, but the device itself (you can verify this by connecting a different device/emulator, logs should show up fine). What fixed this for me was updating the OS of the device (resetting might also help).
I was able to fix this by configuring the Registry Buffer Size in the Developer Options. It was deactivated while I had the error. Set it to 1mb and the logcat started to work normally again.

Android emulator connecting to Laravel App on WAMP Server, issue: .failed to connect to /10.0.2.2 (port 8000) after 10000ms

Server - WAMP
Host - localhost/127.0.0.1/10.0.2.2(emulators ip address for hosts local server)
App - android(frontend), laravel(backend)
IDE - Android Studio
Ive tried multiple things to resolve this issue, from turning off my firewall to creating a virtual host with both a named virtual host and with the ip address 10.0.2.2. through configuring the host file and editing both the http.vhosts.conf and httpd.conf files appropriately.
I have seen the following threads and none provided the solution
Connection to LocalHost/10.0.2.2 from Android Emulator timed out
How to connect emulator to laravel server localhost:8000
http://www.4answered.com/questions/view/20e0ab1/How-to-connect-emulator-to-laravel-server-localhost8000#videoAnswer
The Error looks like this -
09-03 17:42:37.886 23713-23739/com.geniusesafrica.geniuses I/OpenGLRenderer: Initialized EGL, version 1.4
09-03 17:42:45.810 23713-23713/com.geniusesafrica.geniuses I/Choreographer: Skipped 476 frames! The application may be doing too much work on its main thread.
09-03 17:43:06.820 23713-23713/com.geniusesafrica.geniuses D/MainActivity: onFailure: .failed to connect to /10.0.2.2 (port 8000) after 10000ms
09-03 17:43:06.826 23713-23713/com.geniusesafrica.geniuses I/Choreographer: Skipped 1259 frames! The application may be doing too much work on its main thread.
09-03 17:43:06.829 23713-23782/com.geniusesafrica.geniuses D/FA: Connected to remote service
09-03 17:43:06.829 23713-23782/com.geniusesafrica.geniuses V/FA: Processing queued up service tasks: 1
09-03 17:43:11.867 23713-23782/com.geniusesafrica.geniuses V/FA: Inactivity, disconnecting from AppMeasurementService
And Here is the retrofit builder -
Retrofit retrofit = new Retrofit.Builder()
.baseUrl("http://10.0.2.2:8000/api/")
.addConverterFactory(GsonConverterFactory.create(gson))
.build();
I can access my laravel app from the Machines browser and from postman as well and i can make requests from my emulator to remote addresses.
On the emulators browser the same url is giving the following error -
net:ERR_NAME_NOT_RESOLVED
then its timing out with a
net:ERR_CONNECTION_TIMED_OUT
Any help will be appreciated.

SERVICE_VERSION_UPDATE_REQUIRED error using Firebase Analytics on Android

I want to integrate Firebase Analytics in my project.
I followed the Guide but it gives me this warning:
06-30 18:38:30.514 W/FA ( 2091): Service connection failed: ConnectionResult{statusCode=SERVICE_VERSION_UPDATE_REQUIRED, resolution=null, message=null}
06-30 18:38:30.888 W/FA ( 2091): Service connection failed: ConnectionResult{statusCode=SERVICE_VERSION_UPDATE_REQUIRED, resolution=null, message=null}
06-30 18:38:32.306 W/FA ( 2091): Service connection failed: ConnectionResult{statusCode=SERVICE_VERSION_UPDATE_REQUIRED, resolution=null, message=null}
06-30 18:38:32.338 W/FA ( 2091): Service connection failed: ConnectionResult{statusCode=SERVICE_VERSION_UPDATE_REQUIRED, resolution=null, message=null}
06-30 18:38:32.661 W/FA ( 2091): Service connection failed: ConnectionResult{statusCode=SERVICE_VERSION_UPDATE_REQUIRED, resolution=null, message=null}
06-30 18:39:32.680 W/FA ( 2091): Tasks have been queued for a long time
My project version is:
ext {
minSdkVersion = 17
targetSdkVersion = 23
compileSdkVersion = 23
compileSdkVersionS = 'Google Inc.:Google APIs:23'
supportVersion = '24.0.0'
buildToolsVersion = '23.0.2'
sourceCompatibilityVersion = JavaVersion.VERSION_1_7
targetCompatibilityVersion = JavaVersion.VERSION_1_7
gradleVersion = '2.1.2'
playServicesVersion = '9.2.0'
gsonVersion = '2.3'}
The log is print out through
adb shell setprop log.tag.FA VERBOSE
adb shell setprop log.tag.FA-SVC VERBOSE
adb logcat -v time -s FA FA-SVC
I think the version I am using now is good enough but I am still getting the error message, can anyone give me a hint on it?
After posting comments on the question (see above), I experimented running an app built with Firebase 9.2.0 on an emulator that had an old version of Google Play Services. Using the adb commands posted in the question, I saw the same warnings as those included in the question. Also in the normal logcat output was the message:
W/GooglePlayServicesUtil: Google Play services out of date. Requires 9256000 but found 9080030
You need to update Google Play Services on your device. If you are running Firebase 9.2.0, the required Play Services version is 9.2.56.
This message means that you need to update Google Play Store app on the device.
If you are using Android Studio Emulator:
Open extended controls by clicking the 3 dots at the bottom of control menu
Select Google Play
Click Update
Inside the emulator click the UPDATE button
After the new version is downloaded and installed this error will be gone.

Using Google Analytics with FireBase + Google Tag Manager Android SDK

How to fire Google Analytics tag using Firebase + Google Tag Manager SDK in Android?
I added the Firebase container to my assets/container folder and created a Google Analytics tag using my GA Tracking id. I have followed exactly the steps as given in this tutorial: https://developers.google.com/tag-manager/ios/v5/#introduction
I trigger the appLaunch event with the below code:
mFirebaseAnalytics.logEvent("appLaunch", null);
How can I see this in my Google Analytics report? Please correct me if am wrong. Below are the logs printed when the above code is executed.
05-29 04:01:19.947 10378-10419/com.aiswarya.firebase I/FA: Tag Manager is not found and thus will not be used
05-29 04:01:19.947 10378-10419/com.aiswarya.firebase D/FA: Logging event (FE): appLaunch, Bundle[{_o=app}]
05-29 04:01:19.947 10378-10419/com.aiswarya.firebase V/FA: Using measurement service
05-29 04:01:19.947 10378-10419/com.aiswarya.firebase V/FA: Connecting to remote service
05-29 04:01:19.967 10378-10419/com.aiswarya.firebase D/FA: Connected to remote service
05-29 04:01:19.967 10378-10419/com.aiswarya.firebase V/FA: Processing queued up service tasks: 1
Thanks in Advance!
You should enable debug logging for both FirebaseAnalytics and Google Tag Manager and look at the logcat. It will likely answer your question.
You can enable Scion debug logs
adb shell setprop log.tag.FA VERBOSE
adb shell setprop log.tag.FA-SVC VERBOSE
adb shell setprop log.tag.GoogleTagManager VERBOSE
adb logcat -v time -s FA FA-SVC GoogleTagManager
View events in Android Studio debug log
TagManager is a separate library from Firebase Analytics. In order to use it in your app you need to add dependency on the tag manager form Google play services. When Firebase Analytics starts it will check for the presence of TagManager in the app and print message in logcat. If the message print TagManager not found you don't have the TagManager in your app. When TagManager is available you will see message like "TagManager found, initializing"
Google Tag Manager needs to be added as a separate dependency; see the documentation for doing so here:
Google Tag Manager for Android
In short:
Add to your module's gradle file:
dependencies {
// ...
implementation 'com.google.android.gms:play-services-tagmanager:[latest-version]'
}
Download the container file and add it to /assets/containers.

Categories

Resources