Skip to content
This repository has been archived by the owner on Feb 2, 2024. It is now read-only.

Newly created orders do not appear in DEV/BARN explorer #63

Closed
elena-zh opened this issue Apr 11, 2022 · 6 comments
Closed

Newly created orders do not appear in DEV/BARN explorer #63

elena-zh opened this issue Apr 11, 2022 · 6 comments
Labels
app:Explorer Explorer App Bug Something isn't working Medium

Comments

@elena-zh
Copy link

elena-zh commented Apr 11, 2022

The issue is reproducible for https://barn.explorer.cow.fi/ and https://protocol-explorer.dev.gnosisdev.com/

  1. Place an order
  2. Cancel it OR wait till the order is executed
  3. Open the explorer and wait till the order is cancelled/executed

AR:

  • the order status is not updated in the Cowswap app, and then the order becomes 'Expired' instead of cancelled.
  • the order does not appear in the User details page on Explorer
  • the order is displayed as 'Expired' in the Explorer when it is 'Filled'
  • Affiliate program is not working due to this issue
  • However, when I connect the same account in another browser, I'm able to load all the orders from API and see them on Explorer
    Video: https://watch.screencastify.com/v/sNSJvTS6mQ3bYlqkAKEi
    orders.jpg
    ststuses.jpg
    image.png

ER: orders syncing woks as expected. Orders are displayed in a user's details page

@elena-zh elena-zh added app:Explorer Explorer App Bug Something isn't working Medium labels Apr 11, 2022
@elena-zh
Copy link
Author

Console does not show any errors
image

@henrypalacios
Copy link
Contributor

There are many things to see here. I leave some notes for the future.

  • Regarding the first image it could be related to a different response from the API for both environments.
  • And the last 2 images, case "Cancelled" and "Filled" we would have to check our logic.

@ramirotw
Copy link
Contributor

ramirotw commented Apr 20, 2022

After debugging this issue more closely, the issue appears to be related with an aggressive CloudFront caching. I've been getting the same payload after more than 25 minutes since the first request and from the response headers:

Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: Origin, Content-Type, X-Auth-Token, X-AppId
Access-Control-Allow-Methods: OPTIONS, GET, HEAD, PUT, PATCH, POST, DELETE
access-control-allow-origin: *
Access-Control-Max-Age: 1728000
Age: 1577
Connection: keep-alive
Content-Encoding: gzip
Content-Type: application/json
Date: Wed, 20 Apr 2022 13:41:14 GMT
Transfer-Encoding: chunked
Vary: Accept-Encoding
Via: 1.1 c8bcdad2cb88c57a5e39f7757d2e9f6a.cloudfront.net (CloudFront)
X-Amz-Cf-Id: bOuYKYF92wlhuwNLYa_5SrSzbLgL3DxEcBd46dMFynfkJdrZARYNpg==
X-Amz-Cf-Pop: MIA3-P2
X-Cache: Hit from cloudfront

The Age: 1577 and Date: Wed, 20 Apr 2022 13:41:14 GMT reflects for how long the data has being cached. When Age is greater than 1800 (1800 / 60 = 30 minutes), the order is flagged as Expired in CowSwap but the API is still returning it as open.

@anxolin
Copy link
Contributor

anxolin commented Apr 20, 2022

Nice finding! thanks for looking into this

@alfetopito
Copy link
Collaborator

Devops changed some setting that should address the issue.
We should test again to make sure it has been fixed.

@elena-zh
Copy link
Author

Fixed!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
app:Explorer Explorer App Bug Something isn't working Medium
Projects
None yet
Development

No branches or pull requests

5 participants