Developers are encountering a 401 GraphQL error after their Shopify app idles for 10 minutes to 2 hours during local development. The issue appears across different setups, including Remix and PHP templates, and persists even on different machines and partner accounts.
Common triggers:
Running local dev server with npm run dev
One user specifically linked it to checkout extensions, though others report it without extensions
Occurs after upgrading Shopify CLI in some cases
Proposed solutions:
Delete .shopify folder from app root and restart via CLI (requires re-authentication)
Verify .env configuration includes SHOPIFY_API_KEY, SHOPIFY_API_SECRET, SCOPES, and API_VERSION
Re-authenticate CLI using shopify logout then shopify login
Check Node version compatibility (v18 or v22)
Ensure Authorization header contains valid token and endpoint matches API type
Current status: A GitHub issue was opened but remains unresolved. The root causeâlikely related to token expiration or session managementâhas not been officially addressed.
Summarized with AI on October 28.
AI used: claude-sonnet-4-5-20250929.
+1 same issue for me. iâve had it in as little as 10 minutes or so. mine isnât a checkout extension; it seems just related to running the local dev server
stack trace isnât very helpful:
at makeRequest (file:///.../node_modules/graphql-request/build/esm/index.js:284:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async debugLogResponseInfo (file:///.../node_modules/@shopify/cli-kit/dist/private/node/api.js:13:20)
at async graphqlRequest (file:///.../node_modules/@shopify/cli-kit/dist/public/node/api/graphql.js:20:22)
This can happen due to a hung app state. To fix it, delete the .shopify folder from the root of your app, then rerun the app using the Shopify CLI. Youâll be prompted to log in to Shopify for verification, and everything should work fine afterward.