I’m getting the following error when running customer created shopify trigger. Any idea how to fix?
ERROR: The "key" argument must be one of type Buffer, TypedArray, DataView, string, or KeyObject. Received type undefined
TypeError [ERR_INVALID_ARG_TYPE]: The "key" argument must be one of type Buffer, TypedArray, DataView, string, or KeyObject. Received type undefined
at prepareSecretKey (internal/crypto/keys.js:299:13)
at new Hmac (internal/crypto/hash.js:101:9)
at Object.createHmac (crypto.js:139:10)
at Object.webhook (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Shopify/ShopifyTrigger.node.js:357:48)
at Workflow.runWebhook (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/src/Workflow.js:505:33)
at Object.executeWebhook (/usr/local/lib/node_modules/n8n/dist/src/WebhookHelpers.js:47:48)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async /usr/local/lib/node_modules/n8n/dist/src/TestWebhooks.js:29:37
Just tested it and it works just fine for me. Which makes me think the issue can be on the credentials. Please double check. If that does not fix the issue simply come back to me.
I can sadly also not see anything wrong. Can you please try to create new credentials (you can use the same ones, just save them again under a new name in n8n) and then also test the Trigger-Node with that new credentials in a new workflow. Just to be sure that not some kind of messed up data in the database causes that problem for you. Thanks!
@jan I get the following error. Is there something that needs to be done to “register” the webhook?
ResponseError: The requested webhook is not registred.
at TestWebhooks.callTestWebhook (/usr/local/lib/node_modules/n8n/dist/src/TestWebhooks.js:16:19)
at /usr/local/lib/node_modules/n8n/dist/src/Server.js:713:52
at Layer.handle [as handle_request] (/usr/local/lib/node_modules/n8n/node_modules/express/lib/router/layer.js:95:5)
at next (/usr/local/lib/node_modules/n8n/node_modules/express/lib/router/route.js:137:13)
at Route.dispatch (/usr/local/lib/node_modules/n8n/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/usr/local/lib/node_modules/n8n/node_modules/express/lib/router/layer.js:95:5)
at /usr/local/lib/node_modules/n8n/node_modules/express/lib/router/index.js:281:22
at param (/usr/local/lib/node_modules/n8n/node_modules/express/lib/router/index.js:354:14)
at param (/usr/local/lib/node_modules/n8n/node_modules/express/lib/router/index.js:365:14)
at Function.process_params (/usr/local/lib/node_modules/n8n/node_modules/express/lib/router/index.js:410:3) {
name: 'ResponseError',
errorCode: 404,
httpStatusCode: 404
}