appcelerator-archive / ti.googleanalytics

Google Analytics module for Titanium Mobile
4 stars 8 forks source link

the method failed. #4

Open time-wcrp opened 8 years ago

time-wcrp commented 8 years ago

platform: android android-sdk: 23.0 ti-sdk: 5.1.1.GA module-version: ti.googleanalytics 1.2

error message

Uncaught TypeError: Object #<Googleanalytics> has no method 'getFields'
antonioduran commented 8 years ago

I have the same situation in android. I am using ti.googleanalytics version: 1.2 , and I am getting the following:

[ERROR] :  TiExceptionHandler: (main) [353,407] ----- Titanium Javascript Runtime Error -----
[ERROR] :  TiExceptionHandler: (main) [0,407] - In app.js:4,27
[ERROR] :  TiExceptionHandler: (main) [0,407] - Message: Uncaught TypeError: Object #<Googleanalytics> has no method 'getFields'
[ERROR] :  TiExceptionHandler: (main) [0,407] - Source:     Fields = GoogleAnalytics.getFields(),
ernestosanchezk commented 8 years ago

Hi, I'm currently having the same issue. I'm trying to implement campaigns but when I try to call the getFields method I'm getting the same error.

moonlightbrandon commented 8 years ago

@iiitum @antonioduran @ernestosanchezk Did any of you figure out what was going wrong? I'm having the same issue.

ashcoding commented 8 years ago

Have you guys create a Jira ticket yet? Seems like something is going on. What configurations would allow it to work and what would crash it?

moonlightbrandon commented 8 years ago

All, I am no longer getting the issue with getFields. I removed a duplicate Google Play Services module from my library modules directory and it compiled. Analytics worked on a Galaxy Nexus running Jelly Bean 4.3, but I just tried it on two different Marshmallow devices and got this error:

[ERROR] TiApplication: (GAThread) [15,5271] Sending event: exception on thread: GAThread msg:java.lang.IllegalArgumentException: Service Intent must be explicit: Intent { act=com.google.android.gms.analytics.service.START VirtualScreenParam=Params{mDisplayId=-1, null, mFlags=0x00000000)} (has extras) }; Titanium 5.2.0,2016/02/20 08:05,384775e [ERROR] TiApplication: java.lang.IllegalArgumentException: Service Intent must be explicit: Intent { act=com.google.android.gms.analytics.service.START VirtualScreenParam=Params{mDisplayId=-1, null, mFlags=0x00000000)} (has extras) } [ERROR] TiApplication: at android.app.ContextImpl.validateServiceIntent(ContextImpl.java:1293) [ERROR] TiApplication: at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:1417) [ERROR] TiApplication: at android.app.ContextImpl.bindService(ContextImpl.java:1395) [ERROR] TiApplication: at android.content.ContextWrapper.bindService(ContextWrapper.java:632) [ERROR] TiApplication: at com.google.analytics.tracking.android.AnalyticsGmsCoreClient.connect(AnalyticsGmsCoreClient.java:82) [ERROR] TiApplication: at com.google.analytics.tracking.android.GAServiceProxy.connectToService(GAServiceProxy.java:330) [ERROR] TiApplication: at com.google.analytics.tracking.android.GAServiceProxy.createService(GAServiceProxy.java:210) [ERROR] TiApplication: at com.google.analytics.tracking.android.GAThread.init(GAThread.java:85) [ERROR] TiApplication: at com.google.analytics.tracking.android.GAThread.run(GAThread.java:352) [ERROR] AndroidRuntime: FATAL EXCEPTION: GAThread [ERROR] AndroidRuntime: Process: com.moonlightingllc.Moonlighting, PID: 19674 [ERROR] AndroidRuntime: java.lang.IllegalArgumentException: Service Intent must be explicit: Intent { act=com.google.android.gms.analytics.service.START VirtualScreenParam=Params{mDisplayId=-1, null, mFlags=0x00000000)} (has extras) } [ERROR] AndroidRuntime: at android.app.ContextImpl.validateServiceIntent(ContextImpl.java:1293) [ERROR] AndroidRuntime: at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:1417) [ERROR] AndroidRuntime: at android.app.ContextImpl.bindService(ContextImpl.java:1395) [ERROR] AndroidRuntime: at android.content.ContextWrapper.bindService(ContextWrapper.java:632) [ERROR] AndroidRuntime: at com.google.analytics.tracking.android.AnalyticsGmsCoreClient.connect(AnalyticsGmsCoreClient.java:82) [ERROR] AndroidRuntime: at com.google.analytics.tracking.android.GAServiceProxy.connectToService(GAServiceProxy.java:330) [ERROR] AndroidRuntime: at com.google.analytics.tracking.android.GAServiceProxy.createService(GAServiceProxy.java:210) [ERROR] AndroidRuntime: at com.google.analytics.tracking.android.GAThread.init(GAThread.java:85) [ERROR] AndroidRuntime: at com.google.analytics.tracking.android.GAThread.run(GAThread.java:352)