coopcycle / coopcycle-app

CoopCycle native app
MIT License
152 stars 33 forks source link

Rayo/Zampate local commerce app doesnt create orders #1753

Closed Paul-Eraman-CoopCycle closed 6 months ago

Paul-Eraman-CoopCycle commented 7 months ago

Shop : enredadas https://zampate.coopcycle.org/admin/stores/45

Request from app : curl -X POST -H "accept:application/json, text/plain, */*" -H "content-type:application/ld+json" -H "x-coopcycle-app-version:2.16.4" -H "x-application-version:fr.coopcycle@2.16.4 (203)" -H "<auth_token>" https://zampate.coopcycle.org/api/deliveries -d '{"store":"/api/stores/45","dropoff":{"address":"/api/addresses/25420","before":"2024-04-24T11:15:24+02:00","timeSlot":"2024-04-30 09:00-15:00"}}'

crash in sentry: https://coopcycle.sentry.io/issues/4493424490/?project=5294179&query=is%3Aunresolved&referrer=issue-stream&statsPeriod=24h&stream_index=1

so the address is not set on one of the tasks

    private function calculate(TaskCollectionInterface $taskCollection)

    {

        $coordinates = [];

        foreach ($taskCollection->getTasks() as $task) {

            $coordinates[] = $task->getAddress()->getGeo();

        }

https://github.com/coopcycle/coopcycle-app/assets/77277854/598e0469-76d5-42be-a70b-b36e3ee43716

Atala commented 7 months ago

@Paul-Eraman-CoopCycle i can look at it but i would need the original slack thread and the name of the store

Atala commented 6 months ago

log for API call

{"message":"Order (not persisted yet; created_at = 2024-04-24T10:32:49+02:00) | OrderOptionsProcessor | finished | itemsTotal: 508 (updated)","context":{},"level":200,"level_name":"INFO","channel":"checkout","datetime":"2024-04-24T10:32:50.012776+02:00","extra":{"token":{"authenticated":true,"roles":["ROLE_ADMIN","ROLE_STORE","ROLE_USER"],"user_identifier":"Alois","username":"Alois"}}}
{"message":"Order (not persisted yet; created_at = 2024-04-24T10:32:49+02:00) | OrderFeeProcessor | skipped (no vendor)","context":{},"level":200,"level_name":"INFO","channel":"fee_calculation","datetime":"2024-04-24T10:32:50.012843+02:00","extra":{"token":{"authenticated":true,"roles":["ROLE_ADMIN","ROLE_STORE","ROLE_USER"],"user_identifier":"Alois","username":"Alois"}}}
{"message":"Order (not persisted yet; created_at = 2024-04-24T10:32:49+02:00) | OrderPaymentProcessor | finished | (new) payment: 508","context":{},"level":200,"level_name":"INFO","channel":"checkout","datetime":"2024-04-24T10:32:50.061156+02:00","extra":{"token":{"authenticated":true,"roles":["ROLE_ADMIN","ROLE_STORE","ROLE_USER"],"user_identifier":"Alois","username":"Alois"}}}
{"message":"Order (not persisted yet; created_at = 2024-04-24T10:32:49+02:00) | OrderLogFinishProcessor | processing finished | triggered by: POST /api/deliveries; at: AppBundle\\Sylius\\OrderProcessing\\OrderLogFinishProcessor::process() called at: file: /home/coopcycle/.coopcycle/app/releases/6b1edd0dc0b50572aa5b2e74687118a269c398db/vendor/sylius/order/Processor/CompositeOrderProcessor.php line: 41 | Sylius\\Component\\Order\\Processor\\CompositeOrderProcessor::process() called at: file: /home/coopcycle/.coopcycle/app/releases/6b1edd0dc0b50572aa5b2e74687118a269c398db/vendor/sylius/order/Modifier/OrderModifier.php line: 32 | Sylius\\Component\\Order\\Modifier\\OrderModifier::addToOrder() called at: file: /home/coopcycle/.coopcycle/app/releases/6b1edd0dc0b50572aa5b2e74687118a269c398db/src/Sylius/Order/OrderModifier.php line: 48","context":{},"level":200,"level_name":"INFO","channel":"checkout","datetime":"2024-04-24T10:32:50.061297+02:00","extra":{"token":{"authenticated":true,"roles":["ROLE_ADMIN","ROLE_STORE","ROLE_USER"],"user_identifier":"Alois","username":"Alois"}}}
{"message":"Order (not persisted yet; created_at = 2024-04-24T10:32:49+02:00) | OrderModifier | added CPCCL-ODDLVR-689C805 | itemsTotal: 508 (new)","context":{},"level":200,"level_name":"INFO","channel":"checkout","datetime":"2024-04-24T10:32:50.061386+02:00","extra":{"token":{"authenticated":true,"roles":["ROLE_ADMIN","ROLE_STORE","ROLE_USER"],"user_identifier":"Alois","username":"Alois"}}}
Paul-Eraman-CoopCycle commented 6 months ago

tested and working now 🥳