Webhook 404 after n8n version upgrade

Hi, after each version upgrade of n8n all my registered webhook gives 404 and I have to deactivate then activate the workflow to get them back working again.
How can I solve this issue?I’d like to stay up-to-date with n8n version but I also have tons of workflow active that runs in production application.

Information on your n8n setup

  • 0.153.0
  • Postgres
  • Docker

Hi @mastercrys, first of all welcome to the community :tada:

I’m very sorry to hear you’re running into this strange behaviour. I assume you don’t drop data from your database with every n8n upgrade? Are there any signs of trouble in the logs after recreating your n8n container?

This is the log after container starts

Initializing n8n process
UserSettings were generated and saved to: /home/node/.n8n/config
n8n ready on, port 5678
Version: 0.153.0
   Start Active Workflows:
   - xxxxxx/xxxxxxxx
     => Started

Editor is now accessible via:

And then followed by the webhook response errors

ResponseError: The requested webhook "GET xxxxxxx" is not registered.
    at ActiveWorkflowRunner.executeWebhook (/usr/local/lib/node_modules/n8n/dist/src/ActiveWorkflowRunner.js:94:23)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async /usr/local/lib/node_modules/n8n/dist/src/WebhookServer.js:47:24 {
  errorCode: 404,
  httpStatusCode: 404,
  hint: "The workflow must be active for a production URL to run successfully. You can activate the workflow using the toggle in the top-right of the editor. Note that unlike test URL calls, production URL calls aren't shown on the canvas (only in the executions list)"

I confirm that all the workflows are Active

Oh, so the “UserSettings were generated” message suggests your local n8n data got deleted after the upgrade, which would include the encryption key used by n8n (meaning n8n will be unable to decrypt some of the data from your database).

So as a first step you might want to make sure your data survives when when re-creating the n8n docker container, e.g. by using the -v ~/.n8n:/home/node/.n8n option from the documentation:

This option would mean that your local ~/.n8n folder would be made available inside the n8n container as /home/node/.n8n (where n8n would put its config file). This would survive the re-creation of you n8n container when upgrading n8n.

1 Like