Shopify POS library works as expected. I had to fix my server DNS settings.
Topic summary
A developer encountered a “Fetch failed” error when making API requests from a Shopify POS extension using @shopify/ui-extensions@2024.7.0 and @shopify/ui-extensions-react@2024.7.0.
Key Details:
- The fetch() call to their server fails in production but works in development mode
- The server doesn’t appear to receive the request at all
- CORS settings are properly configured server-side with appropriate origins
- The previous
@shopify/retail-ui-extensionslibrary worked without issues
Code Context:
- Using
useApi()hook to get session token - Making POST request with session token in Authorization header
- Server configured with CORS middleware allowing Shopify CDN origins
Resolution:
The issue was resolved by fixing DNS server settings on the developer’s infrastructure side.
1 Like