Using Ajax API, fetch request returns different results when requesting from localhost vs hosted

Short description of issue

When I make the same fetch request to apply a product filter, I get different results when making request from dev mode on 127.0.0.1:9292 vs store.myshopify.com

Reproduction steps

  • have both dev environment running
  • make fetch request to filter products on local Dev url vs Preview link
  • compare results

I am removing any identifying details, but basically:

Local fetch: http://127.0.0.1:9292/collections/test-2?section_id=template--25582971584878__product-grid&filter.v.availability=1&sort_by=manual&filter-panel=on&filter.p.m.filters.type=Boots&filter.p.m.filters.type=Sneakers

Preview fetch: https://www.LIVE-URL.com/collections/test-2?section_id=template--25582971584878__product-grid&filter.v.availability=1&sort_by=manual&filter-panel=on&filter.p.m.filters.type=Boots&filter.p.m.filters.type=Sneakers

Additional info

While this is not a blocker, I am just super curious as to what might be going wrong there. The request is to combine 2 types of shoes, Boots + Sneakers, and on live store it returns exactly that, but on localhost it effectively returns “No products matching”.
The filtering logic is based off Dawn, so it also also alters the URL to reflect the request, so if after my localhost request returns no resutls, if I just reload the page, it works as expected and returns correct products.

What type of topic is this

Troubleshooting

Update: I resolved the issue by updating Shopify CLI to the latest available version, I wasn’t too far behind, but this fixed it.

Thanks for sharing that fix, Victor!