Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRITICAL BUG: shops duplication #224

Closed
blazern opened this issue Mar 2, 2022 · 1 comment
Closed

CRITICAL BUG: shops duplication #224

blazern opened this issue Mar 2, 2022 · 1 comment
Labels
1sp 1 story point task

Comments

@blazern
Copy link
Contributor

blazern commented Mar 2, 2022

There is a bug in shop creation that, under the right circumstances, will duplicate the shop you just added.

Adding a new shop both from the main screen (Add Shop) and from "Help with location" (regarding a product that already exists on OpenFoodFacts) will work as intended. One shop will be created and nothing goes wrong. (Examples of such shops: The supermarket "Μασούτης" in Asvestochori, Thessaloniki, right next to my many shops in Pefka.

However, adding a shop while adding a new product (as in, by clicking the button on the menu that also lets you take a photo of the front package and the ingredients list) will result in a duplicate shop, regardless of the language of the product. One example is in North-West Greece, in my village, near Ptolemaida.

Steps to reproduce:

  1. Scan the barcode of a product that was never added to Plante and OpenFoodFacts
  2. Add the name and brand of the product, take the pictures of the packaging (as requested by the app)
  3. Click whether a product is vegan or non-vegan. In both of my tries I clicked "Unsure" for the vegan status but I'm not sure whether this is what causes the problem.
  4. Click the button that lets you add a store.
  5. Go to the location of the store. Make sure there is no store there already.
  6. Click the pin to add the store. Add the name and type of the store.
  7. Add the shop (click done) and normally finish the product-adding process.
  8. Check the store on the map. There are now two stores with the same name and the same products.

Clearing the map cache in the app doesn't fix the issue, which might indicate it's not a ghost shop but an actual duplicate

Shop location: https://www.openstreetmap.org/search?query=foufas#map=19/40.52207/21.55419 (but the same thing happened to Arista Mini-Market in Pefka)

Data for now: It happens both with Greek and with English shop names (Arista Mini-Market, Παντοπωλείο Μπίντσης Σταύρος) and it happens only by adding a shop this way. Both times!

Not sure if it's a network-related issue, a racing condition, or the shop gets added both when creating the shop and when creating the product

@blazern
Copy link
Contributor Author

blazern commented Mar 2, 2022

I checked the device logs - the duplication indeed happened.

@blazern blazern added 1sp 1 story point task labels Mar 2, 2022
blazern added a commit to blazern/plante that referenced this issue Mar 9, 2022
@blazern blazern closed this as completed Mar 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1sp 1 story point task
Projects
None yet
Development

No branches or pull requests

1 participant