After a user approves the token scopes and installs the app, the callback URL presents the error GraphQL query returned errors.
I am using the default shopifyApp config
const shopify = shopifyApp({
api: {
apiVersion: LATEST_API_VERSION,
restResources,
billing: billingConfig, // or replace with billingConfig above to enable example billing
},
auth: {
path: "/api/auth",
callbackPath: "/api/auth/callback",
},
webhooks: {
path: "/api/webhooks",
},
// This should be replaced with your preferred storage strategy
sessionStorage: new SQLiteSessionStorage(DB_PATH),
});
@shopify/shopify-app-express version: 1.1.0
Node version: 18.14.2
Operating system: MacOS
2023-04-30 12:19:55 │ backend │ [shopify-app/INFO] Handling request to complete OAuth process
2023-04-30 12:19:55 │ backend │ [shopify-api/INFO] Completing OAuth | {shop: X.myshopify.com}
2023-04-30 12:19:56 │ backend │ [shopify-app/INFO] Running validateAuthenticatedSession
2023-04-30 12:19:56 │ backend │ [shopify-api/INFO] Creating new session | {shop:X.myshopify.com, isOnline: false}
2023-04-30 12:19:56 │ backend │ [shopify-api/INFO] Registering webhooks | {shop: X.myshopify.com}
2023-04-30 12:19:56 │ backend │ [shopify-app/INFO] Request session has a valid access token | {shop: X.myshopify.com}
2023-04-30 12:19:56 │ backend │ In getLocations
2023-04-30 12:19:56 │ backend │ In getInventoryLevelsForLocations
2023-04-30 12:19:56 │ backend │ In getInventoryItems
2023-04-30 12:19:56 │ backend │ [shopify-app/ERROR] Failed to complete OAuth with error: Error: GraphQL query returned errors
Expected behavior
callbackPath /api/auth/callback, should redirect user to homepage.
Actual behavior
My page displays the error GraphQL query returned errors. I must redirect to admin homepage before I can see the app.
Issue summary
After a user approves the token scopes and installs the app, the callback URL presents the error
GraphQL query returned errors
.I am using the default shopifyApp config
@shopify/shopify-app-express
version: 1.1.0Expected behavior
callbackPath /api/auth/callback, should redirect user to homepage.
Actual behavior
My page displays the error
GraphQL query returned errors
. I must redirect to admin homepage before I can see the app.Steps to reproduce the problem