woocommerce / woocommerce-android

WooCommerce Android app
https://www.woocommerce.com/mobile
GNU General Public License v2.0
277 stars 135 forks source link

IndexOutOfBoundsException: Index: 2, Size: 2 #11456

Open sentry-io[bot] opened 6 months ago

sentry-io[bot] commented 6 months ago

Sentry Issue: WOOCOMMERCE-ANDROID-9W2

IndexOutOfBoundsException: Index: 2, Size: 2
    at com.woocommerce.android.util.DateUtils.getShortMonthDayString(DateUtils.kt:95)
    val (year, month, day) = iso8601Date.split("-")
    at com.woocommerce.android.ui.mystore.MyStoreStatsView.getDateValueFromGranularity(MyStoreStatsView.kt:422)
    StatsGranularity.WEEKS -> dateUtils.getShortMonthDayString(dateString).orEmpty()
    at com.woocommerce.android.ui.mystore.MyStoreStatsView.getDateValueFromRangeType(MyStoreStatsView.kt:399)
    SelectionType.CUSTOM -> getDateValueFromGranularity(
    at com.woocommerce.android.ui.mystore.MyStoreStatsView.getDateValueFromRangeType(MyStoreStatsView.kt:399)
    SelectionType.CUSTOM -> getDateValueFromGranularity(
    at com.woocommerce.android.ui.mystore.MyStoreStatsView.updateDate(MyStoreStatsView.kt:365)
    val startDate = startInterval?.let { getDateValueFromRangeType(it, rangeType) }
...
(88 additional frame(s) were not displayed)

Date string argument is not of format YYYY-MM-DD: 2024-13
dangermattic commented 6 months ago

🚫 Please add a type label (e.g. type: enhancement) and a feature label (e.g. feature: stats) to this issue.