Github Trigger - Cannot read properties of undefined (reading 'httpCode')

Describe the problem/error/question

I am trying to start a workflow, when a new commit comes into a Github repo, it triggers the N8N workflow. I have also created a Github webhook in this format in the repo: https://github.com//N8N-test/settings/hooks

The repo and my github account are connected (I can click on Link button and it redirects me to the correct URL), so no problem there. I have created the repo, so I am the owner and right now there is only a Readme.md file.

## What is the error message (if any)?
Cannot read properties of undefined (reading 'httpCode')

## Please share your workflow
Just a GitHub trigger node on everything (*). 
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Information on your n8n setup

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

Hey @tryharder hope all is well. Welcome to the community.

I’ve tried to create a single Github Trigger node with “Push” events and this allows me to receive triggers for commit pushes.

I’ve also tried to create a regular Webhook node and received a webhook configured in Github project webhooks.

Neither scenario caused httpCode errors.

I’m having the same issue with n8n version 1.102.4.

When I enable debug console logging I see this:
18:43:37.733 error 400 Cannot read properties of undefined (reading 'httpCode') { "file": "response-helper.js", "function": "sendErrorResponse" }

If either one of you would like to share your workflows, I can try to see if running it in my n8n will cause any issues.

Hey @tryharder and @jabbson, thanks for digging into this.

Turns out it’s a small bug in the Github Trigger node:
When the webhook is missing, the code throws on error.cause.httpCode (which is undefined) before it can clear the stored webhookId from getWorkflowStaticData('node'). That leaves the node thinking the webhook still exists and causes the crash.

I’ve opened a PR that switches to error.httpCode and properly clears the static data:

Once it’s merged, updating to the next n8n release should fix the issue.

1 Like

@lukyn76 / @jabbson I’m encountering this exact same issue creating a super simple flow that receives a webhook from github for created issues. Are you saying that the Github trigger node is just plain busted until the next release? That can’t be right.

… it’s literally just a single node that gets hit with issue:open’s from github:

… for kicks, I tried the official github→notion example template and it still gives the same error when I plug in my valid github/notion credentials and update the trigger node of the imported template to those credentials ( + updating my github webhook url) …. I feel like since is the very FIRST thing I’ve attempted on n8n it’s probably user error somehow … if not, uh, yikes, this doesn’t bode well for switching over from Make.com (which i don’t love)

Hey! There’s a PR open to fix this.

In the meantime, you can use a quick workaround I shared in the comments here: fix(GithubTrigger Node): Correctly access httpCode from error object by heyxmirko · Pull Request #17697 · n8n-io/n8n · GitHub .
Should help get things working again :+1:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.