Github Trigger: Not Found

I made my workflow and went to activate it, but it doesn’t activate and gives me this popup:
image

In the browser console is an error 500.
In the server logs is:

Logs
2022-08-26T01:32:20.728962175Z ERROR RESPONSE
2022-08-26T01:32:20.729551574Z }
2022-08-26T01:32:20.729549134Z   description: 'Not Found'
2022-08-26T01:32:20.729546774Z   httpCode: null,
2022-08-26T01:32:20.729544414Z   },
2022-08-26T01:32:20.729542054Z     credentials: { githubApi: [Object] }
2022-08-26T01:32:20.729539494Z     webhookId: '885ec4c6-e4cf-4b20-b37d-83263bd4522b',
2022-08-26T01:32:20.729537014Z     position: [ -240, 140 ],
2022-08-26T01:32:20.729532054Z     typeVersion: 1,
2022-08-26T01:32:20.729529574Z     type: 'n8n-nodes-base.githubTrigger',
2022-08-26T01:32:20.729527134Z     name: 'Github Trigger',
2022-08-26T01:32:20.729524574Z     id: '5232a4f7-e1ae-439b-8558-037cdfa92345',
2022-08-26T01:32:20.729522214Z     },
2022-08-26T01:32:20.729519894Z       events: [Array]
2022-08-26T01:32:20.729517494Z       repository: 'vacuum',
2022-08-26T01:32:20.729515174Z       owner: 'mrhappyma',
2022-08-26T01:32:20.729512734Z       authentication: 'accessToken',
2022-08-26T01:32:20.729510334Z     parameters: {
2022-08-26T01:32:20.729507974Z   node: {
2022-08-26T01:32:20.729505654Z   timestamp: 1661477540570,
2022-08-26T01:32:20.729503334Z   },
2022-08-26T01:32:20.729500974Z     description: 'Not Found'
2022-08-26T01:32:20.729498574Z     httpCode: '404',
2022-08-26T01:32:20.729496294Z     },
2022-08-26T01:32:20.729493894Z       credentials: [Object]
2022-08-26T01:32:20.729491334Z       webhookId: '885ec4c6-e4cf-4b20-b37d-83263bd4522b',
2022-08-26T01:32:20.729488934Z       position: [Array],
2022-08-26T01:32:20.729486454Z       typeVersion: 1,
2022-08-26T01:32:20.729483974Z       type: 'n8n-nodes-base.githubTrigger',
2022-08-26T01:32:20.729481654Z       name: 'Github Trigger',
2022-08-26T01:32:20.729479254Z       id: '5232a4f7-e1ae-439b-8558-037cdfa92345',
2022-08-26T01:32:20.729476894Z       parameters: [Object],
2022-08-26T01:32:20.729474614Z     node: {
2022-08-26T01:32:20.729472174Z     timestamp: 1661477540570,
2022-08-26T01:32:20.729469934Z     },
2022-08-26T01:32:20.729467614Z       options: [Object]
2022-08-26T01:32:20.729465334Z       statusCode: 404,
2022-08-26T01:32:20.729463014Z       error: [Object],
2022-08-26T01:32:20.729460734Z       cause: {},
2022-08-26T01:32:20.729458254Z       toJSON: [Function: toJSON],
2022-08-26T01:32:20.729455854Z       isAxiosError: true,
2022-08-26T01:32:20.729453254Z       response: [Object],
2022-08-26T01:32:20.729450814Z       request: undefined,
2022-08-26T01:32:20.729448254Z       config: undefined,
2022-08-26T01:32:20.729445534Z         at processTicksAndRejections (node:internal/process/task_queues:83:21) {
2022-08-26T01:32:20.729442894Z         at endReadableNT (node:internal/streams/readable:1358:12)
2022-08-26T01:32:20.729439894Z         at IncomingMessage.emit (node:domain:489:12)
2022-08-26T01:32:20.729437174Z         at IncomingMessage.emit (node:events:525:35)
2022-08-26T01:32:20.729425694Z         at IncomingMessage.handleStreamEnd (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/adapters/http.js:269:11)
2022-08-26T01:32:20.729422934Z         at settle (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/settle.js:17:12)
2022-08-26T01:32:20.729420214Z         at createError (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/createError.js:16:15)
2022-08-26T01:32:20.729417734Z     cause: Error: Request failed with status code 404
2022-08-26T01:32:20.729415254Z     context: {},
2022-08-26T01:32:20.729412614Z       at async /usr/local/lib/node_modules/n8n/dist/src/ResponseHelper.js:90:26 {
2022-08-26T01:32:20.729409974Z       at async /usr/local/lib/node_modules/n8n/dist/src/Server.js:600:21
2022-08-26T01:32:20.729407254Z       at async ActiveWorkflowRunner.add (/usr/local/lib/node_modules/n8n/dist/src/ActiveWorkflowRunner.js:440:13)
2022-08-26T01:32:20.729404414Z       at async ActiveWorkflowRunner.addWorkflowWebhooks (/usr/local/lib/node_modules/n8n/dist/src/ActiveWorkflowRunner.js:255:39)
2022-08-26T01:32:20.729401574Z       at async Object.checkExists (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Github/GithubTrigger.node.js:327:25)
2022-08-26T01:32:20.729398654Z       at async Object.githubApiRequest (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Github/GenericFunctions.js:34:16)
2022-08-26T01:32:20.729395494Z       at processTicksAndRejections (node:internal/process/task_queues:96:5)
2022-08-26T01:32:20.729392574Z       at Object.requestWithAuthentication (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/src/NodeExecuteFunctions.js:923:19)
2022-08-26T01:32:20.729389974Z   cause: NodeApiError: The resource you are requesting could not be found
2022-08-26T01:32:20.729387534Z   context: {},
2022-08-26T01:32:20.729384894Z     at async /usr/local/lib/node_modules/n8n/dist/src/ResponseHelper.js:90:26 {
2022-08-26T01:32:20.729382214Z     ... 3 lines matching cause stack trace ...
2022-08-26T01:32:20.729379054Z     at async Object.checkExists (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Github/GithubTrigger.node.js:327:25)
2022-08-26T01:32:20.729376054Z     at processTicksAndRejections (node:internal/process/task_queues:96:5)
2022-08-26T01:32:20.729372254Z     at Object.githubApiRequest (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Github/GenericFunctions.js:37:15)
2022-08-26T01:32:20.729364614Z NodeApiError: UNKNOWN ERROR - check the detailed error for more information

I’m not sure what this means or how to fix it. Everything looks fine otherwise.

1 Like

I didn’t change anything but I created this “topic”, went back and tried it one more time, and it worked.

Summary

WHY NOT 2 MINUTES EARLIER

I changed some other little thing and now there is the same issue. Seems on and off randomly.

Are you the owner of the repository? Because the error does not come from n8n but rather from GitHub. The API returns a 404 if you try to listen to events of repository that you do not own. Here is another thread about that:

I do own the repo. I double-checked and I have spell everything correct.

1 Like

I’m getting the same error

Hey all, unfortunately trigger problems are somewhat hard to debug as n8n doesn’t log the exact requests made when registering the webhook (which are what the GitHub trigger uses behind the scenes).

I’ve tried creating a bunch of GitHub triggers with manually added logging on my end but didn’t run into the problem, so couldn’t reproduce this unfortunately.

As a workaround, you can still register a webhook manually in your GitHub repository like so:

In n8n, make sure to use the right URL (production if you want your workflow to run in the background whenever active, check the documentation for details) and the POST method (which is what GitHub will use):

Finally, in GitHub paste the URL provided by n8n’s webhook node from the previous step and configure the other settings accordingly:

Hope this helps!

Is it because I’m running on Windows 10? I haven’t tried running in the cloud yet.

So your webhook URLs would need to be publicly accessible so GitHub (or any other service for that matter) can send it webhooks. If you expand the Webhook URLs section of the trigger node, does it by any chance show a localhost URL?

On Windows

Test: https://52cyxiptxa0szy6zr32y7ipt.hooks.n8n.cloud/webhook-test/5a54de6a-6e76-4abf-ad51-5755b78a75ac/webhook
Production: https://52cyxiptxa0szy6zr32y7ipt.hooks.n8n.cloud/webhook/5a54de6a-6e76-4abf-ad51-5755b78a75ac/webhook

log

{“code”:0,“message”:“UNKNOWN ERROR - check the detailed error for more information”,“hint”:“”,“context”:{},“name”:“NodeApiError”,“cause”:{“context”:{},“name”:“NodeApiError”,“cause”:{“message”:“404 - {"message":"Not Found","documentation_url":"Repository Webhooks - GitHub Docs“Error: Request failed with status code 404\n at createError (C:\Users\lippe\AppData\Local\Programs\n8n\resources\app\node_modules\axios\lib\core\createError.js:16:15)\n at settle (C:\Users\lippe\AppData\Local\Programs\n8n\resources\app\node_modules\axios\lib\core\settle.js:17:12)\n at IncomingMessage.handleStreamEnd (C:\Users\lippe\AppData\Local\Programs\n8n\resources\app\node_modules\axios\lib\adapters\http.js:269:11)\n at IncomingMessage.emit (node:events:406:35)\n at IncomingMessage.emit (node:domain:470:12)\n at endReadableNT (node:internal/streams/readable:1331:12)\n at processTicksAndRejections (node:internal/process/task_queues:83:21)”},“timestamp”:1661785787595,“message”:“The resource you are requesting could not be found”,“node”:{“parameters”:{“authentication”:“accessToken”,“owner”:“develogo”,“repository”:“game_store”,“events”:[”“]},“name”:“Github Trigger”,“type”:“n8n-nodes-base.githubTrigger”,“typeVersion”:1,“position”:[-1100,160],“webhookId”:“5a54de6a-6e76-4abf-ad51-5755b78a75ac”,“notesInFlow”:true,“retryOnFail”:true,“executeOnce”:true,“alwaysOutputData”:true,“credentials”:{“githubApi”:{“id”:“1”,“name”:“GitHub account”}},“continueOnFail”:true},“httpCode”:“404”,“description”:“Not Found”},“timestamp”:1661785787596,“node”:{“parameters”:{“authentication”:“accessToken”,“owner”:“develogo”,“repository”:“game_store”,“events”:[”"]},“name”:“Github Trigger”,“type”:“n8n-nodes-base.githubTrigger”,“typeVersion”:1,“position”:[-1100,160],“webhookId”:“5a54de6a-6e76-4abf-ad51-5755b78a75ac”,“notesInFlow”:true,“retryOnFail”:true,“executeOnce”:true,“alwaysOutputData”:true,“credentials”:{“githubApi”:{“id”:“1”,“name”:“GitHub account”}},“continueOnFail”:true},“httpCode”:null,“description”:“Not Found”,“stack”:“NodeApiError: UNKNOWN ERROR - check the detailed error for more information\n at Object.githubApiRequest (C:\Users\lippe\AppData\Local\Programs\n8n\resources\app\node_modules\n8n-nodes-base\dist\nodes\Github\GenericFunctions.js:37:15)\n at processTicksAndRejections (node:internal/process/task_queues:96:5)\n at async Object.checkExists (C:\Users\lippe\AppData\Local\Programs\n8n\resources\app\node_modules\n8n-nodes-base\dist\nodes\Github\GithubTrigger.node.js:331:25)\n at async ActiveWorkflowRunner.addWorkflowWebhooks (C:\Users\lippe\AppData\Local\Programs\n8n\resources\app\node_modules\n8n\dist\src\ActiveWorkflowRunner.js:255:39)\n at async ActiveWorkflowRunner.add (C:\Users\lippe\AppData\Local\Programs\n8n\resources\app\node_modules\n8n\dist\src\ActiveWorkflowRunner.js:439:13)\n at async C:\Users\lippe\AppData\Local\Programs\n8n\resources\app\node_modules\n8n\dist\src\Server.js:645:21\n at async C:\Users\lippe\AppData\Local\Programs\n8n\resources\app\node_modules\n8n\dist\src\ResponseHelper.js:90:26”}

Are you using the n8n Desktop version? Do you have a firewall that would block incoming requests?

Yes. I have already disabled the firewall and the error persists.

Testing each individual job works, after activating the flow the error appears.

Here’s some more evidence. This time upload an instance in the digital ocean.?
When I click on “Execute workflow” every flow runs fine. It just gives an error to make it active.
I can pass the test instance password for you to perform tests.

Erro log

{
“code”:0,
“message”:“UNKNOWN ERROR - check the detailed error for more information”,
“hint”:“”,
“context”:{

},
“name”:“NodeApiError”,
“cause”:{
“context”:{},
“name”:“NodeApiError”,
“cause”:{
“message”:"404 - {"message":"Not Found","documentation_url":"Repository Webhooks - GitHub Docs,
“name”:“Error”,
“stack”:“Error: Request failed with status code 404\n at createError (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/createError.js:16:15)\n at settle (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/settle.js:17:12)\n at IncomingMessage.handleStreamEnd (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/adapters/http.js:269:11)\n at IncomingMessage.emit (node:events:525:35)\n at IncomingMessage.emit (node:domain:489:12)\n at endReadableNT (node:internal/streams/readable:1358:12)\n at processTicksAndRejections (node:internal/process/task_queues:83:21)”
},
“timestamp”:1661958317420,
“message”:“The resource you are requesting could not be found”,
“node”:{
“parameters”:{
“authentication”:“oAuth2”,
“owner”:“develogo”,
“repository”:“game_store”,
“events”:[
"
]
},
“id”:“c0f7bd79-40ee-4710-8964-39d4424ed22a”,
“name”:“Github Trigger”,
“type”:“n8n-nodes-base.githubTrigger”,
“typeVersion”:1,
“position”:[
240,
440
],
“webhookId”:“cf800b38-dfc6-4a1e-9c16-a0c1e8a5485e”,
“credentials”:{
“githubOAuth2Api”:{
“id”:“2”,
“name”:“GitHub account 2”
}
}
},
“httpCode”:“404”,
“description”:“Not Found”
},
“timestamp”:1661958317420,
“node”:{
“parameters”:{
“authentication”:“oAuth2”,
“owner”:“develogo”,
“repository”:“game_store”,
“events”:[
"

]
},
“id”:“c0f7bd79-40ee-4710-8964-39d4424ed22a”,
“name”:“Github Trigger”,
“type”:“n8n-nodes-base.githubTrigger”,
“typeVersion”:1,
“position”:[
240,
440
],
“webhookId”:“cf800b38-dfc6-4a1e-9c16-a0c1e8a5485e”,
“credentials”:{
“githubOAuth2Api”:{
“id”:“2”,
“name”:“GitHub account 2”
}
}
},
“httpCode”:null,
“description”:“Not Found”
}


I am facing this issue also.

The workflow executes perfectly but when I try to activate it I get the Github Trigger: Not Found error.

It works great just clicking to execute the workflow on a one-time basis.

Morning,

I have created an internal ticket for this which we will be tracking as n8n-4757, As soon as I have an update I will let you know.

Hi everyone!
I’m getting the same error with Github trigger. I’m trying with Cloud and DigitalOcean.
Is there any progress on this issue?
P.S. Solution with webhook node works fine, but it would be great if the trigger work too

Welcome to the community @andry8791!

Are you sure that is the same issue? That is works when testing but not when activating the workflow? Because I am sadly still totally unable to reproduce this issue. Always works totally fine for me (both testing and in production). Or does it for you never work in your case?

When i clicked the “listen events” button in the GithubTrigger i got the same error like a TS.
I already solved this problem for myself in a similar way as in the solution.
I’m just added the GithubTrigger Webhook URLs to github repo/settings/webhooks and it works

In this case, my assumption be, that there is a problem with the access token or that the account to which the token belongs to does not have the right to listen to those events.