Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

16.1.5: Androidx error -> crash #29

Open
m1ga opened this issue Sep 5, 2019 · 5 comments
Open

16.1.5: Androidx error -> crash #29

m1ga opened this issue Sep 5, 2019 · 5 comments

Comments

@m1ga
Copy link
Contributor

m1ga commented Sep 5, 2019

I was testing 16.1.5 today with my FCM test app. It will crash with:

[ERROR] FirebaseApp: Firebase API initialization failure.
[ERROR] FirebaseApp: java.lang.reflect.InvocationTargetException
[ERROR] FirebaseApp:    at java.lang.reflect.Method.invoke(Native Method)
[ERROR] FirebaseApp:    at com.google.firebase.FirebaseApp.initializeApis(com.google.firebase:firebase-common@@16.1.0:815)
[ERROR] FirebaseApp:    at com.google.firebase.FirebaseApp.initializeAllApis(com.google.firebase:firebase-common@@16.1.0:785)
[ERROR] FirebaseApp:    at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.1.0:369)
[ERROR] FirebaseApp:    at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.1.0:332)
[ERROR] FirebaseApp:    at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@16.1.0:316)
[ERROR] FirebaseApp:    at com.google.firebase.provider.FirebaseInitProvider.onCreate(com.google.firebase:firebase-common@@16.1.0:53)
[ERROR] FirebaseApp:    at android.content.ContentProvider.attachInfo(ContentProvider.java:1793)
[ERROR] FirebaseApp:    at android.content.ContentProvider.attachInfo(ContentProvider.java:1762)
[ERROR] FirebaseApp:    at com.google.firebase.provider.FirebaseInitProvider.attachInfo(com.google.firebase:firebase-common@@16.1.0:47)
[ERROR] FirebaseApp:    at android.app.ActivityThread.installProvider(ActivityThread.java:6141)
[ERROR] FirebaseApp:    at android.app.ActivityThread.installContentProviders(ActivityThread.java:5704)
[ERROR] FirebaseApp:    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5643)
[ERROR] FirebaseApp:    at android.app.ActivityThread.-wrap2(ActivityThread.java)
[ERROR] FirebaseApp:    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1573)
[ERROR] FirebaseApp:    at android.os.Handler.dispatchMessage(Handler.java:102)
[ERROR] FirebaseApp:    at android.os.Looper.loop(Looper.java:173)
[ERROR] FirebaseApp:    at android.app.ActivityThread.main(ActivityThread.java:6459)
[ERROR] FirebaseApp:    at java.lang.reflect.Method.invoke(Native Method)
[ERROR] FirebaseApp:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:938)
[ERROR] FirebaseApp:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:828)
[ERROR] FirebaseApp: Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/collection/ArrayMap;
[ERROR] FirebaseApp:    at com.google.android.gms.internal.measurement.zzcm.<clinit>(com.google.android.gms:play-services-measurement-impl@@17.2.0:7)
[ERROR] FirebaseApp:    at com.google.android.gms.internal.measurement.zzcm.zza(com.google.android.gms:play-services-measurement-impl@@17.2.0:1)
[ERROR] FirebaseApp:    at com.google.android.gms.internal.measurement.zzla.<clinit>(com.google.android.gms:play-services-measurement-impl@@17.2.0:5)
[ERROR] FirebaseApp:    at com.google.android.gms.internal.measurement.zzky.<init>(com.google.android.gms:play-services-measurement-impl@@17.2.0:6)
[ERROR] FirebaseApp:    at com.google.android.gms.internal.measurement.zzky.<clinit>(com.google.android.gms:play-services-measurement-impl@@17.2.0:11)
[ERROR] FirebaseApp:    at com.google.android.gms.internal.measurement.zzky.zzb(com.google.android.gms:play-services-measurement-impl@@17.2.0:1)
[ERROR] FirebaseApp:    at com.google.android.gms.measurement.internal.zzap.<clinit>(com.google.android.gms:play-services-measurement-impl@@17.2.0:542)
[ERROR] FirebaseApp:    at com.google.android.gms.measurement.internal.zzap.zza(com.google.android.gms:play-services-measurement-impl@@17.2.0:21)
[ERROR] FirebaseApp:    at com.google.android.gms.measurement.internal.zzfx.<init>(com.google.android.gms:play-services-measurement-impl@@17.2.0:8)
[ERROR] FirebaseApp:    at com.google.android.gms.measurement.internal.zzfx.zza(com.google.android.gms:play-services-measurement-impl@@17.2.0:305)
[ERROR] FirebaseApp:    at com.google.android.gms.measurement.internal.zzfx.zza(com.google.android.gms:play-services-measurement-impl@@17.2.0:294)
[ERROR] FirebaseApp:    at com.google.android.gms.measurement.AppMeasurement.zza(com.google.android.gms:play-services-measurement-impl@@17.2.0:9)
[ERROR] FirebaseApp:    at com.google.android.gms.measurement.AppMeasurement.getInstance(com.google.android.gms:play-services-measurement-impl@@17.2.0:1)
[ERROR] FirebaseApp:    ... 21 more
[ERROR] FirebaseApp: Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.collection.ArrayMap" on path: DexPathList[[zip file "/data/app/com.miga.testfirebase-1/base.apk"],nativeLibraryDirectories=[/data/app/com.miga.testfirebase-1/lib/arm64, /data/app/com.miga.testfirebase-1/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]                                                                                    
[ERROR] FirebaseApp:    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
[ERROR] FirebaseApp:    at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
[ERROR] FirebaseApp:    at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
[ERROR] FirebaseApp:    ... 34 more

