Unexpected Server Error Error: Received an error response (401 Unauthorized) from Shopify: ā[API] Invalid API key or access token (unrecognized login or wrong password)ā If you report this error, please include this id: b3a26c0c-7a5a-4a80-ba16-c1fa7fabb92b
I suppose that can take some time to deploy an new API credential, but that was 12 hours ago.
There could be a couple reasons why youāre seeing the āInvalid API key or access tokenā error. Here are a few things to check:
Incorrect API Key or Password: Make sure that the API key and password are correct. You mentioned that youāve recently changed the credentials, so thereās a chance that an error could have been made while copying them.
Incorrect Store URL: The error could also be due to the wrong store URL. Be sure to include the ā.myshopify.comā part of your store URL and avoid adding āhttps://ā or āwwwā to the URL.
Token Expiration: Access Tokens have an expiration time, it might be possible that your token has expired. You should implement a method to refresh the token when it expires.
Permission Scope: The requested endpoint may not be included in the access scope of your app. Check your appās access scopes in the Partner dashboard to ensure it has the necessary permissions.
Propagation Delay: As you mentioned, there can be a propagation delay when you create new API credentials. If all the above points are correct, you might want to wait a little longer.
Check the above and let us know if youāre still seeing this issue.
TypeError: Cannot read properties of undefined (reading āstatusCodeā)"
The full error stack :
TypeError: Cannot read properties of undefined (reading āstatusCodeā) at /Users/yann/Desktop/WebstormProjects 2/bishop-shopify-app/bishop-app/node_modules/@shopify/shopify-api/adapters/node/adapter.ts:36:41 at Generator.next () at /Users/yann/Desktop/WebstormProjects 2/bishop-shopify-app/bishop-app/node_modules/tslib/tslib.js:169:75 at new Promise () at Object.__awaiter (/Users/yann/Desktop/WebstormProjects 2/bishop-shopify-app/bishop-app/node_modules/tslib/tslib.js:165:16) at nodeConvertIncomingResponse (/Users/yann/Desktop/WebstormProjects 2/bishop-shopify-app/bishop-app/node_modules/@shopify/shopify-api/adapters/node/adapter.js:21:20) at /Users/yann/Desktop/WebstormProjects 2/bishop-shopify-app/bishop-app/node_modules/@shopify/shopify-api/lib/auth/oauth/oauth.ts:72:59 at Generator.next () at fulfilled (/Users/yann/Desktop/WebstormProjects 2/bishop-shopify-app/bishop-app/node_modules/tslib/tslib.js:166:62) {stack: āTypeError: Cannot read properties of undefined (reā¦pp/bishop-app/node_modules/tslib/tslib.js:166:62)ā, message: āCannot read properties of undefined (reading āstatusCodeā)ā}
Iām having this same statusCode issue during app install. This is new for me, havenāt had this problem in the last year until a few weeks ago. This issue also has discussed this problem with no response yet from Shopify.
this is happening during the first part of the oAuth process in my ā/beginā endpoint where I am running shopify.auth.begin. Note this has been working fine for about a year and just started happening recently.
TypeError: Cannot read properties of undefined (reading āstatusCodeā)
at /var/task/apps/app/.next/server/app/api/shopify/uninstall/route.js:1:4687
at Generator.next ()
at /var/task/apps/app/.next/server/chunks/849.js:1:14094
at new Promise ()
at Module.h (/var/task/apps/app/.next/server/chunks/849.js:1:13843)
at t.nodeConvertIncomingResponse (/var/task/apps/app/.next/server/app/api/shopify/uninstall/route.js:1:4614)
at /var/task/apps/app/.next/server/chunks/3366.js:1:12042
at Generator.next ()
at s (/var/task/apps/app/.next/server/chunks/849.js:1:13899)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Had similar problem that the proxy link stops working after reinstall - the reason was that webhook āUNINSTALLEDā was not successfully delivered when my remix app was running locally. So it did not delete the session record related to the shop when uninstalled keeping an old token and scopes.
After I have manually deleted the record from DB and after installed the app back - it created the new record and it starts working.