Closed amigoni closed 6 years ago
Which API's of the module do you use? Which module version? Which SDK version? tiapp.xml config?
Good point. SDK 7.0.1 FBcore 2.0.0, FBAnalytics 2.0.1,
I use only the following :
var FirebaseCore = require('firebase.core');
var FirebaseAnalytics = require('firebase.analytics');
FirebaseCore.configure();
FirebaseAnalytics.enabled = true;
FirebaseAnalytics.userID = vendorID;
FirebaseAnalytics.log(eventName, data);
FirebaseAnalytics.setScreenNameAndScreenClass({
screenName: screenName,
screenClass: screenName
});
`<service android:enabled="true" android:exported="false" android:name="com.google.android.gms.measurement.AppMeasurementService"/>
<service android:enabled="true" android:exported="false"
android:name="com.google.android.gms.measurement.AppMeasurementJobService" android:permission="android.permission.BIND_JOB_SERVICE"/>
<service android:exported="false" android:name="com.fluidmarket.fluid.gcm.RegistrationIntentService"/>
<receiver android:enabled="true" android:name="com.google.android.gms.measurement.AppMeasurementReceiver">
<intent-filter>
<action android:name="com.google.android.gms.measurement.UPLOAD"/>
</intent-filter>
</receiver>
<service android:exported="false" android:name="com.fluidmarket.fluid.gcm.GcmIntentService">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE"/>
</intent-filter>
</service>
<service android:exported="false" android:name="com.fluidmarket.fluid.gcm.GcmIntentService">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.SEND"/>
</intent-filter>
</service>
<service android:exported="false" android:name="com.fluidmarket.fluid.gcm.GcmIDListenerService">
<intent-filter>
<action android:name="com.google.android.gms.iid.InstanceID"/>
</intent-filter>
</service>`
Mhh, I have no idea. It seems related to the log
method, but not sure. Do you use main thread? And how does data
look like? It may have a circular structure or non-serializable data?
Yes. Question. Is the second parameter on the log call a Javascript Object? Also if the first or second parameter is null or one of the attributes of the second is null, could that potentially cause it?
Yep, if the first one is null it will crash for sure. For the second one, it has to be an Object, e.g. { ... }
with valid Firebase Analytics log keys (important!). In native apps, the log keys are mapped through constants, for Titanium, I wanted to keep it flexible but still based on their requirements. The raw values are listed below each constant, e.g. ITEM_NAME
equals item_name
.
Yep, it's gotta be one of those two then
Ok but the second one is optional correct? It says on the doc optional arguments. Does it mean I have to at least send in an empty object? Or can I call the log function with just the first param?
I think the second one can be null, but I have not tested that.
Just tested it. Need to send at least an empty object or it will crash.
Ok, I‘ll change the API to allow an empty parameter as well. Can this one be closed?
Up to you. Only way for me to find out for sure is release and see if I am still getting the errors. My suspicion is that the error came from invalid attributes in the object as the second parameters. Probably releasing today. So will start having data in a couple of days. Thanks
Will keep open for now. The code change will also have to wait until more spare time available.
Still getting this issue in the last version even with the adjustments made. I only fire log events if there is a eventName and i use an empty object as second param. Here is one of the error reported in the crashlogs.
backtrace:
To confirm: The key of the event (1st parameter) is a valid Firebase event as well? E.g. first_open
. Also note the general structure. It my be invalid to pass an empty dictionary, so I will update the API to allow both.
@amigoni Status here?
Still getting the error, seems to be less frequent so I am going through the event names to verify that there is no conflicts.
@amigoni I'd like to fix or close this issue, can you give an update with latest versions of the module (v2.1.1)?
Closing due to inactivity.
Hi, I am getting this error reported a few times on the Android Vitals on the production app. Can't seem to reproduce it in dev environment. Does anyone know what it might be? Thanks
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)
_ZN8firebase9analytics31TitaniumFirebaseAnalyticsModule3logERKN2v820FunctionCallbackInfoINS2_5ValueEEE
backtrace:
00 pc 0000000000005234 /data/app/com.fluidmarket.fluid-1/lib/arm64/libfirebase.analytics.so (_ZN8firebase9analytics31TitaniumFirebaseAnalyticsModule3logERKN2v820FunctionCallbackInfoINS2_5ValueEEE+120)
01 pc 0000000000728c00 /data/app/com.fluidmarket.fluid-1/lib/arm64/libkroll-v8.so (_ZN2v88internal25FunctionCallbackArguments4CallEPFvRKNS_20FunctionCallbackInfoINS_5ValueEEEE+188)
02 pc 000000000077cb6c /data/app/com.fluidmarket.fluid-1/lib/arm64/libkroll-v8.so
03 pc 000000000077d150 /data/app/com.fluidmarket.fluid-1/lib/arm64/libkroll-v8.so
04 pc 000000000077d3bc /data/app/com.fluidmarket.fluid-1/lib/arm64/libkroll-v8.so (_ZN2v88internal21Builtin_HandleApiCallEiPPNS0_6ObjectEPNS0_7IsolateE+28)
05 pc 00000000000000e4