I'm not sure if I need to recompile FCM modules with newer playservice libs or if there is any androidx component inside the libs of ti.playservice 16.1.5 that are not supported (the error points to ArrayMap). So currently the best version to use is 16.1.4 and remove the ads-lite lib.

@roelandp
Copy link

roelandp commented Sep 6, 2019

@m1ga tried to rebuild all fcm modules: (core, analytics, cloudmessaging) with ti.playservices 1.16.5 - but finding same crash as you.

With playservices 1.16.4 or 1.16.3 I'm running into dreaded: Token retrieval failed: SERVICE_NOT_AVAILABLE on Android 7 / 7.1

Hopefully 1.16.5 will fix that, but we should find a way to get things rolling. My apps currently hang on Android 7/7.1 :(

@roelandp
Copy link

roelandp commented Sep 8, 2019

@m1ga tried to rebuild all fcm modules: (core, analytics, cloudmessaging) with ti.playservices 1.16.5 - but finding same crash as you.

With playservices 1.16.4 or 1.16.3 I'm running into dreaded: Token retrieval failed: SERVICE_NOT_AVAILABLE on Android 7 / 7.1

Hopefully 1.16.5 will fix that, but we should find a way to get things rolling. My apps currently hang on Android 7/7.1 :(

My case had been fixed with help of @m1ga (using 16.1.4)

@m1ga
Copy link
Contributor Author

m1ga commented Sep 21, 2019

Same with maps btw:

Failed resolution of: Landroidx/fragment/app/Fragment;

[INFO]  System: exec(/system/bin/getprop debug.mapview.logs @ com.google.maps.api.android.lib6.common.p.b)
[INFO]  I/Google Maps Android API: Google Play services client version: 12451000
[INFO]  art: Rejecting re-init on previously-failed class java.lang.Class<com.google.android.gms.maps.SupportMapFragment>: java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/fragment/app/Fragment;
[INFO]  art:   at org.appcelerator.titanium.view.TiUIView ti.map.ViewProxy.createView(android.app.Activity) (ViewProxy.java:98)
[INFO]  art:   at org.appcelerator.titanium.view.TiUIView org.appcelerator.titanium.proxy.TiViewProxy.handleGetView() (TiViewProxy.java:492)
[INFO]  art:   at org.appcelerator.titanium.view.TiUIView org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView() (TiViewProxy.java:464)
[INFO]  art:   at void org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(org.appcelerator.titanium.view.TiUIView) (TiViewProxy.java:515)
[INFO]  art:   at org.appcelerator.titanium.view.TiUIView org.appcelerator.titanium.proxy.TiViewProxy.handleGetView() (TiViewProxy.java:498)
[INFO]  art:   at org.appcelerator.titanium.view.TiUIView org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView() (TiViewProxy.java:464)
[INFO]  art:   at void org.appcelerator.titanium.proxy.TiViewProxy.add(java.lang.Object) (TiViewProxy.java:604)
[INFO]  art:   at void ti.modules.titanium.ui.WindowProxy.windowCreated(org.appcelerator.titanium.TiBaseActivity, android.os.Bundle) (WindowProxy.java:328)
[INFO]  art:   at void org.appcelerator.titanium.TiActivityWindows.windowCreated(org.appcelerator.titanium.TiBaseActivity, int, android.os.Bundle) (TiActivityWindows.java:57)
[INFO]  art:   at void org.appcelerator.titanium.TiBaseActivity.windowCreated(android.os.Bundle) (TiBaseActivity.java:578)
[INFO]  art:   at void org.appcelerator.titanium.TiBaseActivity.onCreate(android.os.Bundle) (TiBaseActivity.java:726)
[INFO]  art:   at void org.appcelerator.titanium.TiActivity.onCreate(android.os.Bundle) (TiActivity.java:47)
[INFO]  art:   at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:6673)
[INFO]  art:   at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1136)
[INFO]  art:   at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2678)
[INFO]  art:   at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:2786)
[INFO]  art:   at void android.app.ActivityThread.-wrap12(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1)
[INFO]  art:   at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1501)
[INFO]  art:   at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:102)
[INFO]  art:   at void android.os.Looper.loop() (Looper.java:173)
[INFO]  art:   at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6459)
[INFO]  art:   at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2)
[INFO]  art:   at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:938)
[INFO]  art:   at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:828)
[INFO]  art: Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.fragment.app.Fragment" on path: DexPathList[[zip file "/data/app/com.miga.test-1/base.apk"],nativeLibraryDirectories=[/data/app/com.miga.test-1/lib/arm64, /data/app/com.miga.test-1/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]                                                                                                                  
[INFO]  art:   at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:56)
[INFO]  art:   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:380)
[INFO]  art:   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
[INFO]  art:   at org.appcelerator.titanium.view.TiUIView ti.map.ViewProxy.createView(android.app.Activity) (ViewProxy.java:98)
[INFO]  art:   at org.appcelerator.titanium.view.TiUIView org.appcelerator.titanium.proxy.TiViewProxy.handleGetView() (TiViewProxy.java:492)
[INFO]  art:   at org.appcelerator.titanium.view.TiUIView org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView() (TiViewProxy.java:464)
[INFO]  art:   at void org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(org.appcelerator.titanium.view.TiUIView) (TiViewProxy.java:515)
[INFO]  art:   at org.appcelerator.titanium.view.TiUIView org.appcelerator.titanium.proxy.TiViewProxy.handleGetView() (TiViewProxy.java:498)
[INFO]  art:   at org.appcelerator.titanium.view.TiUIView org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView() (TiViewProxy.java:464)
[INFO]  art:   at void org.appcelerator.titanium.proxy.TiViewProxy.add(java.lang.Object) (TiViewProxy.java:604)
[INFO]  art:   at void ti.modules.titanium.ui.WindowProxy.windowCreated(org.appcelerator.titanium.TiBaseActivity, android.os.Bundle) (WindowProxy.java:328)
[INFO]  art:   at void org.appcelerator.titanium.TiActivityWindows.windowCreated(org.appcelerator.titanium.TiBaseActivity, int, android.os.Bundle) (TiActivityWindows.java:57)
[INFO]  art:   at void org.appcelerator.titanium.TiBaseActivity.windowCreated(android.os.Bundle) (TiBaseActivity.java:578)
[INFO]  art:   at void org.appcelerator.titanium.TiBaseActivity.onCreate(android.os.Bundle) (TiBaseActivity.java:726)
[INFO]  art:   at void org.appcelerator.titanium.TiActivity.onCreate(android.os.Bundle) (TiActivity.java:47)
[INFO]  art:   at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:6673)
[INFO]  art:   at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1136)
[INFO]  art:   at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2678)
[INFO]  art:   at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:2786)
[INFO]  art:   at void android.app.ActivityThread.-wrap12(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1)
[INFO]  art:   at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1501)
[INFO]  art:   at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:102)
[INFO]  art:   at void android.os.Looper.loop() (Looper.java:173)
[INFO]  art:   at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6459)
[INFO]  art:   at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2)
[INFO]  art:   at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:938)
[INFO]  art:   at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:828)

@m1ga m1ga changed the title 16.1.5 in combination with Firebase FCM 16.1.5: Androidx error -> crash Sep 21, 2019
@fahad86
Copy link

fahad86 commented Sep 30, 2019

The new play-services libs (17+) seem to be having dependancies on androidx libraries. Better to not use 17+ libs for now.

You can check the dependancies here: https://mvnrepository.com/artifact/com.google.android.gms/play-services-base/17.1.0

vs 16.1.0: https://mvnrepository.com/artifact/com.google.android.gms/play-services-base/16.1.0

better to delete the 16.1.5 release of the module

@m1ga
Copy link
Contributor Author

m1ga commented Jan 27, 2020

@jquick-axway I saw the new PR for SDK 9. Can we have a working version for SDK <= 8. So not 16.1.5 (androidx error) but a 16.1.4 without the ads-lite library. Currently the last two released version don't work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants