Closed sentry-io[bot] closed 1 year ago
From what I read in the code, line 23
is a refresh setState({})
method that calls Widget ProductListPage
.
And in ProductListPage
we only force a value to be not null with product.barcode!
(several times).
Could there be a null
barcode in history? Should we automatically get rid of those products? (I still haven't understood the use case behind null
barcodes and even worse how we're supposed to deal with them).
In order to get rid of this crash, we could simply dismiss products that have a null
barcode in ProductListPage
.
Trying to understand how that happens, it would be nice to send some message back home, like "I know it's unexpected and I've just got rid of a barcode-less product": @g123k what tool do you suggest? sentry matomo fimber?
Just use the Logs class it will do all at the same time
@g123k Thank you! Just thinking about it again, in your migration, did you download products?
Yes
@g123k Would you point me to the piece of code where the download actually takes place? There are tons of "unexpected" errors in https://sentry.io/organizations/openfoodfacts/issues/3377849466/?project=5376745&referrer=weekly-email where products from a list are not in the product table.
Maybe it comes from your migration, maybe it comes from my hive-sqflite migration, maybe it's something else.
Anyway we should probably propose a database consistency check-up and repair button.
The only code was based on your import feature: https://github.com/openfoodfacts/smooth-app/blob/develop/packages/smooth_app/lib/helpers/data_importer/product_list_import_export.dart
Is fixed, likely because we now load the list of barcodes and not the list of products anymore
No it happend again
Looks similar to https://github.com/flutter/flutter/issues/81684 My hunch: perhaps it's because we "open" the history page without showing it (as it's not the main tab).
Sentry Issue: SMOOTHIE-WS