hansemannn / titanium-firebase-analytics

Use the Firebase Analytics SDK in Axway Titanium 🚀
Other
35 stars 18 forks source link

Error: Failed resolution of: Lcom/google/firebase/analytics/FirebaseAnalytics; Appc SDK 9 #59

Closed jwogan5 closed 3 years ago

jwogan5 commented 4 years ago

My 2 latest app releases for Android are running all of the latest software. Appc SDK 9.0.3, the latest firebase modules. Ever since I moved to uploading the aab file instead of the apk file, firebase anayltics acts like I never released the app. Only the older versions are showing so my user counts are dropping fast since most users are now on the newest versions. Now I am not sure if it is an aab vs apk issue or it is just an issue with the latest firebase anayltics module but no new versions are showing on the firebase or google analytics websites.

The apps themselves run perfectly fine they just don't show up.

jwogan5 commented 4 years ago

So I had some try catch around my events. When I removed them I got the following error:

Error: Failed resolution of: Lcom/google/firebase/analytics/FirebaseAnalytics;

The app builds are runs fine though on SDK 9 but the actual module doesnt seem to be working.

[ERROR] Unhandled promise rejection Error: Failed resolution of: Lcom/google/firebase/analytics/FirebaseAnalytics; [ERROR] at performance.trackEvent (eval at Module._compile (/app.js:727:8), :63:14) [ERROR] at eval (eval at Module._compile (/app.js:727:8), :1104:41) [ERROR] at :5588:22 [ERROR] at flush (:5380:9) { [ERROR] nativeStack: '' + [ERROR] ' firebase.analytics.TitaniumFirebaseAnalyticsModule.analyticsInstance(TitaniumFirebaseAnalyticsModule.java:37)' + [ERROR] ' firebase.analytics.TitaniumFirebaseAnalyticsModule.log(TitaniumFirebaseAnalyticsModule.java:46)' + [ERROR] ' org.appcelerator.kroll.runtime.v8.V8Object.nativeCallProperty(Native Method)' + [ERROR] ' org.appcelerator.kroll.runtime.v8.V8Object.callProperty(V8Object.java:75)' + [ERROR] ' org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1222)' + [ERROR] ' android.os.Handler.dispatchMessage(Handler.java:101)' + [ERROR] ' android.os.Looper.loop(Looper.java:164)' + [ERROR] ' android.app.ActivityThread.main(ActivityThread.java:6938)' + [ERROR] ' java.lang.reflect.Method.invoke(Native Method)' + [ERROR] ' com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)' + [ERROR] '' [ERROR] }

jwogan5 commented 4 years ago

Latest Update:

I went ahead and downloaded the firebase core, analytics and cloud messaging modules.

Changes I made:

Analytics :::build.gradle: implementation 'com.google.firebase:firebase-analytics:17.4.3'

Messaging :::build.gradle: implementation 'com.google.firebase:firebase-messaging:20.2.0'

Core :::buld.gradle: implementation 'com.google.firebase:firebase-iid:20.2.0' implementation 'com.google.firebase:firebase-common:19.3.0'

I then modified call to core to be ::::
fireBaseCore.configure(); // no params

I also had to move google-services.json to under platform/android

I also had to comment out the googl_app_id from under platform/android/strings.xml

After I made all of those changes I verified that analytics and my new app versions for android are showing on the firebase analytics website. Also cloud messaging still works.

If anyone runs into these same issues the above steps is what worked for me to get everything running again.

joshualambert commented 4 years ago

@jwogan5 I'm seeing this same issue on Android only, SDK 8.

joshualambert commented 4 years ago
07-14 12:12:57.148      29099   -   E   com.test.app     java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/analytics/connector/AnalyticsConnector; 
07-14 12:12:57.148      29099   -   E   com.test.app        at com.google.firebase.analytics.connector.internal.AnalyticsConnectorRegistrar.getComponents(Unknown Source)   
07-14 12:12:57.148      29099   -   E   com.test.app        at com.google.firebase.components.ComponentRuntime.<init>(com.google.firebase:firebase-common@@16.1.0:56)   
07-14 12:12:57.148      29099   -   E   com.test.app        at com.google.firebase.FirebaseApp.<init>(com.google.firebase:firebase-common@@16.1.0:553)  
07-14 12:12:57.148      29099   -   E   com.test.app        at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.1.0:365)   
07-14 12:12:57.148      29099   -   E   com.test.app        at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.1.0:332)   
07-14 12:12:57.148      29099   -   E   com.test.app        at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.1.0:316)   
07-14 12:12:57.148      29099   -   E   com.test.app        at com.google.firebase.provider.FirebaseInitProvider.onCreate(com.google.firebase:firebase-common@@16.1.0:53)   
07-14 12:12:57.148      29099   -   E   com.test.app        at android.content.ContentProvider.attachInfo(ContentProvider.java:1751)    
07-14 12:12:57.148      29099   -   E   com.test.app        at android.content.ContentProvider.attachInfo(ContentProvider.java:1726)    
07-14 12:12:57.148      29099   -   E   com.test.app        at com.google.firebase.provider.FirebaseInitProvider.attachInfo(com.google.firebase:firebase-common@@16.1.0:47) 
07-14 12:12:57.148      29099   -   E   com.test.app        at android.app.ActivityThread.installProvider(ActivityThread.java:6028) 
07-14 12:12:57.148      29099   -   E   com.test.app        at android.app.ActivityThread.installContentProviders(ActivityThread.java:5620) 
07-14 12:12:57.148      29099   -   E   com.test.app        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5559)   
07-14 12:12:57.148      29099   -   E   com.test.app        at android.app.ActivityThread.-wrap2(ActivityThread.java)   
07-14 12:12:57.148      29099   -   E   com.test.app        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1596) 
07-14 12:12:57.148      29099   -   E   com.test.app        at android.os.Handler.dispatchMessage(Handler.java:102) 
07-14 12:12:57.148      29099   -   E   com.test.app        at android.os.Looper.loop(Looper.java:154)  
07-14 12:12:57.148      29099   -   E   com.test.app        at android.app.ActivityThread.main(ActivityThread.java:6313)    
07-14 12:12:57.148      29099   -   E   com.test.app        at java.lang.reflect.Method.invoke(Native Method)   
07-14 12:12:57.148      29099   -   E   com.test.app        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:872)  
07-14 12:12:57.148      29099   -   E   com.test.app        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:762) 
07-14 12:12:57.148      29099   -   E   com.test.app     Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.analytics.connector.AnalyticsConnector" on path: DexPathList[[zip file "/data/app/com.test.app-1/base.apk"],nativeLibraryDirectories=[/data/app/com.test.app-1/lib/arm, /data/app/com.test.app-1/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]] 
07-14 12:12:57.148      29099   -   E   com.test.app        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)   
07-14 12:12:57.148      29099   -   E   com.test.app        at java.lang.ClassLoader.loadClass(ClassLoader.java:380)    
07-14 12:12:57.148      29099   -   E   com.test.app        at java.lang.ClassLoader.loadClass(ClassLoader.java:312)    
07-14 12:12:57.148      29099   -   E   com.test.app        ... 21 more 
jwogan5 commented 4 years ago

@joshualambert I found this issue in the core firebase. It looks exactly like your issue. https://github.com/hansemannn/titanium-firebase-core/issues/45

hansemannn commented 3 years ago

This should not be an issue anymore, closing!