TypeError: The "key" argument must be of type string or an instance of Buffer, TypedArray, DataView, or KeyObject. Received undefined

TypeError: The “key” argument must be of type string or an instance of Buffer, TypedArray, DataView, or KeyObject. Received undefined
Stack

TypeError: The "key" argument must be of type string or an instance of ArrayBuffer, Buffer, TypedArray, DataView, KeyObject, or CryptoKey. Received undefined
    at new NodeError (node:internal/errors:405:5)
    at prepareSecretKey (node:internal/crypto/keys:596:11)
    at new Hmac (node:internal/crypto/hash:134:9)
    at createHmac (node:crypto:165:10)
    at Object.webhook (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/WooCommerce/WooCommerceTrigger.node.js:153:59)
    at Workflow.runWebhook (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:639:101)
    at Object.executeWebhook (/usr/local/lib/node_modules/n8n/dist/WebhookHelpers.js:213:48)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at /usr/local/lib/node_modules/n8n/dist/TestWebhooks.js:96:37

Information on your n8n setup

  • **n8n version: 0.126.1
  • **Database (default: SQLite)
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • **Running n8n via (Docker, npm, n8n cloud, desktop app): both docker n8n cloud
  • Operating system: windows 11
1 Like

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

n8n version: 0.126.1
Database default: SQLite
n8n EXECUTIONS_PROCESS setting : own
Running n8n via (Docker, npm, n8n cloud, desktop app): docker
Operating system: windows 11

Hi @vignesh_munikannan :wave: Welcome to the community :tada:

This can be hard to diagnose without having sample JSON data and your example workflow that you’re running into trouble with, but I also noticed you’re running a very old version of n8n. Could you please try updating as first port of call for this? There have been many, many fixes since version 0.126.1 :sweat_smile:

You can find the migration guide here: n8n v1.0 migration guide | n8n Docs

Good day community. I have exactly this same problem, and from what I have reviewed, some users also report the same error when connecting with clickup.

Information of my n8n:
n8n version: 1.25.1
Database: SQLite
Running n8n via Docker compose
Operating system: ubuntu jammy 22.04

I’m receiving this error when attempting to setup a new ClickUp workflow, I already have several existing that work fine w/ same credential. As soon as the webhook is received, I get this:

ERROR: The “key” argument must be of type string or an instance of ArrayBuffer, Buffer, TypedArray, DataView, KeyObject, or CryptoKey. Received undefined

  • n8n version: 1.24.1
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main): own
  • Running n8n via (Docker, npm, n8n cloud, desktop app): docker
  • Operating system: Debian (might be Ubuntu if that matters

Same issue with woocommerce event hooks IE: (user created)

I have the same problem. The workflow has been working for over a year, and then everything broke on the woo trigger.
How to solve the problem quickly?

Information of my n8n:
n8n version: 1.25.1
Database: SQLite
Running n8n via Docker compose
Operating system: ubuntu 20.04


Even if you create a new process, the trigger returns an error.

@Jon , I need your urgent professional help)

Here are the logs of the web hook delivery at the time of the error (as shown in the screenshot above):

2024-02-01T11:07:17+00:00 INFO Array
(
    [Webhook Delivery] => Array
        (
            [Delivery ID] => 3befe143e1addefec9ad3b9e787fb8b5
            [Date] => 01.02.2024 в 11:07
            [URL] => https://site.com/webhook-test/c781d7f4-3115-4ef6-8e69-c4fee205c8ed/webhook
            [Duration] => 0.39381
            [Request] => Array
                (
                    [Method] => POST
                    [Headers] => Array
                        (
                            [User-Agent] => WooCommerce/8.5.2 Hookshot (WordPress/6.4.3)
                            [Content-Type] => application/json
                            [X-WC-Webhook-Source] => https://site.com/
                            [X-WC-Webhook-Topic] => order.updated
                            [X-WC-Webhook-Resource] => order
                            [X-WC-Webhook-Event] => updated
                            [X-WC-Webhook-Signature] => Jrp/srFGSA7DUtxc5uE3DQWzCpH7ubZvhU9P9eO20Oc=
                            [X-WC-Webhook-ID] => 318
                            [X-WC-Webhook-Delivery-ID] => 3befe143e1addefec9ad3b9e787fb8b5
                        )

                )

            [Body] => Webhook body is not logged unless WP_DEBUG mode is turned on. This is to avoid the storing of personal data in the logs.
            [Response] => Array
                (
                    [Code] => 500
                    [Message] => Internal Server Error
                    [Headers] => WpOrg\Requests\Utility\CaseInsensitiveDictionary Object
                        (
                            [data:protected] => Array
                                (
                                    [content-length] => 77
                                    [content-type] => application/json; charset=utf-8
                                    [date] => Thu, 01 Feb 2024 11:07:17 GMT
                                    [etag] => W/"4d-K+SjzeOPwSwZwO1aU9/AOF8NQoY"
                                    [strict-transport-security] => max-age=315360000; includeSubDomains; preload
                                    [vary] => Accept-Encoding
                                    [x-content-type-options] => nosniff
                                    [x-xss-protection] => 1; mode=block
                                )

                        )

                    [Body] => Webhook body is not logged unless WP_DEBUG mode is turned on. This is to avoid the storing of personal data in the logs.
                )

        )

)

Hey @Danilov_Vovka,

Is this only failing when testing or when running in production as well?

Anyone with this issue, Can you downgrade to 1.23.0 which should get you back up and running again.

This happens in both modes. I recreated the WOO API key and now everything is working again.
Below I have attached the entire log for today, there are at least 7 sending errors in the workflow.

Hey @Danilov_Vovka,

The log isn’t really going to do much, The issue is around the key not being available in n8n to verify the request. I have created an internal ticket to get this resolved as there appears to be a few nodes linked by the same issue.

1 Like

Thank you, let’s hope that the problem will be solved.

I just wanted to add because the same issue is now happening for me with the woocommerce trigger. Get, Create, Update products, orders etc work. Only the woocommerce trigger node throws the TypeError.

Hey @jchamie,

Welcome to the community :tada:

Thanks for letting us know that is what the posts above are about as well, This will be fixed hopefully in a 1.27.2 release shortly as we have identified the cause.

1 Like

New version [email protected] got released which includes the GitHub PR 8524.

3 Likes

Working good now. I had to pull the docker image n8nio/n8n:1.27.2 because :latest did work. Thank you

1 Like

there don’t seem to be any problems anymore. you can close the topic.

1 Like