Environment
SDK Version: @shopify/shop-minis-react@0.4.7
CLI Version: @shopify/shop-minis-cli@0.0.216
Device: Android device (Google Pixel 9A)
Development OS: macOS 26.1
Mini Handle: help-me-choose
Issue
What’s broken: useRecentProducts hook with “cache-first“ fetch policy indefinitely loads on new Shop app installs
Expected behavior: useRecentProducts should return the cached recently used products, or if cache isn’t available - fetch new recently used products
Actual behavior: useRecentProducts is permanently stuck in a loading state with no error message
Reproduction steps
-
Uninstall the shop minis development app.
-
Launch the mini on an android device.
-
Have a useRecentProducts hook with “cache-first” fetch policy on the home page.
-
The loading of the hook will never end.
Code example
const { products, loading, error } = useRecentProducts({ first: 20, fetchPolicy: 'cache-first' });
return (<p>{products?.length??'null'} {loading.toString()} {error?.message??'no error'}</p>);
Already Tried
-
First and foremost: have I read the docs? - Yes, although there isn’t any further explanation on fetch policy there (for example how long cache is stored for)
-
Confirmed scopes match what I’m accessing - Yes
-
I’ve run
npx shop-minis upgradeto make sure I’m on the latest versions - Yes -
The issue is fixed when you click “Reload Mini” in the development environment.
-
Does not seem to occur on an iPhone emulation in my testing.