coopcycle / coopcycle-app

CoopCycle native app
MIT License
152 stars 33 forks source link

Canceled orders still appear on restaurant tablets unless you hard refresh the app #1853

Closed Srywards closed 1 week ago

Srywards commented 2 months ago

Describe the bug Canceled orders still appear on restaurant tablets unless you hard refresh the app

To Reproduce Steps to reproduce the behavior: Cancel an order made on Monday (for example but all day is included) evening but which fell the next day at noon

Expected behavior Orders must be appear canceled for the restaurant without hard refresh the app

Paul-Eraman-CoopCycle commented 2 months ago

@vladimir-8

Atala commented 2 months ago

Tested OK in good conditions (local setup)

AdrienSICKLO commented 3 weeks ago

Order CWSG on Naofood, validated 29th at 0:02am and remade by restaurant last night

Atala commented 3 weeks ago

Tested OK in a restaurant so quite likely a network issue

AdrienSICKLO commented 2 weeks ago

Dispatchers here are quite doubtful about the network theory... We'll keep investigating but looks like a pattern. Why would orders go from New to Accepted to Finished when the rider drops it, but canceled would not go to canceled?

Paul-Eraman-CoopCycle commented 2 weeks ago

There is a different path for cancellation than other actions

There is an issue about that by @Atala that i can find when I'm not on my phone that would probably fix any issues happening with this

Either way, the tasks should update, just not exactly the same second

Atala commented 2 weeks ago

hello

the code to handle order update changes is definitely the same ref

i think your dispatcher have a confirmation biases because the order not showing as cancelled for the restaurant is the most painful one. if i am not wrong new -> accepted is done by the restaurant itself accepted -> finished restaurant don't really care

so now i have tested it alright locally and tested it alright with 3 different devices at glasgow burger (sunmi 2vs, sunmi, my phone). i saw the cancellation happen.

what i did test not OK on wattignies network is leaving the network, place an order, joining the network again and not see a new order popup.

so i would say 95.7% sure it is a network issue until proven wrong.

we know for sure that the fix should be this = resend messages when the connection was cut. but we are not there yet.

BUT

I have another potential fix and i am planning to do it just for you extra because i know it is a pain for you. i ll let you know.

Atala commented 2 weeks ago

(the issue speaks more precisely of an order that was made for the next day, that might be a different issue but I dont think so as wellà

Paul-Eraman-CoopCycle commented 1 week ago

then can we close this and track in #78?