TandoorRecipes / recipes

Application for managing recipes, planning meals, building shopping lists and much much more!
https://docs.tandoor.dev
Other
5.28k stars 553 forks source link

Shopping List Autosync #3217

Open chriy-de opened 1 month ago

chriy-de commented 1 month ago

Tandoor Version

1.5.18

Setup

Docker / Docker-Compose

Reverse Proxy

Traefik

Other

Also reproduced in demo

Bug description

In short, I seem to have a problem with shopping list autosync- it does not work most of the time. I have Tandoor deployed via docker-compose but this should be no matter, because I also was able to reproduce this on the tandoor demo. When I set the autosync to 5 seconds(10 for the demo) I expect that when I mark an item as bought, that the item disappears from other devices where the shoppinglist is shared to after 5-20 seconds. For me, this is not the case- sometimes an item is not synced for a long time, until the app is reopened or the shopping-list reopened. I add an item on one session, it does not appear on the other session unless I refresh via the other browser. Same for removing the item via the green check-mark.

On the demo just now in the shopping list, I added an item, it appeared on the other session. Then I removed it in the first session, but it is still visible on the other session a good few minutes later. If I press F5 in the other session, it disappears as expected.

This behaviour happens for me both on Firefox on PC with one or several sessions, aswell as between Sessions on Firefox(PC) and Safari(iOS).

Is it just me or is this known?

Relevant logs

I did my playing around with the items just now in the demo ~10 minutes until post of this issue
vabene1111 commented 1 month ago

interesting, I thought I had these issues figured out but last week when shopping with my girlfriend I noticed that autosync got stuck as well.

while its stuck, is there a small loading icon every now and then on the shopping list tab of the page?

image

chriy-de commented 1 month ago

Yes, the shopping cart icon flashes slightly(it tries to quickly draw the refresh icon) in the selected 5s interval.

andrin55 commented 1 month ago

Same issue here. The request gets sent to the server and returns 200 OK. If I add an Item, it will show up. But if i remove an item, it will not get synced. The JSON response comes back empty and nothing happens.

vabene1111 commented 4 weeks ago

ok, thanks for the feedback. I think this is a timing issue. I tried to optimize performance but probably broke something