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

[BUG] 20.53.0 has breaking changes from dependencies #9534

Closed
rdlabo opened this issue Oct 31, 2024 · 2 comments
Closed

[BUG] 20.53.0 has breaking changes from dependencies #9534

rdlabo opened this issue Oct 31, 2024 · 2 comments
Labels

Comments

@rdlabo
Copy link

rdlabo commented Oct 31, 2024

Summary

Hi, I'm the maintainer of @capacitor-community/stripe, I've updated the SDK version to 20.53.+ and now I get the following error.

FATAL EXCEPTION: main
  Process: io.ionic.starter, PID: 22761
  java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: androidx.startup.StartupException: java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/lifecycle/ReportFragment$ActivityInitializationListener;

20.52.+ work fine.

Code to reproduce

  1. Clone and Build demo: https://github.com/capacitor-community/stripe?tab=readme-ov-file#how-to-use-demo
  2. Update SDK version to 20.53.+: https://github.com/capacitor-community/stripe/blob/main/packages/payment/android/build.gradle#L8 and https://github.com/capacitor-community/stripe/blob/main/packages/identity/android/build.gradle#L8
  3. Run demo at device

Android version

ext {
    minSdkVersion = 26
    compileSdkVersion = 34
    targetSdkVersion = 34
    androidxActivityVersion = '1.8.0'
    androidxAppCompatVersion = '1.6.1'
    androidxCoordinatorLayoutVersion = '1.2.0'
    androidxCoreVersion = '1.12.0'
    androidxFragmentVersion = '1.6.2'
    coreSplashScreenVersion = '1.0.1'
    androidxWebkitVersion = '1.9.0'
    junitVersion = '4.13.2'
    androidxJunitVersion = '1.1.5'
    androidxEspressoCoreVersion = '3.5.1'
    cordovaAndroidVersion = '10.1.1'
}

Impacted devices

Use Google Pixel 8a

Installation method

gradle dependency

Other information

This is all error:

