Reported proof of delivery URL is incorrect at time of delivery completion

TL;DR; the proof of delivery URLs being reported by the GET - Get a Job at the time of delivery completion are incorrect. Said URLs seemingly get fixed by Stuart at some point well after the delivery has completed.

This seems to be a relatively recent regression as we’ve made no changes to our Stuart integration. We suspect this change might be to blame.

Here is a concrete example (job ID 277057105, delivery ID 285435008):

  1. We received a delivery update webhook indicating the delivery status changed to delivered at 2024-01-24T20:48:01Z (less than 2 hours ago as of this writing).

  2. Upon webhook receipt, we queried the GET - Get a Job endpoint. The response reported a proof_of_delivery_url of:

https://stuart-bucket.s3.eu-central-1.amazonaws.com/uploads/task_report_pictures/trp-65e6d417fae76f6411af.jpeg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA6EVYDNNYKFACVSXF%2F20240124%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20240124T204801Z&X-Amz-Expires=172800&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEL%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCWV1LXdlc3QtMSJHMEUCIQCfx6NWNDM93qkEt7c3JZ7uPbaX68Lfr%2BQ8QfjBuf7CowIgIurcTlCbH7pHSV2saJ3cz5qdUf6MLuwechBFwTe7YKwqsgUIeBAEGgw5NzIxMjI0NTA4MDAiDM8kWtE1xPF6sz7VEiqPBQBDHRsNK0E9KBuGBvOFK47fQDqXfVa5c%2BnNKnIZSuS0umU1cLRPo%2BZA%2Fy1xEsoXs3g4j0ETBpduDJbaf6T%2FYEQUfdspohEIBLwkCbBcoVfX80sATOYP%2BcI7xqZlH98QUUDcZDvb6rR3VNX%2FTURo8p%2Bv3ld8iYdnmWLxk%2FLpsksGvG4%2B0yHTlRbHQKemjx9Te%2FmUbNB5Tdpc6BQziJgM46oMkr%2BpgS3CfC%2BWJOIfr%2B7kWp%2B96u%2Bp5wZs6Bg8bvjSTEf6pgcqCLbRdo5DEWsb8EylVEW%2BCRfjQYx5bjiGz9lLTURch%2BVZAEfk1aMacWSqIpsIqcQ9wRqnil1ch7A7HJviWIlMgeTApkUKrcBxKKdWpS5N9Tb07c%2BEN2KIxWLXkM%2BYMn40OPVB8Ehmech8MsIrks53l9W%2BTIisb2tvypYUQBAYwzftKgFJJhTdU7T87yHorgQvIkHaX5p51Wnysv7JiDaz5UNQ7dab%2F5QM9fPop5Y%2BQZOeKIAAwqZRBac8fnxVBqKeI%2FP4LUZluGDTdIkKew5NRSygkjve%2FRF6TiDGIKU%2Fnh5qSRHWac%2Fo3O7x3mvqbreDA1%2BBMA3hrHKTQYx%2BXkgE%2F1OPf2WETmCIIYxr8MmZysXfZ%2F9ifAsy636KaHLCau4YRE%2FpBSiURK7Dh%2BeLAMdWOqnStu0GnEUnk8lH2KQvTDrUEYyCekAgzk3RYfGXjLU%2FIkVaCkuC0EKyCckD1e4bJWNVMcaO1Ekr2ViahiTj979VMEgxC0oF0crYShjYyscSzQoLe6Lo9H0x6W5J13MlNu6UDUVrS5qd5Gc9u%2BmLpxnvgcuWsUpgItIaccUDFoqMEKD4mZ6xZ5nntZbRJ5UGCxkVoRUTF1%2F%2BjIwwqsXErQY6sQFMV9x4NCiWvCJEmOiW7kSJyf1UelL9B2G5LVFoZcjZXN92aVxw0U3ZzmWCdE16j%2FF282n7RBqoa7gBSXC8qpmrvXiat9lGbKL%2FQms0bPtMhlsw3NjFUV8hoKCUox6%2FHQUpEq012PvbVmI%2BBKWb9l7ZKjIgAEfPmfjY9MYfXolNzvx4yV5%2BPmvrkO6d%2FIK7NL2I9FHasgiw2kpBm%2B9vkTXwfsk3e15Gk4YcGXGSPHjNNak%3D&X-Amz-Signature=1d8844791eb7fec436d42423d6f935744f1dbd5f3f5da1c8708fed2e7a98c0ac

Expected behavior: image is available for viewing since its well less than the 48 hour access deadline.

Observed behavior: the URL does not work. Attempting to view it results in the following error page:

Finally, I’ll note that if I query the GET - Get a Job endpoint above right now (two hours after delivery completion), the response includes a different URL which does work.

