Issue with webhook query N8N 0.150.0

Hi,

I’m having issue with webhook query, I try to debug with curl request but it seems there is a bug.

If I do :
curl --request GET http://myserver:5678/webhook-test/tic?data=3

I get :
zsh: no matches found: http://myserver:5678/webhook-test/tic?data=3

If I send data in body of the request :
curl --request GET http://myserver:5678/webhook-test/tic --data 'data=3'

I got the correct response :

{"message":"Workflow got started."}**%**

And everything is fine in N8N GUI :

[

{

"headers": {

"host": "myserver:5678",

"user-agent": "curl/7.64.1",

"accept": "*/*",

"content-length": "6",

"content-type": "application/x-www-form-urlencoded"

},

"params": {

},

"query": {

},

"body": {

"data": "3"

}

}

]

Do you agree that the first type of request through query should work ? I remember I did use this format previously, but I don’t have those workflows anymore.

Is it a bug or I do a mistake somewhere ?

It works just fine for me.

curl --request GET http://localhost:5678/webhook-test/tic?data=3

{“message”:“Workflow got started.”}%

I did try to do it on the server itself, calling localhost like you works.

But if I do it remotly, whatever if I call with DNS name or IP address, it does not work if data are send through query. But it does, on localhost or remotly if I send data through body.

It’s very strange

Ahh, interesting. Did you use the official server setup to deploy n8n? I wonder if it’s something with the reverse proxy traefik.

Yes.

I’m running it on docker with postgres through docker-compose.

version: '3.1'

services:
  postgres:
    image: postgres:14
    restart: always
    environment:
      - POSTGRES_USER
      - POSTGRES_PASSWORD
      - POSTGRES_DB
      - POSTGRES_NON_ROOT_USER
      - POSTGRES_NON_ROOT_PASSWORD
    ports:
      - 5432:5432
    volumes:
      - /home/admin/docker/n8n/init-data.sh:/docker-entrypoint-initdb.d/init-dat
a.sh

  n8n:
    image: n8nio/n8n
    restart: always
    environment:
      - DB_TYPE=postgresdb
      - DB_POSTGRESDB_HOST=postgres
      - DB_POSTGRESDB_PORT=5432
      - DB_POSTGRESDB_DATABASE=${POSTGRES_DB}
      - DB_POSTGRESDB_USER=${POSTGRES_NON_ROOT_USER}
      - DB_POSTGRESDB_PASSWORD=${POSTGRES_NON_ROOT_PASSWORD}
      - N8N_BASIC_AUTH_ACTIVE=true
      - N8N_BASIC_AUTH_USER
      - N8N_BASIC_AUTH_PASSWORD
      - GENERIC_TIMEZONE=Europe/Paris
      - EXECUTIONS_DATA_PRUNE=true
      - EXECUTIONS_DATA_MAX_AGE=336
    ports:
      - 5678:5678
    links:
      - postgres
    volumes:
      - /home/admin/docker/n8n/data:/home/node/.n8n
    # Wait 5 seconds to start n8n to make sure that PostgreSQL is ready
    # when n8n tries to connect to it
    command: /bin/sh -c "sleep 5; n8n start"

I have 2 production workflow working well on it

I did reverse my docker setup to 0.148.0, same behavior

Time to sleep in France, i will look further tomorrow.

If you have any idea, I will be pleased :slight_smile:

Hey @mcc37,

Your problem isn’t really with n8n this is a ZSH issue, if you escape the ? it will work. My guess is when it was working you were using bash but since then you have updated your Mac or set the default shell to be zsh.

Quick option is to always put the url in ’ ’ so…

curl --request GET 'http://myserver:5678/webhook-test/tic?data=3'

That should work or you can do…

noglob curl --request GET http://myserver:5678/webhook-test/tic?data=3

2 Likes

Hi @jon

You are totally right, thanks for the answer.

And now I’ve been able to solve my main issue I was fighting with.

Thanks a lot !

1 Like