amplitude / Amplitude-Kotlin

Amplitude Kotlin SDK
MIT License
27 stars 10 forks source link

[Crash] Version 1.13.0 crash on initialization ! #175

Closed parlinsqe closed 5 months ago

parlinsqe commented 6 months ago

Expected Behavior

Amplitude should be able to initialized correctly

Current Behavior

It is crash when init Amplitude

No direct method <init>(Ljava/lang/String;Landroid/content/Context;IILjava/lang/String;ZLcom/amplitude/core/StorageProvider;Lcom/amplitude/core/LoggerProvider;Ljava/lang/Integer;Ljava/lang/String;Lkotlin/jvm/functions/Function3;IZLcom/amplitude/core/ServerZone;Ljava/lang/String;Lcom/amplitude/core/events/Plan;Lcom/amplitude/core/events/IngestionMetadata;ZZZLcom/amplitude/android/TrackingOptions;ZZZJZLcom/amplitude/android/DefaultTrackingOptions;JLcom/amplitude/core/StorageProvider;Lcom/amplitude/id/IdentityStorageProvider;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V in class Lcom/amplitude/android/Configuration; or its super classes (declaration of 'com.amplitude.android.Configuration' appears in /data/app/~~SPSRcroseqPOM31PApKBFg==/com.sample.app-t0p3yj8HP1Mqh7GApJ6a_w==/base.apk)

Possible Solution

Is it possible to revert back to v1.12.2 until 1.13.0 stable ? Using 1.+ dynamic versioning, our build will point out to 1.13.0, since 1.13.0 having this crash, is it possible to take down this version so the dynamic versioning resolved to v1.12.2 again. Thanks

Steps to Reproduce

  1. Use version v1.13.0
  2. Initiate amplitude
    amplitude = Amplitude(
                    Configuration(
                        apiKey = apiKey,
                        context = applicationContext,
                        instanceName = INSTANCE_NAME
                    )
                )

Environment

izaaz commented 6 months ago

Thank you for raising this issue @parlinsqe We are looking into this.

Mercy811 commented 6 months ago

Hi @parlinsqe, could you give us more context. I can run it successfully locally.

Kotlin app

Screenshot 2024-01-24 at 10 06 13

Java app

Screenshot 2024-01-24 at 10 12 36
Mercy811 commented 6 months ago

Find a similar error. This error was solved by adding @JvmOverloads annotation to the modified function.

v1.13.0 adds offline to com.amplitude.android.Configuration and com.amplitude.core.Configuration. Both of their constructors have @JvmOverloads

Could you try to rebuild your app by following this?

Mercy811 commented 5 months ago

Hi @parlinsqe, are you still blocked?

parlinsqe commented 5 months ago

Hi @Mercy811 yes, we are still blocked, but we have decided to use 1.12.2 for now

Mercy811 commented 5 months ago

Hi @parlinsqe, have you tried clean and rebuild your project?

parlinsqe commented 5 months ago

Yes we had tried clean and rebuild, but still the same @Mercy811

Mercy811 commented 5 months ago

Did you sync gradle?

parlinsqe commented 5 months ago

Yes, I did, as I can see in the external libraries section in android studio, it shown amplitude with version 1.13.0. And it crashing

Mercy811 commented 5 months ago

Hi @parlinsqe, could you provide a minimum project reproduce this issue.

izaaz commented 5 months ago

@parlinsqe thanks for raising this issue. We've been monitoring this library on our end and haven't heard any other complaints. We also see data coming in from this version from other apps.

I am closing this issue for now but if you have any other information on why this may not be working for you, please feel free to reopen this issue and we'll jump right in.