amplitude / Amplitude-Kotlin

Amplitude Kotlin SDK
MIT License
27 stars 10 forks source link

java.lang.AssertionError: No NameTypeIndex match for SHORT_STANDARD on Android 8.1.0 only #172

Closed pbacher closed 4 months ago

pbacher commented 6 months ago

Expected Behavior

No crash

Current Behavior

400+ daily AssertionError crashes in the Amplitude sdk (currently using 1.12.2). Only happening on Android 8.1.0

Fatal Exception: java.lang.AssertionError: No NameTypeIndex match for SHORT_STANDARD
       at android.icu.impl.TimeZoneNamesImpl$ZNames.getNameTypeIndex(TimeZoneNamesImpl.java:724)
       at android.icu.impl.TimeZoneNamesImpl$ZNames.getName(TimeZoneNamesImpl.java:790)
       at android.icu.impl.TimeZoneNamesImpl.getTimeZoneDisplayName(TimeZoneNamesImpl.java:183)
       at android.icu.text.TimeZoneNames.getDisplayName(TimeZoneNames.java:261)
       at java.util.TimeZone.getDisplayName(TimeZone.java:405)
       at java.util.Date.toString(Date.java:1066)
       at java.util.Properties.store0(Properties.java:828)
       at java.util.Properties.store(Properties.java:817)
       at com.amplitude.id.utilities.PropertiesFile.save(PropertiesFile.kt:37)
       at com.amplitude.id.utilities.PropertiesFile.putString(PropertiesFile.kt:55)
       at com.amplitude.id.FileIdentityStorage.safetyCheck(FileIdentityStorage.kt:53)
       at com.amplitude.id.FileIdentityStorage.<init>(FileIdentityStorage.kt:24)
       at com.amplitude.id.FileIdentityStorageProvider.getIdentityStorage(FileIdentityStorageProvider.java:71)
       at com.amplitude.core.Amplitude$build$built$1.invokeSuspend(Amplitude.kt:105)
       at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
       at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
       at java.lang.Thread.run(Thread.java:764)

Possible Solution

Unknown

Steps to Reproduce

Unknown

Environment

qingzhuozhen commented 6 months ago

Hi @pbacher, thanks for reporting the issue. We will investigate this further.