Hello, I’ve read through the documentation and I’m still a little confused about how app-bridge works in the context of a remix app. I’m building a subscription app on top of the shopify remix example app. In root.jsx, I’ve wrapped the tag in and tags with the proper config (see below):
export default function App() {
const { apiKey, host } = useLoaderData();
const config = {
apiKey: apiKey,
host: host,
}
return (
The issue is that the /subscriptions route throws an error (without any useful information starts with.. ' when navigated to through the sidebar navigation but works when I reload the page.
AppBridgeError2@trycloudflare.com/build/_shared/chunk-FES7CZYI.js:314:26…
Additionally, this page can only fetch data to/from app apis when I manually add HMAC parameters to the request URL, otherwise they get redirected to /auth. I don't have any of these issues with routes that have the '.app' prefix. Clearly I'm configuring/using app-bridge incorrectly but I'm not sure what to troubleshoot here. Given that I've wrapped the entire app in <AppProvider> tags at the root level and the routing is working correctly in other parts of my app, shouldn't the behavior be the same across all routes?
EDIT: I now have the fetch calls on '/subscriptions' working without manually adding the hmac stuff to the request urls. I accomplished this by wrapping the subscriptions page content in it's own <AppProvider>/<Provider> tags. However, the routing from '/app/example' to '/subscriptions' issue still exists. I suspect because they are two different AppProvider/Provider contexts (??) Since the '/subscriptions' route is baked into the link provided in the admin 'Orders' page, I can't simply move into /app directory to resolve this.