Reference
Troubleshooting
Symptom, cause, fix.
First, reproduce it
Most of what follows is answered by one of these.
npm run build # does the theme even compile?npm run shopify:check # Shopify's own linter, against dist/npm run api:build # regenerates operations, services and `api`cd shopify-app && npx shopify app info # is the app installed anywhere?# Is the gateway up? A 401 is the healthy answer — see below.curl -i -X POST 'https://your-site.netlify.app/admin.gql' \ -H 'Content-Type: application/json' -d '{"operation":"GetShop"}'1// In the storefront console: what does this deployment know about?2import { apiNames } from '@/framework'3console.table(apiNames.admin)The theme
| Symptom | Cause | Fix |
|---|---|---|
| Every page 404s | No templates — they're on the ignore list | npm run shopify:dev:seed |
| Header or footer missing | No section groups | npm run shopify:push:groups |
| "No colour schemes defined" | No settings_data.json | npm run shopify:push:settings |
Editor changes vanish on dev | Expected — theme dev overwrites the dev theme | Confirm the ignore list on that environment |
| Push asks which theme to overwrite | Misspelled -e, so no ignore list applied | Check the environment name |
| Two sections collided | Duplicate filename after flattening | Rename — section names are global |
| Section renders nothing after an edit | React state reset by the editor remount | Editor checklist |
| Infinite re-render | A selector returning a new object each call | Return a primitive or a stable reference |
API and deployment
| Symptom | Cause | Fix |
|---|---|---|
401 Invalid signature from curl | Expected. No Shopify signature on a direct request | Call it from the storefront |
404 on /apps/<subpath>/… | The app isn't installed on the store | shopify app dev --store …; verify with shopify app info |
404 after changing subpath | Path is fixed at install time | Uninstall and reinstall the app |
500 Server is not configured | SHOPIFY_API_SECRET unset — it fails closed | Set it, then redeploy |
Could not obtain an Admin API token | Bad client id/secret, or app and store in different organizations | Check both; see the deployment logs for Shopify's message |
| Admin API access-denied errors | Missing scopes | Add to [access_scopes], shopify app deploy, reinstall |
404 on the deployment itself | Wrong path | Routes are /admin.gql and /service at the site root |
| New operation isn't found | Not compiled into the deploy folder yet | npm run api:build, then redeploy |
Netlify: remix: command not found | Framework detection guessed a build command | Re-run npm run api:build and redeploy — netlify.toml overrides it |
Netlify: 422 Incorrect function names | A dot in a function filename | npm run api:build regenerates legal names |
Netlify: only netlify.toml in the file list | Expected. This is an API, not a site | Functions are under the Functions tab |
An operation you added isn't found
The allowlist is compiled at build time, in two places — the deployed bundle and the client registry. Both are regenerated by the same command:
npm run api:build # updates deploy/ and src/javascript/api.generated.jscd deploy/netlify && npx netlify deploy --prodIf api.YourOperation is undefined in the editor but the file exists, the
registry is stale — any npm run build refreshes it.
Reading the healthy answers
Two responses look like failures and are not:
401 Invalid signature from a direct request means the endpoint is up and
correctly refusing unsigned traffic. Real calls arrive through the App Proxy with
a signature attached, so they never see this.
An almost-empty Netlify file browser is expected. The published folder is deliberately empty because this is an API, not a site. The functions are under the Functions tab.