[SOLVED] Cannot parse webhook: invalid character 'p' looking for beginning of value

Hello, I recently installed drone and I’m getting this error when I try to push/deploy code on github.

Here’s the full log of the event

{"level":"debug","msg":"cannot parse webhook: invalid character 'p' looking for beginning of value","time":"2020-04-21T10:55:46Z"}
{"fields.time":"2020-04-21T10:55:46Z","latency":69766,"level":"debug","method":"POST","msg":"","remote":"140.82.115.243:34597","request":"/hook?access_token=eyJhbGc...","request-id":"1aqcQFBpe4bSkS3gkyIAFXmbfK3","time":"2020-04-21T10:55:46Z"}

This is my configuration

"AWS_EXECUTION_ENV=AWS_ECS_EC2",
"DRONE_GITHUB_CLIENT_SECRET=ffe...9b23",
"DRONE_LOGS_DEBUG=true",
"ECS_CONTAINER_METADATA_URI=http://.../v3/...",
"DRONE_TLS_AUTOCERT=true",
"DRONE_DATABASE_DATASOURCE=postgres://drone:[email protected]/drone?sslmode=disable",
"DRONE_DATABASE_DRIVER=postgres",
"DRONE_GITHUB_CLIENT_ID=e6...50",
"DRONE_RPC_SECRET=...",
"DRONE_SERVER_HOST=...",
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"GODEBUG=netdns=go",
"XDG_CACHE_HOME=/data",
"DRONE_RUNNER_OS=linux",
"DRONE_RUNNER_ARCH=amd64",
"DRONE_SERVER_PORT=:80",
"DRONE_DATADOG_ENABLED=true",
"DRONE_DATADOG_ENDPOINT=https://stats.drone.ci/api/v1/series"

How can I understand what’s happening?
I already searched in the forum but it seems it’s a different problem rather than signature

I used the environment variable DRONE_DEBUG_DUMP_HOOK=true to find out the problem.

Somehow the repository was configured to send urlencoded payloads, rather than json one.

Deactivating + Reactivating the repository fixed it