You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to set up an app proxy page that renders a form using React. The page should render in the context of the theme (ie. show the header and footer), but even with a bare bones example on a brand new app, it is not functional.
In the documentation and responses to other github issues it implies that the route file should be located at app/routes/proxyPrefix.proxySubpath.route.tsx. This does not work and results in a 404. Moving the route file to app/routes/route.tsx does return the markup correctly.
CORS errors: after digging through a bunch of issues, I found this: Update vite cors settings #977. Since I'm using a new app, those changes are already configured. I added an origin property to Vite config, which seems to resolve the CORS thing, but this is not scalable and doesn't seem like a recommended solution.
After resolving (maybe) the CORS issues, there are hydration errors. The html momentarily shows, then this error appears:
In the console there are numerous errors: Uncaught Error: Hydration failed because the initial UI does not match what was rendered on the server
Hoping for some guidance in how to resolve this, as it seems like the basic functionality of app proxy within the template, including theAppProxyProvider component is not functional, or there is some critical piece of documentation that is missing.
Trying to set up an app proxy page that renders a form using React. The page should render in the context of the theme (ie. show the header and footer), but even with a bare bones example on a brand new app, it is not functional.
Following the examples from here: https://shopify.dev/docs/api/shopify-app-remix/v3/app-proxy-components/appproxyprovider and here: https://shopify.dev/docs/api/shopify-app-remix/v3/authenticate/public/app-proxy and using a fresh app created today.
Request url:
https://test.myshopify.com/apps/proxy/test-page/Shopify.app.toml:
Route markup (
app/routes/test-page.jsx)Problems:
app/routes/proxyPrefix.proxySubpath.route.tsx. This does not work and results in a 404. Moving the route file toapp/routes/route.tsxdoes return the markup correctly.originproperty to Vite config, which seems to resolve the CORS thing, but this is not scalable and doesn't seem like a recommended solution.In the console there are numerous errors:
Uncaught Error: Hydration failed because the initial UI does not match what was rendered on the serverHoping for some guidance in how to resolve this, as it seems like the basic functionality of app proxy within the template, including the
AppProxyProvidercomponent is not functional, or there is some critical piece of documentation that is missing.