Giter Site home page Giter Site logo

Comments (18)

hansemannn avatar hansemannn commented on June 30, 2024

Which API's of the module do you use? Which module version? Which SDK version? tiapp.xml config?

from titanium-firebase-analytics.

amigoni avatar amigoni commented on June 30, 2024

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>`

from titanium-firebase-analytics.

hansemannn avatar hansemannn commented on June 30, 2024

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?

from titanium-firebase-analytics.

amigoni avatar amigoni commented on June 30, 2024

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?

from titanium-firebase-analytics.

hansemannn avatar hansemannn commented on June 30, 2024

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.

from titanium-firebase-analytics.

amigoni avatar amigoni commented on June 30, 2024

Yep, it's gotta be one of those two then

from titanium-firebase-analytics.

amigoni avatar amigoni commented on June 30, 2024

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?

from titanium-firebase-analytics.

hansemannn avatar hansemannn commented on June 30, 2024

I think the second one can be null, but I have not tested that.

from titanium-firebase-analytics.

amigoni avatar amigoni commented on June 30, 2024

Just tested it. Need to send at least an empty object or it will crash.

from titanium-firebase-analytics.

hansemannn avatar hansemannn commented on June 30, 2024

Ok, I‘ll change the API to allow an empty parameter as well. Can this one be closed?

from titanium-firebase-analytics.

amigoni avatar amigoni commented on June 30, 2024

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

from titanium-firebase-analytics.

hansemannn avatar hansemannn commented on June 30, 2024

Will keep open for now. The code change will also have to wait until more spare time available.

from titanium-firebase-analytics.

amigoni avatar amigoni commented on June 30, 2024

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:
#00 pc 000000000000414c /data/app/com.fluidmarket.fluid-1/lib/arm/libfirebase.analytics.so (_ZN8titanium5Proxy7inheritIN8firebase9analytics31TitaniumFirebaseAnalyticsModuleEEEvRKN2v820FunctionCallbackInfoINS5_5ValueEEE+139)
#1 pc 00000000000045ff /data/app/com.fluidmarket.fluid-1/lib/arm/libfirebase.analytics.so (_ZN8firebase9analytics31TitaniumFirebaseAnalyticsModule3logERKN2v820FunctionCallbackInfoINS2_5ValueEEE+138)
#2 pc 0000000000598f18 /data/app/com.fluidmarket.fluid-1/lib/arm/libkroll-v8.so (_ZN2v88internal25FunctionCallbackArguments4CallEPFvRKNS_20FunctionCallbackInfoINS_5ValueEEEE+188)
#3 pc 00000000005ebe78 /data/app/com.fluidmarket.fluid-1/lib/arm/libkroll-v8.so
#4 pc 00000000005ec31c /data/app/com.fluidmarket.fluid-1/lib/arm/libkroll-v8.so
#5 pc 00000000005ec5a8 /data/app/com.fluidmarket.fluid-1/lib/arm/libkroll-v8.so (_ZN2v88internal21Builtin_HandleApiCallEiPPNS0_6ObjectEPNS0_7IsolateE+44)
#6 pc 0000000000000098

from titanium-firebase-analytics.

hansemannn avatar hansemannn commented on June 30, 2024

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.

from titanium-firebase-analytics.

hansemannn avatar hansemannn commented on June 30, 2024

@amigoni Status here?

from titanium-firebase-analytics.

amigoni avatar amigoni commented on June 30, 2024

Still getting the error, seems to be less frequent so I am going through the event names to verify that there is no conflicts.

from titanium-firebase-analytics.

hansemannn avatar hansemannn commented on June 30, 2024

@amigoni I'd like to fix or close this issue, can you give an update with latest versions of the module (v2.1.1)?

from titanium-firebase-analytics.

hansemannn avatar hansemannn commented on June 30, 2024

Closing due to inactivity.

from titanium-firebase-analytics.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.