It’s worth noting that this is not a one-off scenario. I examined a large number of deliveries completed within the past 24 hours and ALL of them exhibited the above behavior.

Hi Mirek,

Could you provide me the full URL from the response so I canalso see the request time and expiry time?

Thank you!

Hi Deborah, I’m not sure I understand - the full proof of delivery URL from the response is included in my initial writup:

https://stuart-bucket.s3.eu-central-1.amazonaws.com/uploads/task_report_pictures/trp-65e6d417fae76f6411af.jpeg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA6EVYDNNYKFACVSXF%2F20240124%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20240124T204801Z&X-Amz-Expires=172800&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEL%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCWV1LXdlc3QtMSJHMEUCIQCfx6NWNDM93qkEt7c3JZ7uPbaX68Lfr%2BQ8QfjBuf7CowIgIurcTlCbH7pHSV2saJ3cz5qdUf6MLuwechBFwTe7YKwqsgUIeBAEGgw5NzIxMjI0NTA4MDAiDM8kWtE1xPF6sz7VEiqPBQBDHRsNK0E9KBuGBvOFK47fQDqXfVa5c%2BnNKnIZSuS0umU1cLRPo%2BZA%2Fy1xEsoXs3g4j0ETBpduDJbaf6T%2FYEQUfdspohEIBLwkCbBcoVfX80sATOYP%2BcI7xqZlH98QUUDcZDvb6rR3VNX%2FTURo8p%2Bv3ld8iYdnmWLxk%2FLpsksGvG4%2B0yHTlRbHQKemjx9Te%2FmUbNB5Tdpc6BQziJgM46oMkr%2BpgS3CfC%2BWJOIfr%2B7kWp%2B96u%2Bp5wZs6Bg8bvjSTEf6pgcqCLbRdo5DEWsb8EylVEW%2BCRfjQYx5bjiGz9lLTURch%2BVZAEfk1aMacWSqIpsIqcQ9wRqnil1ch7A7HJviWIlMgeTApkUKrcBxKKdWpS5N9Tb07c%2BEN2KIxWLXkM%2BYMn40OPVB8Ehmech8MsIrks53l9W%2BTIisb2tvypYUQBAYwzftKgFJJhTdU7T87yHorgQvIkHaX5p51Wnysv7JiDaz5UNQ7dab%2F5QM9fPop5Y%2BQZOeKIAAwqZRBac8fnxVBqKeI%2FP4LUZluGDTdIkKew5NRSygkjve%2FRF6TiDGIKU%2Fnh5qSRHWac%2Fo3O7x3mvqbreDA1%2BBMA3hrHKTQYx%2BXkgE%2F1OPf2WETmCIIYxr8MmZysXfZ%2F9ifAsy636KaHLCau4YRE%2FpBSiURK7Dh%2BeLAMdWOqnStu0GnEUnk8lH2KQvTDrUEYyCekAgzk3RYfGXjLU%2FIkVaCkuC0EKyCckD1e4bJWNVMcaO1Ekr2ViahiTj979VMEgxC0oF0crYShjYyscSzQoLe6Lo9H0x6W5J13MlNu6UDUVrS5qd5Gc9u%2BmLpxnvgcuWsUpgItIaccUDFoqMEKD4mZ6xZ5nntZbRJ5UGCxkVoRUTF1%2F%2BjIwwqsXErQY6sQFMV9x4NCiWvCJEmOiW7kSJyf1UelL9B2G5LVFoZcjZXN92aVxw0U3ZzmWCdE16j%2FF282n7RBqoa7gBSXC8qpmrvXiat9lGbKL%2FQms0bPtMhlsw3NjFUV8hoKCUox6%2FHQUpEq012PvbVmI%2BBKWb9l7ZKjIgAEfPmfjY9MYfXolNzvx4yV5%2BPmvrkO6d%2FIK7NL2I9FHasgiw2kpBm%2B9vkTXwfsk3e15Gk4YcGXGSPHjNNak%3D&X-Amz-Signature=1d8844791eb7fec436d42423d6f935744f1dbd5f3f5da1c8708fed2e7a98c0ac

You just need to scroll right since I placed in a code block as it’s quite long. The request time is also included in the writeup (2024-01-24T20:48:01Z).

Finally, while I don’t see any reference to the expiration date in the above URL, the GET - Get a Job request resulting in the above URL was made just after the “delivery status changed to delivered” webhook arrived, so I’d expect the expiration date to be 48 hours after the above timestamp, give or take a second.

Or perhaps I’m misunderstanding the ask?

Hi Mirek,

Thanks for providing more details. I have raised a bug internally and will get back to you as soon as I receive an update.

