App reviews, troubleshooting, and recommendations
I have been following the guide: https://shopify.dev/tutorials/build-a-shopify-app-with-node-and-react/
but I have a problem when installing the app, I get this error
Internal Server Error
this is the error that appears in the npm:
TypeError [ERR_INVALID_ARG_TYPE]: The "key" argument must be of type string or an instance of Buffer, TypedArray, DataView, or KeyObject. Received undefined
at prepareSecretKey (internal/crypto/keys.js:304:11)
at new Hmac (internal/crypto/hash.js:113:9)
at Object.createHmac (crypto.js:143:10)
at sign (C:\Users\mikil\Documents\sample-embedded-app\node_modules\keygrip\index.js:23:8)
at Keygrip.sign (C:\Users\mikil\Documents\sample-embedded-app\node_modules\keygrip\index.js:30:38)
at Cookies.set (C:\Users\mikil\Documents\sample-embedded-app\node_modules\cookies\index.js:110:30)
at oAuthStart (C:\Users\mikil\Documents\sample-embedded-app\node_modules\@shopify\koa-shopify-auth\dist\src\auth\create-oauth-start.js:18:21)
at C:\Users\mikil\Documents\sample-embedded-app\node_modules\@shopify\koa-shopify-auth\dist\src\auth\index.js:54:46
at step (C:\Users\mikil\Documents\sample-embedded-app\node_modules\tslib\tslib.js:141:27)
at Object.next (C:\Users\mikil\Documents\sample-embedded-app\node_modules\tslib\tslib.js:122:57)
ngrok :
GET /auth 500 Internal Server Error GET /favicon.ico 302 Found GET /auth 500 Internal Server Error GET / 302 Found GET /auth 500 Internal Server Error GET /favicon.ico 302 Found GET /auth 500 Internal Server Error GET /auth 500 Internal Server Error GET /favicon.ico 302 Found GET /auth 500 Internal Server Error |
server.js:
require('isomorphic-fetch'); dotenv.config(); const port = parseInt(process.env.PORT, 10) || 3000; const { SHOPIFY_API_SECRET_KEY, SHOPIFY_API_KEY } = process.env; server.use(verifyRequest()); server.use(async (ctx) => { |
I have already done putting "set" before the lines in my .env file. I also have two .env files, one with a name and one without a name
Thanks to all Community members that participated in our inaugural 2 week AMA on the new E...
By Jacqui Mar 10, 2023Upskill and stand out with the new Shopify Foundations Certification program
By SarahF_Shopify Mar 6, 2023One of the key components to running a successful online business is having clear and co...
By Ollie Mar 6, 2023