2024-10-31 16:18:31.985 23103-23103 AndroidRuntime          io.ionic.starter                     E  FATAL EXCEPTION: main
                                                                                                    Process: io.ionic.starter, PID: 23103
                                                                                                    java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: androidx.startup.StartupException: java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/lifecycle/ReportFragment$ActivityInitializationListener;
                                                                                                    	at android.app.ActivityThread.installProvider(ActivityThread.java:8184)
                                                                                                    	at android.app.ActivityThread.installContentProviders(ActivityThread.java:7694)
                                                                                                    	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7383)
                                                                                                    	at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0)
                                                                                                    	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2379)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:107)
                                                                                                    	at android.os.Looper.loopOnce(Looper.java:232)
                                                                                                    	at android.os.Looper.loop(Looper.java:317)
                                                                                                    	at android.app.ActivityThread.main(ActivityThread.java:8592)
                                                                                                    	at java.lang.reflect.Method.invoke(Native Method)
                                                                                                    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
                                                                                                    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
                                                                                                    Caused by: androidx.startup.StartupException: androidx.startup.StartupException: java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/lifecycle/ReportFragment$ActivityInitializationListener;
                                                                                                    	at androidx.startup.AppInitializer.doInitialize(AppInitializer.java:187)
                                                                                                    	at androidx.startup.AppInitializer.discoverAndInitialize(AppInitializer.java:238)
                                                                                                    	at androidx.startup.AppInitializer.discoverAndInitialize(AppInitializer.java:206)
                                                                                                    	at androidx.startup.InitializationProvider.onCreate(InitializationProvider.java:45)
                                                                                                    	at android.content.ContentProvider.attachInfo(ContentProvider.java:2644)
                                                                                                    	at android.content.ContentProvider.attachInfo(ContentProvider.java:2613)
                                                                                                    	at android.app.ActivityThread.installProvider(ActivityThread.java:8179)
                                                                                                    	at android.app.ActivityThread.installContentProviders(ActivityThread.java:7694) 
                                                                                                    	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7383) 
                                                                                                    	at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0) 
                                                                                                    	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2379) 
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:107) 
                                                                                                    	at android.os.Looper.loopOnce(Looper.java:232) 
                                                                                                    	at android.os.Looper.loop(Looper.java:317) 
                                                                                                    	at android.app.ActivityThread.main(ActivityThread.java:8592) 
                                                                                                    	at java.lang.reflect.Method.invoke(Native Method) 
                                                                                                    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580) 
                                                                                                    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878) 
                                                                                                    Caused by: androidx.startup.StartupException: java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/lifecycle/ReportFragment$ActivityInitializationListener;
                                                                                                    	at androidx.startup.AppInitializer.doInitialize(AppInitializer.java:187)
                                                                                                    	at androidx.startup.AppInitializer.doInitialize(AppInitializer.java:173)
                                                                                                    	at androidx.startup.AppInitializer.discoverAndInitialize(AppInitializer.java:238) 
                                                                                                    	at androidx.startup.AppInitializer.discoverAndInitialize(AppInitializer.java:206) 
                                                                                                    	at androidx.startup.InitializationProvider.onCreate(InitializationProvider.java:45) 
                                                                                                    	at android.content.ContentProvider.attachInfo(ContentProvider.java:2644) 
                                                                                                    	at android.content.ContentProvider.attachInfo(ContentProvider.java:2613) 
                                                                                                    	at android.app.ActivityThread.installProvider(ActivityThread.java:8179) 
                                                                                                    	at android.app.ActivityThread.installContentProviders(ActivityThread.java:7694) 
                                                                                                    	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7383) 
                                                                                                    	at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0) 
                                                                                                    	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2379) 
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:107) 
                                                                                                    	at android.os.Looper.loopOnce(Looper.java:232) 
                                                                                                    	at android.os.Looper.loop(Looper.java:317) 
                                                                                                    	at android.app.ActivityThread.main(ActivityThread.java:8592) 
                                                                                                    	at java.lang.reflect.Method.invoke(Native Method) 
                                                                                                    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580) 
                                                                                                    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878) 
                                                                                                    Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/lifecycle/ReportFragment$ActivityInitializationListener;
                                                                                                    	at androidx.lifecycle.ProcessLifecycleInitializer.create(ProcessLifecycleInitializer.kt:37)
                                                                                                    	at androidx.lifecycle.ProcessLifecycleInitializer.create(ProcessLifecycleInitializer.kt:25)
                                                                                                    	at androidx.startup.AppInitializer.doInitialize(AppInitializer.java:180)
                                                                                                    	at androidx.startup.AppInitializer.doInitialize(AppInitializer.java:173) 
                                                                                                    	at androidx.startup.AppInitializer.discoverAndInitialize(AppInitializer.java:238) 
                                                                                                    	at androidx.startup.AppInitializer.discoverAndInitialize(AppInitializer.java:206) 
                                                                                                    	at androidx.startup.InitializationProvider.onCreate(InitializationProvider.java:45) 
                                                                                                    	at android.content.ContentProvider.attachInfo(ContentProvider.java:2644) 
                                                                                                    	at android.content.ContentProvider.attachInfo(ContentProvider.java:2613) 
                                                                                                    	at android.app.ActivityThread.installProvider(ActivityThread.java:8179) 
                                                                                                    	at android.app.ActivityThread.installContentProviders(ActivityThread.java:7694) 
                                                                                                    	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7383) 
                                                                                                    	at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0) 
                                                                                                    	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2379) 
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:107) 
                                                                                                    	at android.os.Looper.loopOnce(Looper.java:232) 
                                                                                                    	at android.os.Looper.loop(Looper.java:317) 
                                                                                                    	at android.app.ActivityThread.main(ActivityThread.java:8592) 
                                                                                                    	at java.lang.reflect.Method.invoke(Native Method) 
                                                                                                    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580) 
                                                                                                    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878) 
                                                                                                    Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.lifecycle.ReportFragment$ActivityInitializationListener" on path: DexPathList[[zip file "/data/app/~~O9IX_VHxJ597iJyC5remOw==/io.ionic.starter-rJujG58Vwxps1lOW3STU-A==/base.apk"],nativeLibraryDirectories=[/data/app/~~O9IX_VHxJ597iJyC5remOw==/io.ionic.starter-rJujG58Vwxps1lOW3STU-A==/lib/arm64, /data/app/~~O9IX_VHxJ597iJyC5remOw==/io.ionic.starter-rJujG58Vwxps1lOW3STU-A==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]]
                                                                                                    	at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:259)
                                                                                                    	at java.lang.ClassLoader.loadClass(ClassLoader.java:637)
                                                                                                    	at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
                                                                                                    	at androidx.lifecycle.ProcessLifecycleInitializer.create(ProcessLifecycleInitializer.kt:37) 
                                                                                                    	at androidx.lifecycle.ProcessLifecycleInitializer.create(ProcessLifecycleInitializer.kt:25) 
                                                                                                    	at androidx.startup.AppInitializer.doInitialize(AppInitializer.java:180) 
                                                                                                    	at androidx.startup.AppInitializer.doInitialize(AppInitializer.java:173) 
                                                                                                    	at androidx.startup.AppInitializer.discoverAndInitialize(AppInitializer.java:238) 
                                                                                                    	at androidx.startup.AppInitializer.discoverAndInitialize(AppInitializer.java:206) 
                                                                                                    	at androidx.startup.InitializationProvider.onCreate(InitializationProvider.java:45) 
                                                                                                    	at android.content.ContentProvider.attachInfo(ContentProvider.java:2644) 
                                                                                                    	at android.content.ContentProvider.attachInfo(ContentProvider.java:2613) 
                                                                                                    	at android.app.ActivityThread.installProvider(ActivityThread.java:8179) 
                                                                                                    	at android.app.ActivityThread.installContentProviders(ActivityThread.java:7694) 
                                                                                                    	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7383) 
                                                                                                    	at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0) 
                                                                                                    	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2379) 
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:107) 
                                                                                                    	at android.os.Looper.loopOnce(Looper.java:232) 
                                                                                                    	at android.os.Looper.loop(Looper.java:317) 
                                                                                                    	at android.app.ActivityThread.main(ActivityThread.java:8592) 
                                                                                                    	at java.lang.reflect.Method.invoke(Native Method) 
                                                                                                    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580) 
                                                                                                    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
@rdlabo rdlabo added the bug label Oct 31, 2024
@jaynewstrom-stripe
Copy link
Collaborator

Hi @rdlabo we called these changes out in the changelog.

You may have to update some other dependencies before updating your stripe dependency.

@jaynewstrom-stripe
Copy link
Collaborator

Please reopen if you have further questions.

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

No branches or pull requests

2 participants