1 Like

Hi @d.hediger, any update on the above? All proof of delivery URLs continue to be incorrect as described above.

Best,
Mirek

Hi Mirek,

We are still investigating internally and I will reach out to you as soon as I receive an update.

Kind regards,
Deborah

1 Like

Hi Mirek,

Just to let you know we are still working on fixing this bug. I will update you as soon as this is working again as expected.

Kind regards,

Deborah

1 Like

Hi @mirek rek Hope you are well.

We have tried to replicate the issue but can view the URL correctly. Would you be able to provide the payload returned by the GET - Get a Job endpoint when it fails.
Thanks so much!

Hi @d.hediger, sure thing. Here’s an example from today:

  1. We received a delivery update webhook indicating the delivery status changed to delivered at 2024-02-09T22:38:51.5768537Z. Here is the webhook payload:
{"event":"delivery","type":"update","data":{"id":287061138,"trackingUrl":"https://stuart.followmy.delivery/287061138/033b1e5fb28646ff437af7875d82e3ad","clientReference":"A07241","driver":{"status":"on_duty","latitude":53.73852064,"longitude":-1.54763728,"name":"[redacted]","firstname":"[redacted]","lastname":"[redacted]","phone":"[redacted]","picture_path_imgix":null,"transportType":{"code":"car"}},"status":"delivered","transportType":{"code":"car"},"packageType":{"code":"medium"},"etaToDestination":"2024-02-09T23:37:54.000+01:00","etaToOrigin":"2024-02-09T23:34:02.000+01:00","cancellation":{"canceledBy":null,"reasonKey":null,"comment":null}}}
  1. Upon webhook receipt, we queried the GET - Get a Job endpoint at 2024-02-09T22:38:51.7162224Z. Here is the response payload:
{"id":278570274,"created_at":"2024-02-09T23:09:43.000+01:00","status":"finished","package_type":"medium","transport_type":"car","assignment_code":null,"pickup_at":null,"dropoff_at":null,"ended_at":"2024-02-09T23:38:48.000+01:00","comment":null,"distance":0.971,"duration":2,"traveled_time":0,"traveled_distance":0,"deliveries":[{"id":287061138,"status":"delivered","picked_at":"2024-02-09T23:33:53.000+01:00","delivered_at":"2024-02-09T23:38:48.000+01:00","tracking_url":"https://stuart.followmy.delivery/287061138/033b1e5fb28646ff437af7875d82e3ad","client_reference":"A07241","package_description":"[redacted]","package_type":"medium","fleet_ids":[1],"pickup":{"id":443107513,"address":{"street":"[redacted]","postcode":"LS10 4HP","city":"Leeds","zone":"leeds","country":"The United Kingdom","formatted_address":"[redacted]"},"latitude":53.747507,"longitude":-1.547534,"comment":"[redacted]","contact":{"firstname":"[redacted]","lastname":null,"phone":"[redacted]","company_name":"[redacted]","email":null},"access_codes":[]},"dropoff":{"id":443107514,"address":{"street":"[redacted]","postcode":"LS104HY","city":"Leeds","zone":"leeds","country":"The United Kingdom","formatted_address":"[redacted]"},"latitude":53.739044,"longitude":-1.547902,"comment":null,"contact":{"firstname":"[redacted]","lastname":null,"phone":"[redacted]","company_name":null,"email":null},"access_codes":[]},"cancellation":{"canceled_by":null,"reason_key":null,"comment":null},"eta":{"pickup":"2024-02-09T23:34:02.000+01:00","dropoff":"2024-02-09T23:37:54.000+01:00"},"proof":{"signature_url":null},"package_image_url":null,"proof_of_delivery_url":"https://stuart-bucket.s3.eu-central-1.amazonaws.com/uploads/task_report_pictures/trp-f17d21b0eb183d2f9522.jpeg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA6EVYDNNYGAKDYIS2%2F20240209%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20240209T223852Z&X-Amz-Expires=172800&X-Amz-SignedHeaders=host&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEEIaCWV1LXdlc3QtMSJIMEYCIQCoTIQaJwwS2ATqeC3SL4%2BzKdCXmyYr%2BiAepdRwmew8dQIhAIkpI3TffQ7zOH91%2BAmDJdwcfq7b%2BsJKbWhmhjjcmckTKrIFCBoQBBoMOTcyMTIyNDUwODAwIgyIWm5goAeUEtMv%2BqwqjwW9u23Sxb6eWNdEEEdi4I9t9T1tFCWhcuAuvBWauGcKRcuZLumqRNh%2BTvWzhO%2BVXTQdAppCJQMS%2BKnI%2Bo%2F%2BoqeqCbnw%2F7MLPToTKRVy3j6WXrFULyNOy%2BuMNEqd5Fj2VQKCtbwJsj0jIc2c%2B%2BZooNn3HGhSUiPOfyNLt6z7zYoUY%2BU3xQOfbWHi54LihGUoBqnVS2rX9VfyVIlRUP3hKaBGp6xvjDBfPfnFM%2FmQ2kEDNldMxp8%2FboV83EcpFRtLtyjL1zMIXvGYh1pJ9uKpumCxWLGtaQWM1jtqvVeGeVGW%2BwXYxHQOJVCfy4YlUl2WmgwOMuUre%2Bp1usSnsxFnfomCLjGFN9riINxk0EKVqQOuTPpCjhhcIIBE2Yx0YBwNWAeGp%2BFJo5K%2BeA4qvRV189tjOhgqtLP9%2Fr3xOuq08Eb7VKsZDn%2FKTfLcUSYitvzJh6Q5t%2F2QpZom8cy2XwWwexkbpzp1o7Pn1l4G18RhnBKygEgY2Ey0wESjzMeOzChLzToCS5VcIkBWS0U8IEv%2BvrrpsLe3vdp1k3NNIJ61utEdy9cwd87kKcVdaFnVZiblYCg86ng%2F0ivncQ9gQeOdLPhwZReVIeCLbTIwd4bE%2BRRBlw%2BSo9vdsjbVLNLEmX%2BXP9V5MFTrDAyqoUiVX0U%2BCCLTP%2FEz%2BfNBsvdya75r37t4LYRPpV46hG8P%2F11exkZ2LCiJ3WY%2BfvSFRNLM3qlmfuz7h0Nqv8XrDTV5zCX6lICW%2B6dTmQUMCymQBDqjHlW9AFRHIKISBcWwrsxJS59BRw4iYFY3bvfR4xtDYM9ltlRT2z4pRtFkAV4H2Xphz%2BnJeJEo1E41dPJ66ek3%2FWpP2%2B7jsoKZnwOf3cJTwiywOPLBMJK9ma4GOrABFL4BV5TzaGtJh1bxS0WsXB9SQ%2FLIErnWSle3CeRoomRidn4suS3IPHwKxKlvPl8zpEOs6k6aZp13E4t6aXdemZpu9sU%2BZeQdsbyL29dyVwQUnG5kDF2iZ%2BFPPG0uLQltuGkrtsxKs0LYI%2F3l45sxYlpme2SOhiha7zUnQ3wksuBcDdj20iux1es1wCPliwqPET8YMFxD6eNHcfwRwwI85Cu70%2FNlw9zR8bfKYt4RKWY%3D&X-Amz-Signature=35641eaf4a93faa311e8aced7d98e9ff5978b2fde495e4826f03504cbd05c1b0","client_tracking_url":"https://stuart.followmy.delivery/9f39cd2c3e38ddc9811dfe706204aadb/287061138/033b1e5fb28646ff437af7875d82e3ad"}],"driver":{"id":627919,"display_name":"[redacted]","phone":"[redacted]","picture_url":null,"transport_type":"car","latitude":53.73852064,"longitude":-1.54763728},"pricing":{"price_tax_included":5.4,"price_tax_excluded":5.4,"tax_amount":0.0,"invoice_url":null,"tax_percentage":0.2,"currency":"GBP"},"rating":null}

