Task exception on worker thread NPE when sending up Firebase Analytics on an Android app

556 views
Skip to first unread message

Kaushik Gopal

unread,
Jan 25, 2017, 1:21:00 AM1/25/17
to Firebase Google Group
Hey folks,

I've managed to successfully integrate the Firebase sdk in an Android app that I have. Additionally, i've also set up the Analytics and fire an event in my app. 

I went ahead and enabled the ADB logs as specified in the instructions here - https://firebase.google.com/docs/analytics/android/events

After the firing of the event though, i'm getting an NPE. The message is not so helpful in pointing me to what could possibly be going wrong. Could any one of you kind folks help. This is the log observed:

01-24 16:07:07.039 D/FA      ( 1064): Logging event (FE): hours_picked_up, Bundle[{_o=app, temp=temp}]
...
01-24 16:07:07.104 V/FA      ( 1064): Processing queued up service tasks: 1
01-24 16:07:07.116 V/FA-SVC  (32734): Logging event: origin=app,name=...
01-24 16:07:07.142 V/FA-SVC  (32734): Saving event, name, data size: hours_picked_up, 32
01-24 16:07:07.142 V/FA-SVC  (32734): Event recorded: Event{appId='...', name='....', params=Bundle[{_o=app, temp=temp}]}
01-24 16:07:07.146 V/FA-SVC  (32734): Upload scheduled in approximately ms: 14890
...
01-24 16:07:22.286 V/FA-SVC  (32734): Successfully fetched config. Got network response. code, size: 304, 0
01-24 16:07:22.315 V/FA-SVC  (32734): Saving bundle, size: 514
01-24 16:07:22.317 D/FA-SVC  (32734): Uploading events. Elapsed time since last upload attempt (ms): 10393355
01-24 16:07:22.328 E/FA-SVC  (32734): Task exception on worker thread: java.lang.NullPointerException: Attempt to invoke virtual method 'long java.lang.Long.longValue()' on a null object reference: vfs.s(:com.google.android.gms:2650)

I'm not seeing any events go up on firebase console yet (then again I hear there's a 24 hour turnaround time) but my guess is that it's probably not going to go up given the exception.

Is there a way to find out why that NullPointerException occurs?

Kato Richardson

unread,
Jan 25, 2017, 11:02:58 AM1/25/17
to Firebase Google Group

Hello Kaushik,

It’ll help to include all the relevant code, sample data, debug logging (i.e. the full stack trace), and version info (make sure you’re on the latest Firebase SDK and matching Play version) so we can fully understand the problem. See how to ask and creating an mcve.

☼, Kato


--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/883822d4-1309-4d66-9cc4-435669a7ed9f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Kato Richardson | Developer Programs Eng | kato...@google.com | 775-235-8398

Kaushik Gopal

unread,
Jan 26, 2017, 4:20:27 AM1/26/17
to Firebase Google Group
Thanks Kato!

I should have included that info to begin with, my apologies.

I seemed to have figured out my specific problem so i'll go ahead and post it here for posterity:

i realized that the mechanism noted down in the docs for tracking events from the logcat (in Android) tracks ALL events

adb shell setprop log.tag.FA VERBOSE
adb shell setprop log
.tag.FA-SVC VERBOSE
adb logcat
-v time -s FA FA-SVC

I was monitoring my logs on a terminal without a package filter, so basically it appears like that error might have been coming from another app's events that was logging (potentially) a property value incorrectly ><.

up up and away now.

thanks again!
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.

To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/883822d4-1309-4d66-9cc4-435669a7ed9f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages