Closed Wingee closed 5 years ago
I too am getting this error. Seems like it's happening whenever an Analytics function is called, e.g. log, setScreenNameAndClass. TiSDK 8.0.0, ti.playservices 16.1.2, firebase-core 4.0.0, firebase-analytics 3.0.0
Same here
Also getting the same error
I'm also getting this error, I have gone back to the below to get it working again:
<module platform="android" version="11.0.40">ti.playservices</module>
<module version="3.0.0">firebase.core</module>
<module version="2.1.1">firebase.analytics</module>
I'm also getting this error, I have gone back to the below to get it working again:
<module platform="android" version="11.0.40">ti.playservices</module>
<module version="3.0.0">firebase.core</module>
<module version="2.1.1">firebase.analytics</module>
This should be not the solution. My complete error log:
[ERROR] : TiExceptionHandler: (main) [2459,2459] /app.js:1113 [ERROR] : TiExceptionHandler: global.firebaseAnalytics.log('login', { username: result.response.Email }); [ERROR] : TiExceptionHandler: ^ [ERROR] : TiExceptionHandler: Error: Failed resolution of: Lcom/google/android/gms/measurement/internal/zzbw; [ERROR] : TiExceptionHandler: at success (/app.js:1113:40) [ERROR] : TiExceptionHandler: at HTTPClient.xhr.onload (/lib/xhr.js:233:7) [ERROR] : TiExceptionHandler: [ERROR] : TiExceptionHandler: com.google.firebase.analytics.FirebaseAnalytics.getInstance(Unknown Source) [ERROR] : TiExceptionHandler: firebase.analytics.TitaniumFirebaseAnalyticsModule.analyticsInstance(TitaniumFirebaseAnalyticsModule.java:37) [ERROR] : TiExceptionHandler: firebase.analytics.TitaniumFirebaseAnalyticsModule.log(TitaniumFirebaseAnalyticsModule.java:46) [ERROR] : TiExceptionHandler: org.appcelerator.kroll.runtime.v8.V8Object.nativeCallProperty(Native Method) [ERROR] : TiExceptionHandler: org.appcelerator.kroll.runtime.v8.V8Object.callProperty(V8Object.java:75) [ERROR] : TiExceptionHandler: org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1225) [ERROR] : TiExceptionHandler: android.os.Handler.dispatchMessage(Handler.java:106) [ERROR] : TiExceptionHandler: android.os.Looper.loop(Looper.java:203) [ERROR] : TiExceptionHandler: android.app.ActivityThread.main(ActivityThread.java:6255) [ERROR] : TiExceptionHandler: java.lang.reflect.Method.invoke(Native Method) [ERROR] : V8Exception: Exception occurred at /app.js:1113: Uncaught Error: Failed resolution of: Lcom/google/android/gms/measurement/internal/zzbw;
Any help is appreciated
TiSDK 8.0.0, ti.playservices 16.1.2, firebase-core 5.0.0, firebase-analytics 3.0.0, firebase-cloudmessaging 2.0.1
Just saw an additional warning: [WARN] : FirebaseMessaging: Unable to log event: analytics library is missing
Same here, not working unless I go back to
<module platform="android" version="11.0.40">ti.playservices</module>
<module version="3.0.0">firebase.core</module>
<module version="2.1.1">firebase.analytics</module>
I have never been able to use the latest version of this module on Android, I always had issues, while on iOS it always worked like a charm
I have got this error on Android too using the latest firebase-core (5.0.0) and ti.playservices (16.1.2).
Could someone look into this please?
Me too
Having same problem as OP with the latest modules. Combination suggested by Westmartin didn't work for me, it produces this error:
[WARN] : W/System.err: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.content.ContextWr
apper.getApplicationContext()' on a null object reference
[WARN] : W/System.err: at firebase.analytics.TitaniumFirebaseAnalyticsModule.analyticsInstance(TitaniumFirebaseAnalyticsModule.java:39)
[WARN] : W/System.err: at firebase.analytics.TitaniumFirebaseAnalyticsModule.log(TitaniumFirebaseAnalyticsModule.java:48)
[WARN] : W/System.err: at org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method)
[WARN] : W/System.err: at org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:63)
[WARN] : W/System.err: at org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:962)
[WARN] : W/System.err: at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1186)
[WARN] : W/System.err: at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:394)
[WARN] : W/System.err: at ti.modules.titanium.ui.ScrollableViewProxy.handleMessage(ScrollableViewProxy.java:159)
[WARN] : W/System.err: at android.os.Handler.dispatchMessage(Handler.java:98)
[WARN] : W/System.err: at android.os.Looper.loop(Looper.java:154)
[WARN] : W/System.err: at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:117)
[INFO] : ERROR: Firebase event log failed: pageView; FirebaseAnalytics.log Exception: Attempt to invoke virtual method 'android.content.Co
ntext android.content.ContextWrapper.getApplicationContext()' on a null object reference
I had to go all the way back 11.0.40/2.0.0/2.0.1 built with sdk 7.0.1 for things to work again.
I have just made it working with the latest library version. Here are the changes you will need:
an upgrade version of the ti.playservices 16.1.3 module (I built it myself).
include the latest firebase libraries to both the firebase.core and firebase.analytics modules:
firebase.core: firebase-common-16.1.0.aar firebase-core-16.0.8.aar firebase-iid-17.1.2.aar firebase-iid-interop-16.0.1.aar firebase-measurement-connector-17.0.1.aar
firebase.analytics: firebase-analytics-16.4.0.aar
@kitenium can you share the compile module please ? or create a pull request if you can ?
@SquirrelMobile Please make your own module. It's so much rewarding when you did it yourself.
All the library files can be found in the maven repo site: https://mvnrepository.com/
@kitenium would appreciate your module as I'm banging my head against the wall here!
@dyan02 Yes, that is exactly the reason. I thought the lib files should be better organised so that some people who do not use the cloud messaging won't suffer from this issue.
That seems to stop this error from occurring, thanks @dyan02 and @kitenium
I grabbed firebase-iid-17.1.2.aar firebase-iid-interop-16.0.1.aar firebase-measurement-connector-17.0.1.aar from the cloud messaging module and put it in a lib folder inside the analytics module and it now seems to be working. I'm not getting analytics data yet but I'm not getting the error!!
@hansemannn can you please add me as a contributor so i can push the required files into the repo?
@Wingee You can make a pull request that then can be reviewed by @m1ga or me. Thanks!
Created the PR
I am getting this error message with the latest version of the module, any ideas how I can resolve it?
[ERROR] : TiExceptionHandler: Error: Failed resolution of: Lcom/google/android/gms/measurement/internal/zzbw; [ERROR] : TiExceptionHandler: at HTTPClient.xhr.onerror (/wingee.utils.js:514:36) [ERROR] : TiExceptionHandler: [ERROR] : TiExceptionHandler: com.google.firebase.analytics.FirebaseAnalytics.getInstance(Unknown Source) [ERROR] : TiExceptionHandler: firebase.analytics.TitaniumFirebaseAnalyticsModule.analyticsInstance(TitaniumFirebaseAnalyticsModule.java:37) [ERROR] : TiExceptionHandler: firebase.analytics.TitaniumFirebaseAnalyticsModule.log(TitaniumFirebaseAnalyticsModule.java:46) [ERROR] : TiExceptionHandler: org.appcelerator.kroll.runtime.v8.V8Object.nativeCallProperty(Native Method) [ERROR] : TiExceptionHandler: org.appcelerator.kroll.runtime.v8.V8Object.callProperty(V8Object.java:75) [ERROR] : TiExceptionHandler: org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1226) [ERROR] : TiExceptionHandler: android.os.Handler.dispatchMessage(Handler.java:98) [ERROR] : TiExceptionHandler: android.os.Looper.loop(Looper.java:154) [ERROR] : TiExceptionHandler: android.app.ActivityThread.main(ActivityThread.java:6776) [ERROR] : TiExceptionHandler: java.lang.reflect.Method.invoke(Native Method)