[SOLVED]SDKBOX_CORE: Checking plugin status for unknown plugin: Firebase

Hello
I am going to integrate Firebase to my cocos2d-x lua game
I am using SDKBOX and have done one by one from this manual

https://docs.sdkbox.com/en/plugins/firebase/v3-lua/#sdk-version

The build is success and I am now checking if Firebase analytics is working or not.
But it seems not working.

Here is code of lua

print("before firebase event")
sdkbox.firebase.Analytics:init()
print("finish init firebase event")

local evt = {
	[sdkbox.firebase.Analytics.Param.kFIRParameterItemID] = 'id123456',
	[sdkbox.firebase.Analytics.Param.kFIRParameterItemName] = 'name123456',
	[sdkbox.firebase.Analytics.Param.kFIRParameterItemCategory] = 'category123456',
	[sdkbox.firebase.Analytics.Param.kFIRParameterPrice] = '123.4'
}
sdkbox.firebase.Analytics:logEvent(sdkbox.firebase.Analytics.Event.kFIREventViewItem, evt)
print("sent firebase event")

But I am getting this log from logcat

Lua: before firebase event
SDKBOX_CORE: Checking plugin status for unknown plugin: Firebase                                
SDKBOX_CORE: Initialization request for plugin: 'com/sdkbox/plugin/firebase/Analytics/Analytics'
Lua: finish init firebase event
Lua: sent firebase event

And I can’t see any analytics logs from Firebase console.

Could you please check which case this problem occur?
I did everything step by step in https://docs.sdkbox.com/en/plugins/firebase/v3-lua/#sdk-version

BTW When I write code like below(get version info of firebase)

local firebaseVersion = sdkbox.firebase.Analytics:getVersion()
print("firebase version:"..firebaseVersion )

Then logcat shows version info

Lua: firebase version:3.6.0

Thank you

Hello @yinjimmy
How’s it going?
Could you please check and let me know your precious advice?
Thank you

When I add sdxbox_config.json in /res directory, below line is removed from logcat

SDKBOX_CORE: Checking plugin status for unknown plugin: Firebase

But I can’t get any event from Firebase console.
My skdbox_config.json contents are below:

{
    "android": {
        "Firebase": {}
    },
    "ios": {
        "Firebase": {}
    }
}

same as https://github.com/sdkbox/sdkbox-sample-firebase/blob/master/lua/res/sdkbox_config.json
Do I need add some info in sdkbox_config.json?

Thank you

We can ask @yinjimmy to read this topic.

@yinjimmy
Could you please take a look this topic?
Many Thank you

When I see log cat , I can see belows

09-21 16:59:25.075 14617 14786 V FA      : Collection enabled
09-21 16:59:25.075 14617 14786 V FA      : App package, google app id: test.game.com, 1:700757031408:android:9453103ce0cb4893478535
09-21 16:59:25.076 14617 14786 I FA      : App measurement is starting up, version: 12211
09-21 16:59:25.077 14617 14786 I FA      : To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
09-21 16:59:25.077 14617 14786 I FA      : Faster debug mode event logging enabled. To disable, run:
09-21 16:59:25.077 14617 14786 I FA      :   adb shell setprop debug.firebase.analytics.app .none.
09-21 16:59:25.078 14617 14786 D FA      : Debug-level message logging enabled
09-21 16:59:25.080 14617 14786 V FA      : Persisting first open: 1600696764969

**09-21 16:59:25.104 14617 14786 E FA      : AppMeasurementService not registered/enabled**
**09-21 16:59:25.105 14617 14786 E FA      : Uploading is not possible. App measurement disabled**

I add below lines to AndroidManifest.xml

<service android:name="com.google.android.gms.measurement.AppMeasurementService"
    android:enabled="true"
    android:exported="false"/>
<receiver android:name="com.google.android.gms.measurement.AppMeasurementReceiver"
    android:enabled="true">
    <intent-filter>
        <action android:name="com.google.android.gms.measurement.UPLOAD" />
    </intent-filter>
</receiver>

But still says

AppMeasurementService not registered/enabled

plz unpack you apk, and make sure there is sdkbox_config.json in your apk.

Yes sdkbox_config.json is in apk.
If apk extract folder name is test
/test/assets/res/sdkbox_config.json

09-21 18:03:13.030 V/FA      (24941): Registered activity lifecycle callback
09-21 18:03:13.083 V/FA      (24941): Cancelling job. JobID: 1793668389
09-21 18:03:13.105 V/FA      (24941): Collection enabled
09-21 18:03:13.105 V/FA      (24941): App package, google app id: test.game.com, 1:700757031408:android:9453103ce0cb4893478535
09-21 18:03:13.107 I/FA      (24941): App measurement is starting up, version: 12211
09-21 18:03:13.107 I/FA      (24941): To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
09-21 18:03:13.108 I/FA      (24941): Faster debug mode event logging enabled. To disable, run:
09-21 18:03:13.108 I/FA      (24941):   adb shell setprop debug.firebase.analytics.app .none.
09-21 18:03:13.108 D/FA      (24941): Debug-level message logging enabled
09-21 18:03:13.110 V/FA      (24941): Persisting first open: 1600700593002
09-21 18:03:13.129 E/FA      (24941): AppMeasurementService not registered/enabled
09-21 18:03:13.130 E/FA      (24941): Uploading is not possible. App measurement disabled
09-21 18:03:13.326 I/FA      (24941): Tag Manager is not found and thus will not be used

Above is logcat, and I am not sure why still App measurement is disabled…
My device is Android 9.0 and Samsung A10

I am attaching my AndroidManifest.xml and googleservices.xml and plugin files which I used
files.zip (1.7 MB)

Problem is resolved

Answer is here:

Thank you team

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.