openfoodfacts / smooth-app

🤳🥫 The new Open Food Facts mobile application for Android and iOS, crafted with Flutter and Dart
https://world.openfoodfacts.org/open-food-facts-mobile-app?utm_source=off&utf_medium=web&utm_campaign=github-repo
Apache License 2.0
783 stars 271 forks source link

"ABC-abc-1234" barcode drives the app in a loop #644

Closed jasmeet0817 closed 9 months ago

jasmeet0817 commented 2 years ago

What

monsieurtanuki commented 2 years ago
jasmeet0817 commented 2 years ago

Ah perfect, thank you

monsieurtanuki commented 2 years ago
jasmeet0817 commented 2 years ago

Hey, update on this one, it works for all devices except smaller ones (and perhaps might not work for some languages) so I'm trying another approach but it's really difficult to get this one right, I'm currently working with Greg from the flutter team for it

monsieurtanuki commented 2 years ago

Let's be more precise:

  1. you actually scanned a barcode (you did not type in a string)
  2. and this barcode was not found on the server database
  3. and you saw an endless spinner

Is that correct?

teolemon commented 2 years ago

i believe this one is fixed.

teolemon commented 2 years ago

image Can still reproduce with this barcode

M123-dev commented 2 years ago

What does the server respond for this barcode

teolemon commented 2 years ago

https://world.openfoodfacts.org/api/v0/product/ABC-abc-1234.json

teolemon commented 2 years ago

assuming we send this request

teolemon commented 2 years ago

I can still reproduce

UgoKo-Rubeast commented 2 years ago

I have checked codes and found response from backend is certainly received. But the following widget rebuilding is not working. I have confirmed scanning of an another product existing in DB works well. Perhaps the loop is due to a bug in provider library? https://github.com/openfoodfacts/smooth-app/blob/631b3675afc6205382a74c3de530fcea7cb0771c/packages/smooth_app/lib/data_models/continuous_scan_model.dart#L87-L93

teolemon commented 2 years ago

Still here

M123-dev commented 1 year ago

Still here, but changed visually (the flickering is because of me scrolling back but the scanner scanning it again

https://user-images.githubusercontent.com/39344769/209358894-7d588ef4-3333-4f63-8372-c03dcbcb4c44.mp4

Screenshot_20221223_161823

teolemon commented 1 year ago

Still here, failing silently

monsieurtanuki commented 9 months ago

Screenshot_2023-12-09-18-07-54 Looks like it's fixed now.