Finally, if you navigate to the above proof_of_delivery_url, you’ll receive the aforementioned error page:

Best,
Mirek

Hi @mirek
Thank you we are looking into it and I will get back to you as soon as possible.

1 Like

Hi @mirek

Thank you for your patience, I am sorry it takes longer than expected to resolve this bug as we are unable to replicate the issue so far. Below some more questions we have:

Do you get the same error using the same URL you got in the first place after some seconds, without using the GET - Get a Job endpoint again (URL will change if you retry the endpoint)?
Does the first URL starts working after some time, or it never works until you do another request to the GET - Get a Job endpoint?

Hi @d.hediger, answer belows.

Do you get the same error using the same URL you got in the first place after some seconds, without using the GET - Get a Job endpoint again (URL will change if you retry the endpoint)?

Yes, the original URL does not work even if I don’t retry the GET endpoint again. This was the case in the last example I sent over (I did not manually retry the GET endpoint, I simply sent over the data as it appeared in our logs).

Does the first URL starts working after some time, or it never works until you do another request to the GET - Get a Job endpoint?

Yes, the GET endpoint eventually starts reporting a working URL, though I’m not sure how long it takes for this to happen. See my very first message for an example (Finally, I’ll note that if I query the GET - Get a Job endpoint above right now (two hours after delivery completion), the response includes a different URL which does work…)

Best,
Mirek