Cant get github triggers to work

Hi, i am trying to self host (docker) n8n and have successfully ran it using the tunnel feature.
the only problem is that after logging in with the github API and my token and selecting the owner and repository and putting the wildcard as a trigger, i still can’t get any events triggered when listening for them.

i tried pushing to a branch, starring and un-starring but it didn’t trigger anything.
is there something else i need to do ?

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:

Can you try setting up cloudflare tunnel, or ngrok instead of using the --tunnel option?
It’s entirely possible that the tunnel server is overloaded and is acting up.

1 Like

Here is an example repo for setting up ngrok and n8n via docker compose: GitHub - Joffcom/n8n-ngrok

Thanks to @Jon

Thanks for the suggestion, but it didn’t yield any different results, it seems like something more fundamental is not done correctly, and I am not sure what it is.

this is my docker setup with the ngrok container :

version: "3.7"

services:
  n8n:
    image: n8nio/n8n:latest
    container_name: n8n
    restart: unless-stopped
#    command: "start --tunnel"
    networks:
      - n8n-network
    ports:
      - "8031:5678"
    environment:
      - N8N_HOST=http://127.0.0.1
      - N8N_PORT=5678
      - N8N_PROTOCOL=http
      - NODE_ENV=production
      - NGROK_TOKEN=<>
      - WEBHOOK_URL=https://ngrok-free-shark.ngrok-free.app
      - GENERIC_TIMEZONE="Europe/Berlin"
      - N8N_SECURE_COOKIE=false
    volumes:
      - ./n8n_data:/home/node.n8n

  ngrok:
    container_name: ngrok
    image: ngrok/ngrok:latest
    environment:
      - NGROK_AUTHTOKEN=${NGROK_TOKEN}
    command:
      - "start"
      - "--all"
      - "--config"
      - "/etc/ngrok.yml"
    networks:
      - n8n-network
    volumes:
      - ./ngrok.yml:/etc/ngrok.yml


networks:
  n8n-network:
    driver: bridge

could it be that the secure cookies is at fault

The secure cookies should be ok, when it fails what error message do you get if any? Have you also checked in GitHub that the correct url is being registered for your repository?

How are you testing as well is it with the workflow being active and looking in the execution log or are you using the execute button in the editor?

It actually doesn’t visibly fail and it doesn’t show any error messages :
it just hangs in “waiting for trigger” like this :
image

i am testing it in the trigger configuration screen where you have the “test step” button, i just click on it and go to the repository and start and unstar the repo to see if it gets triggered ( i do set the trigger event to the wildcard ).

The repo is my own private repo and the owner is set to me and i can verify both of those by accessing the links provided next to their respective inputs.

What happens if you try a specific event instead of all?

I tried the push event, but that didn’t trigger when i pushed to master branch.

can you check on github’s side. The URL should be something like https://github.com/ORG/REPO/settings/hooks. There you can see if there was a failure on github’s side in delivering the webhook.

Thanks, it seems i didn’t have a webhook setup on github for that repo, which was weirdly and totally obscured step from any documentation i ever saw.

I had an issue with the ngrok setup and that i resolved and now can see the github events. (The built in tunnel did not work for me, kept getting 504 errors from github)
setting up the insecure ssl in the options on n8n did not work, does that concern the tunnel or the app itself?

When you say insecure ssl options do you mean N8N_SECURE_COOKIE? This would have no impact on the tunnel or SSL. I woudl also update your config a bit as you have some bits that are not needed.

I would change all of this

    environment:
      - N8N_HOST=http://127.0.0.1
      - N8N_PORT=5678
      - N8N_PROTOCOL=http
      - NODE_ENV=production
      - NGROK_TOKEN=<>
      - WEBHOOK_URL=https://ngrok-free-shark.ngrok-free.app
      - GENERIC_TIMEZONE="Europe/Berlin"
      - N8N_SECURE_COOKIE=false

To just

    environment:
      - WEBHOOK_URL=https://ngrok-free-shark.ngrok-free.app
      - GENERIC_TIMEZONE="Europe/Berlin"

If you plan to access n8n yourself to use the editor on HTTP instead of using the ngrok url or if you are not using http://localhost:5678 then you would need to set the secure cookie option, Everything else is just default values so might as well only keep what is needed.

1 Like

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