SDKBOX 2.3.15 Release - Firebase

Just in case there is about debugView:
https://firebase.google.com/docs/analytics/debugview

I have exactly same steps like your, only I have my own googleservices.xml and package id.

It would look like this:

1. cocos new -l cpp -p com.mygame.test mygamest
2. cp googleservices.xml (my generated)  to ./proj.android-studio/app/res/values/googleservices.xml
3. sdkbox import firebase
4. modify HelloWorldScene.cpp to invoke firebase logevent function (skdbox already placed code there for init)
5. cocos run -p android --android-studio

I think something is realted to this error:

AppMeasurementService not registered/enabled
07-10 18:02:34.012 E/FA ( 1699): Uploading is not possible. App measurement disabled

Like inside skdbox jar something is missing or wrongly hardcoded and due this debug events not sent to firebase.

can you use

com.sdkbox.test.app.firebase
and
https://github.com/sdkbox/sdkbox-sample-firebase/blob/master/cpp/proj.android/res/values/googleservices.xml
to try

or share your googleservices.xml, application id with me

I sent my xml.

Was trying your provided, seesm to be same issue:

07-10 18:32:03.781 I/FA      (22738): App measurement is starting up, version: 11010
07-10 18:32:03.781 I/FA      (22738): To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
07-10 18:32:03.786 V/FA      (22738): Collection enabled
07-10 18:32:03.786 V/FA      (22738): App package, google app id: com.sdkbox.test.app.firebase, 1:983552352747:android:2a571907b792f3c2
07-10 18:32:03.787 I/FA      (22738): To enable faster debug mode event logging run:
07-10 18:32:03.787 I/FA      (22738):   adb shell setprop debug.firebase.analytics.app com.sdkbox.test.app.firebase
07-10 18:32:03.787 D/FA      (22738): Debug-level message logging enabled
07-10 18:32:03.792 V/FA      (22738): Cancelling job. JobID: 1030263612
07-10 18:32:03.793 V/FA      (22738): Registered activity lifecycle callback
07-10 18:32:03.795 V/FA      (22738): Persisting first open: 1499700723778
07-10 18:32:03.801 E/FA      (22738): AppMeasurementService not registered/enabled
07-10 18:32:03.801 E/FA      (22738): Uploading is not possible. App measurement disabled
07-10 18:32:08.547 V/FA      (19511): Inactivity, disconnecting from the service
07-10 18:32:21.159 I/FA      (23116): App measurement is starting up, version: 9683
07-10 18:32:21.159 I/FA      (23116): To enable debug logging run: adb shell setprop log.tag.FA VERBOSE

Also Iā€™m checking what inside sdkbox-firebase.jar and there is Appmeasurment class used which now is depreciated seems: https://firebase.google.com/docs/reference/android/com/google/android/gms/measurement/AppMeasurement maybe it causing issue?

Xmm it seems I see your logs in debugview:

Could be then related to Android version/firebase.jar ?

Iā€™m testing on Samsung s7 Android 7.0

sdkbox-firebase.jar is fetched from firebase aar file. we didnā€™t add or delete class from the aar file.

so, the appMeasurement issue will appear on android 7.0?

my device is andorid 5.1

seems there is some check wrong for Android 7.0, could be related to permissions in your bundled jar - maybe google fixed something later and u still using old one.

If I deleting sdkbox-firebase.jar and adding to gradle:

compile ('com.google.firebase:firebase-core:10.2.0')

it works on my phone, so Iā€™m asuming bad version of firebase.jar is bundled.

now firebase latest version is 11.0.2, sdkbox-firebase.jar is fetched from com.google.firebase:firebase-core:11.0.2

xmm, I jut took other phone with android 5.1.1 compiled - and still same issue.

Is your project compiled against SDK-22?

