woocommerce / woocommerce-android

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

Crash When Attempting to Add Package Details within Create Shipping Label Flow #12560

Closed JorgeMucientes closed 6 days ago

JorgeMucientes commented 1 week ago

Describe the bug Crash When Attempting to Add Package Details within Create Shipping Label Flow

To Reproduce Steps to reproduce the behavior:

  1. Enable Shipping labels on the app or log into a site that has shipping labels enabled
  2. Follow the steps from the screen recording below and see if the app crashes with the following stacktrace:
FATAL EXCEPTION: main
Process: com.woocommerce.android, PID: 14806
java.lang.NumberFormatException: empty String
    at jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1842)
    at jdk.internal.math.FloatingDecimal.parseFloat(FloatingDecimal.java:122)
    at java.lang.Float.parseFloat(Float.java:485)
    at com.woocommerce.android.model.ShippingPackageKt.toAppModel(ShippingPackage.kt:82)
    at com.woocommerce.android.ui.orders.shippinglabels.ShippingLabelRepository.getShippingPackages(ShippingLabelRepository.kt:80)
    at com.woocommerce.android.ui.orders.shippinglabels.ShippingLabelRepository$getShippingPackages$1.invokeSuspend(ShippingLabelRepository.kt:0)

Screenshots

https://github.com/user-attachments/assets/1c6c25f9-0bc7-4c49-9840-3d96825ace78

Expected behavior The app should not crash when attempting to add package details

Isolating the problem (mark completed items with an [x]):

Mobile Environment Please include:

dangermattic commented 1 week ago

Thanks for reporting! 👍

atorresveiga commented 6 days ago

Closing this in favor of this other issue https://github.com/woocommerce/woocommerce-android/issues/12528