android {
    compileSdkVersion 22
    buildToolsVersion "22.0.1"

    defaultConfig {
        applicationId "com.sdkbox.test.app.firebase"
        minSdkVersion 10
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
    }
....

itā€™s strange

how about send me your whole project

Yes, will try to send it to you - now got some strange issue with config:

Did not find measurement config or missing version info. appId:

Will create new empty project to try it out once more and then will send it to you.

i download your project,
unzip it,
checkout cocos2d-x 3.15.1
use cocos2d-x 3.15.1 tools/cocos2d-console/bin/cocos to run coocs run -p android --android-studio
adb shell setprop debug.firebase.analytics.app com.fungames.snake
adb shell setprop log.tag.FA VERBOSE
adb shell setprop log.tag.FA-SVC VERBOSE
adb logcat -v time -s FA FA-SVC
check log

07-11 09:40:09.637 I/FA      (11597): App measurement is starting up, version: 11010
07-11 09:40:09.637 I/FA      (11597): To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
07-11 09:40:09.649 V/FA      (11597): Collection enabled
07-11 09:40:09.649 V/FA      (11597): App package, google app id: com.fungames.snake, 1:903043301571:android:52c9189b5f83966a
07-11 09:40:09.650 I/FA      (11597): Faster debug mode event logging enabled. To disable, run:
07-11 09:40:09.650 I/FA      (11597):   adb shell setprop debug.firebase.analytics.app .none.
07-11 09:40:09.651 D/FA      (11597): Debug-level message logging enabled
07-11 09:40:09.664 V/FA      (11597): Registered activity lifecycle callback
07-11 09:40:09.670 V/FA      (11597): Using measurement service
07-11 09:40:09.672 V/FA      (11597): Connecting to remote service
07-11 09:40:09.684 V/FA      (11597): Using measurement service
07-11 09:40:09.684 V/FA      (11597): Connection attempt already in progress
07-11 09:40:09.760 D/FA      (11597): Connected to remote service
07-11 09:40:09.760 V/FA      (11597): Processing queued up service tasks: 2
07-11 09:40:09.779 W/FA      (11597): Failed to retrieve Firebase Instance Id
07-11 09:40:09.802 W/FA      (11597): Failed to retrieve Firebase Instance Id
07-11 09:40:14.808 V/FA      (11597): Inactivity, disconnecting from the service

same steps as htlxyz:

cocos run -p android --android-studio
adb shell setprop debug.firebase.analytics.app com.fungames.snake
adb shell setprop log.tag.FA VERBOSE
adb shell setprop log.tag.FA-SVC VERBOSE
adb logcat -v time -s FA FA-SVC

debug log, testing with RedMi1, Android 4.2.1, Lantern VPN.

07-11 10:10:33.699 I/FA      (11778): App measurement is starting up, version: 11010
07-11 10:10:33.699 I/FA      (11778): To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
07-11 10:10:33.834 V/FA      (11778): Collection enabled
07-11 10:10:33.835 V/FA      (11778): App package, google app id: com.fungames.snake, 1:903043301571:android:52c9189b5f83966a
07-11 10:10:33.835 I/FA      (11778): Faster debug mode event logging enabled. To disable, run:
07-11 10:10:33.835 I/FA      (11778):   adb shell setprop debug.firebase.analytics.app .none.
07-11 10:10:33.835 D/FA      (11778): Debug-level message logging enabled
07-11 10:10:33.845 V/FA      (11778): Registered activity lifecycle callback
07-11 10:10:33.903 V/FA      (11778): Persisting first open: 1499739033691
07-11 10:10:33.915 V/FA      (11778): State of service unknown
07-11 10:10:33.916 V/FA      (11778): Checking service availability
07-11 10:10:33.917 V/FA      (11778): Service available
07-11 10:10:33.918 V/FA      (11778): Setting useService: true
07-11 10:10:33.918 V/FA      (11778): Using measurement service
07-11 10:10:33.919 V/FA      (11778): Connecting to remote service
07-11 10:10:33.950 V/FA      (11778): Using measurement service
07-11 10:10:33.950 V/FA      (11778): Connection attempt already in progress
07-11 10:10:35.342 I/FA-SVC  (11803): App measurement is starting up, version: 11055
07-11 10:10:35.499 D/FA      (11778): Connected to remote service
07-11 10:10:35.499 V/FA      (11778): Processing queued up service tasks: 2
07-11 10:10:35.586 W/FA      (11778): Failed to retrieve Firebase Instance Id
07-11 10:10:35.598 I/FA-SVC  (11803): This instance being marked as an uploader
07-11 10:10:35.607 W/FA      (11778): Failed to retrieve Firebase Instance Id
07-11 10:10:41.643 V/FA      (11778): Inactivity, disconnecting from the service

##Update
Replace packageId and googleservices.xml with com.sdkbox.test.app.firebase

There are Android 4.2.1 and Android 5.1 datas in DEBUGVIEW.

@energyy whereā€™s your location ? us ?

No we are in Europe EU, I tested now provided apk - it works on Android 5.1.1 but not on Anroid 7.0.

@mozartalouis Thanks for point out this issue.
Now the http://www.sdkbox.com/plugins/ has been updated.

@yinjimmy Hello! Could you please help me with this? Iā€™m still having this problem. Hereā€™s the logcat:

09-04 12:21:14.495: I/FA(652): App measurement is starting up, version: 11010
09-04 12:21:14.495: I/FA(652): To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
09-04 12:21:14.505: V/FA(652): Collection enabled
09-04 12:21:14.505: V/FA(652): App package, google app id: ru.orangegames.gems_stand, 1:767909331499:android:8fbe504569e51edb
09-04 12:21:14.505: I/FA(652): Faster debug mode event logging enabled. To disable, run:
09-04 12:21:14.505: I/FA(652):   adb shell setprop debug.firebase.analytics.app .none.
09-04 12:21:14.515: D/FA(652): Debug-level message logging enabled
09-04 12:21:14.525: V/FA(652): Registered activity lifecycle callback
09-04 12:21:14.535: V/FA(652): Using measurement service
09-04 12:21:14.535: V/FA(652): Connecting to remote service
09-04 12:21:14.545: V/FA(652): Using measurement service
09-04 12:21:14.545: V/FA(652): Connection attempt already in progress
09-04 12:21:14.565: D/FA(652): Connected to remote service
09-04 12:21:14.565: V/FA(652): Processing queued up service tasks: 2
09-04 12:21:14.595: W/FA(652): Failed to retrieve Firebase Instance Id
09-04 12:21:14.635: W/FA(652): Failed to retrieve Firebase Instance Id
09-04 12:21:19.640: V/FA(652): Inactivity, disconnecting from the service
09-04 12:21:20.311: D/FA(652): Setting user property (FE): _id, b7153cbe587ab8d9
09-04 12:21:20.331: V/FA(652): Using measurement service
09-04 12:21:20.331: V/FA(652): Connecting to remote service
09-04 12:21:20.341: D/FA(652): Connected to remote service
09-04 12:21:20.341: V/FA(652): Processing queued up service tasks: 1
09-04 12:21:20.371: W/FA(652): Failed to retrieve Firebase Instance Id
09-04 12:21:20.371: D/FA-SVC(1776): Setting user property: user_id(_id), b7153cbe587ab8d9
09-04 12:21:20.391: D/FA-SVC(1776): User property set: user_id(_id), b7153cbe587ab8d9
09-04 12:21:22.012: D/FA(652): Logging event (FE): login, Bundle[{firebase_event_origin(_o)=app}]
09-04 12:21:22.052: W/FA(652): Failed to retrieve Firebase Instance Id
09-04 12:21:22.062: V/FA-SVC(1776): Logging event: origin=app,name=login,params=Bundle[{firebase_event_origin(_o)=app}]
09-04 12:21:22.072: V/FA-SVC(1776): Saving event, name, data size: login, 36
09-04 12:21:22.082: V/FA-SVC(1776): Event recorded: Event{appId='ru.orangegames.gems_stand', name='login', params=Bundle[{firebase_event_origin(_o)=app, _r=1, _dbg=1}]}
09-04 12:21:22.092: V/FA-SVC(1776): Upload scheduled in approximately ms: 500
09-04 12:21:22.092: V/FA-SVC(1776): Scheduling upload with DelayedRunnable
09-04 12:21:22.102: V/FA-SVC(1776): Scheduling upload with AlarmManager
09-04 12:21:22.102: V/FA-SVC(1776): Background event processing time, ms: 43
09-04 12:21:22.593: V/FA-SVC(1776): Sending upload intent from DelayedRunnable
09-04 12:21:22.603: V/FA-SVC(1776): Device receiver got: com.google.android.gms.measurement.UPLOAD
09-04 12:21:22.613: V/FA-SVC(1776): Device PackageMeasurementService is starting up
09-04 12:21:22.613: V/FA-SVC(1776): Device PackageMeasurementService called. startId, action: 1, com.google.android.gms.measurement.UPLOAD
09-04 12:21:22.623: V/FA-SVC(1776): Saving bundle, size: 371
09-04 12:21:22.633: D/FA-SVC(1776): Uploading events. Elapsed time since last upload attempt (ms): 520
09-04 12:21:22.653: V/FA-SVC(1776): Uploading data. app, uncompressed size, data: ru.orangegames.gems_stand, 403, 
09-04 12:21:22.653: V/FA-SVC(1776): batch {
09-04 12:21:22.653: V/FA-SVC(1776):   bundle {
09-04 12:21:22.653: V/FA-SVC(1776):     protocol_version: 1
09-04 12:21:22.653: V/FA-SVC(1776):     platform: android
09-04 12:21:22.653: V/FA-SVC(1776):     gmp_version: 11010
09-04 12:21:22.653: V/FA-SVC(1776):     uploading_gmp_version: 11509
09-04 12:21:22.653: V/FA-SVC(1776):     config_version: 1487657434536000
09-04 12:21:22.653: V/FA-SVC(1776):     gmp_app_id: 1:767909331499:android:8fbe504569e51edb
09-04 12:21:22.653: V/FA-SVC(1776):     app_id: ru.orangegames.gems_stand
09-04 12:21:22.653: V/FA-SVC(1776):     app_version: 2.0.0.1
09-04 12:21:22.653: V/FA-SVC(1776):     app_version_major: 20086
09-04 12:21:22.653: V/FA-SVC(1776):     app_store: manual_install
09-04 12:21:22.653: V/FA-SVC(1776):     upload_timestamp_millis: 1504509682621
09-04 12:21:22.653: V/FA-SVC(1776):     start_timestamp_millis: 1504509681929
09-04 12:21:22.653: V/FA-SVC(1776):     end_timestamp_millis: 1504509681929
09-04 12:21:22.653: V/FA-SVC(1776):     previous_bundle_start_timestamp_millis: 1504509665322
09-04 12:21:22.653: V/FA-SVC(1776):     previous_bundle_end_timestamp_millis: 1504509665334
09-04 12:21:22.653: V/FA-SVC(1776):     app_instance_id: c11a5baba07d4ef30087197b52899b53
09-04 12:21:22.653: V/FA-SVC(1776):     resettable_device_id: 83216ecc-c61e-4f1a-9303-a5710fc79af8
09-04 12:21:22.653: V/FA-SVC(1776):     limited_ad_tracking: true
09-04 12:21:22.653: V/FA-SVC(1776):     os_version: 5.0.1
09-04 12:21:22.653: V/FA-SVC(1776):     device_model: GT-I9505
09-04 12:21:22.653: V/FA-SVC(1776):     user_default_language: ru-ru
09-04 12:21:22.653: V/FA-SVC(1776):     time_zone_offset_minutes: 300
09-04 12:21:22.653: V/FA-SVC(1776):     bundle_sequential_index: 8
09-04 12:21:22.653: V/FA-SVC(1776):     service_upload: true
09-04 12:21:22.653: V/FA-SVC(1776):     user_property {
09-04 12:21:22.653: V/FA-SVC(1776):       set_timestamp_millis: 1504509374394
09-04 12:21:22.653: V/FA-SVC(1776):       name: first_open_time(_fot)
09-04 12:21:22.653: V/FA-SVC(1776):       int_value: 1504512000000
09-04 12:21:22.653: V/FA-SVC(1776):     }
09-04 12:21:22.653: V/FA-SVC(1776):     user_property {
09-04 12:21:22.653: V/FA-SVC(1776):       set_timestamp_millis: 1504509374394
09-04 12:21:22.653: V/FA-SVC(1776):       name: first_open_after_install(_fi)
09-04 12:21:22.653: V/FA-SVC(1776):       int_value: 1
09-04 12:21:22.653: V/FA-SVC(1776):     }
09-04 12:21:22.653: V/FA-SVC(1776):     user_property {
09-04 12:21:22.653: V/FA-SVC(1776):       set_timestamp_millis: 1504509680318
09-04 12:21:22.653: V/FA-SVC(1776):       name: user_id(_id)
09-04 12:21:22.653: V/FA-SVC(1776):       string_value: b7153cbe587ab8d9
09-04 12:21:22.653: V/FA-SVC(1776):     }
09-04 12:21:22.653: V/FA-SVC(1776):     event {
09-04 12:21:22.653: V/FA-SVC(1776):       name: login
09-04 12:21:22.653: V/FA-SVC(1776):       timestamp_millis: 1504509681929
09-04 12:21:22.653: V/FA-SVC(1776):       previous_timestamp_millis: 1504509381549
09-04 12:21:22.653: V/FA-SVC(1776):       param {
09-04 12:21:22.653: V/FA-SVC(1776):         name: firebase_event_origin(_o)
09-04 12:21:22.653: V/FA-SVC(1776):         string_value: app
09-04 12:21:22.653: V/FA-SVC(1776):       }
09-04 12:21:22.653: V/FA-SVC(1776):       param {
09-04 12:21:22.653: V/FA-SVC(1776):         name: _r
09-04 12:21:22.653: V/FA-SVC(1776):         int_value: 1
09-04 12:21:22.653: V/FA-SVC(1776):       }
09-04 12:21:22.653: V/FA-SVC(1776):       param {
09-04 12:21:22.653: V/FA-SVC(1776):         name: _dbg
09-04 12:21:22.653: V/FA-SVC(1776):         int_value: 1
09-04 12:21:22.653: V/FA-SVC(1776):       }
09-04 12:21:22.653: V/FA-SVC(1776):     }
09-04 12:21:22.653: V/FA-SVC(1776):   }
09-04 12:21:22.653: V/FA-SVC(1776): }
09-04 12:21:22.663: V/FA-SVC(1776): Not stopping services. fetch, network, upload: false, true, false
09-04 12:21:22.663: V/FA-SVC(1776): Uploading data. size: 386
09-04 12:21:22.973: V/FA-SVC(1776): Upload scheduled in approximately ms: 3599995
09-04 12:21:23.013: V/FA-SVC(1776): Scheduling upload with AlarmManager
09-04 12:21:23.013: V/FA-SVC(1776): Successful upload. Got network response. code, size: 204, 0
09-04 12:21:23.023: V/FA-SVC(1776): Nothing to upload or uploading impossible
09-04 12:21:23.043: V/FA-SVC(1776): Stopping uploading service(s)
09-04 12:21:23.053: V/FA-SVC(1776): Device PackageMeasurementService is shutting down
09-04 12:21:23.053: V/FA-SVC(1776): Device PackageMeasurementService processed last upload request. StartId: 1

Canā€™t get event on Firebase dashboard?
what android os?

could you get the realtime debug info in debugview ?

We have 3 apps in one project with different package names. All the events are shown in the first one although the differents app were used.

Android 5.0.1 Samsung Galaxy S4

Unfortunately there were no realtime debug info in all apps.

did you generate googleservices.xml and copy it to ./proj.android-studio/app/res/values/googleservices.xml ?

Yes, I created file googleservices.xml and copied to ./proj.android-studio/app/res/values/