# Webhooks don't work

**URL:** <https://community.vikunja.io/t/webhooks-dont-work/1902>\
**Category:** Support\
**Created:** [12 January 2024 18:57 UTC](https://community.vikunja.io/t/webhooks-dont-work/1902 "2024-01-12T18:57:23Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![ISDaddy](https://community.vikunja.io/user_avatar/community.vikunja.io/isdaddy/32/1031_2.png) [@ISDaddy](https://community.vikunja.io/u/ISDaddy)\
**Post date:** [12 January 2024 18:57 UTC](https://community.vikunja.io/t/webhooks-dont-work/1902/1 "2024-01-12T18:57:23Z")

</div>

Whenever an action is supposed to trigger a notification, I see the following in the logs:

| 2024-01-12T18:54:23.739623563Z: ERROR | ▶ models/Handle 1d1 Event payload does not contain task ID |
| --- | --- |
| 2024-01-12T18:54:24.532611241Z: ERROR | ▶ events/func1 1e9 Error while handling message c3463d05-43da-4271-933d-74808d3fde17, subscriber\_poisoned=gochannel.GoChannel, reason\_poisoned=Error 1146 (42S02): Table ‘vikunja.webhooks’ doesn’t exist, topic\_poisoned=task.comment.created, handler\_poisoned=task.comment.created.webhook.listener, payload={task:{id:7,title:test,description:,done:false,done\_at:0001-01-01T00:00:00Z,due\_date:0001-01-01T00:00:00Z,reminders:null,project\_id:6,repeat\_after:0,repeat\_mode:0,priority:0,start\_date:0001-01-01T00:00:00Z,end\_date:0001-01-01T00:00:00Z,assignees:null,labels:null,hex\_color:,percent\_done:0,identifier:,index:1,related\_tasks:null,attachments:null,cover\_image\_attachment\_id:0,is\_favorite:false,created:2024-01-12T17:52:14Z,updated:2024-01-12T18:30:39Z,bucket\_id:9,position:65536,kanban\_position:65536,created\_by:null},comment:{id:10,comment:\u003cp\u003etest\u003c/p\u003e,author:{id:2,name:,username:REDACTED,created:2024-01-12T07:57:11Z,updated:2024-01-12T08:05:46Z},created:2024-01-12T18:54:23.73075706Z,updated:2024-01-12T18:54:23.73076112Z},doer:{id:2,name:,username:REDACTED,created:2024-01-12T07:57:11Z,updated:2024-01-12T08:05:46Z}} |

---

<div class="post-metadata">

**Author:** ![kolaente](https://community.vikunja.io/user_avatar/community.vikunja.io/kolaente/32/5_2.png) [@kolaente](https://community.vikunja.io/u/kolaente)\
**Post date:** [13 January 2024 09:45 UTC](https://community.vikunja.io/t/webhooks-dont-work/1902/2 "2024-01-13T09:45:39Z")

</div>

Related issue: [#1676 - Webhook events task.relation.created and task.relation.deleted doesn't appear to trigger - api - Gitea](https://kolaente.dev/vikunja/api/issues/1676)

Which events did you try?

---

<div class="post-metadata">

**Author:** ![ISDaddy](https://community.vikunja.io/user_avatar/community.vikunja.io/isdaddy/32/1031_2.png) [@ISDaddy](https://community.vikunja.io/u/ISDaddy)\
**Post date:** [13 January 2024 10:14 UTC](https://community.vikunja.io/t/webhooks-dont-work/1902/3 "2024-01-13T10:14:19Z")

</div>

I subscribed to a task and added a comment to it.

---

<div class="post-metadata">

**Author:** ![ISDaddy](https://community.vikunja.io/user_avatar/community.vikunja.io/isdaddy/32/1031_2.png) [@ISDaddy](https://community.vikunja.io/u/ISDaddy)\
**Post date:** [26 January 2024 18:03 UTC](https://community.vikunja.io/t/webhooks-dont-work/1902/4 "2024-01-26T18:03:04Z")

</div>

I’m still getting these errors above in the latest API unstable version.

---

<div class="post-metadata">

**Author:** ![ISDaddy](https://community.vikunja.io/user_avatar/community.vikunja.io/isdaddy/32/1031_2.png) [@ISDaddy](https://community.vikunja.io/u/ISDaddy)\
**Post date:** [26 January 2024 18:06 UTC](https://community.vikunja.io/t/webhooks-dont-work/1902/5 "2024-01-26T18:06:44Z")

</div>

When I GET e.g. https://_ **.** _.\*\*/api/v1/projects/7/webhooks

I get:

> {  
> “message”: “Internal Server Error”  
> }

The API Docker container says:

> handler/ReadAllWeb 284 Error 1146 (42S02): Table ‘vikunja.webhooks’ doesn’t exist

---

<div class="post-metadata">

**Author:** ![ISDaddy](https://community.vikunja.io/user_avatar/community.vikunja.io/isdaddy/32/1031_2.png) [@ISDaddy](https://community.vikunja.io/u/ISDaddy)\
**Post date:** [26 January 2024 18:11 UTC](https://community.vikunja.io/t/webhooks-dont-work/1902/6 "2024-01-26T18:11:10Z")

</div>

My docker stack:

> version: ‘3’
> 
> services:  
> db:  
> image: mariadb:10  
> command: --character-set-server=utf8mb4 --collation-server=utf8mb4\_unicode\_ci  
> environment:  
> USER\_ID: **REDACTED**  
> GROUP\_ID: **REDACTED**  
> MYSQL\_ROOT\_PASSWORD: **REDACTED**  
> MYSQL\_USER: **REDACTED**  
> MYSQL\_PASSWORD: **REDACTED**  
> MYSQL\_DATABASE: **REDACTED**  
> volumes:  
> - /volume1/docker/vikunja/db:/var/lib/mysql  
> restart: unless-stopped  
> api:  
> image: vikunja/api:unstable  
> environment:  
> USER\_ID: **REDACTED**  
> GROUP\_ID: **REDACTED**  
> VIKUNJA\_DATABASE\_HOST: **REDACTED**  
> VIKUNJA\_DATABASE\_PASSWORD: **REDACTED**  
> VIKUNJA\_DATABASE\_TYPE: **REDACTED**  
> VIKUNJA\_DATABASE\_USER: **REDACTED**  
> VIKUNJA\_DATABASE\_DATABASE: **REDACTED**  
> VIKUNJA\_SERVICE\_JWTSECRET: **REDACTED**  
> VIKUNJA\_SERVICE\_FRONTENDURL: **REDACTED**  
> VIKUNJA\_SERVICE\_ENABLEREGISTRATION: 1  
> VIKUNJA\_SERVICE\_ENABLETASKATTACHMENTS: 1  
> VIKUNJA\_SERVICE\_ENABLEEMAILREMINDERS: 1  
> VIKUNJA\_WEBHOOKS\_ENABLED: 1  
> VIKUNJA\_WEBHOOKS\_TIMOUTSECONDS: 180  
> VIKUNJA\_MAILER\_ENABLED: 1  
> VIKUNJA\_DEFAULTSETTINGS\_WEEK\_START: 1  
> VIKUNJA\_MAILER\_HOST: [smtp.gmail.com](http://smtp.gmail.com)  
> VIKUNJA\_MAILER\_PORT: 587  
> VIKUNJA\_MAILER\_USERNAME: **REDACTED**  
> VIKUNJA\_MAILER\_PASSWORD: **REDACTED**  
> volumes:  
> - /volume1/docker/vikunja/files:/app/vikunja/files  
> depends\_on:  
> - db  
> restart: unless-stopped  
> frontend:  
> image: vikunja/frontend  
> restart: unless-stopped  
> proxy:  
> image: nginx  
> ports:  
> - **REDACTED** :80  
> volumes:  
> - /volume1/docker/vikunja/nginx/nginx.conf:/etc/nginx/conf.d/default.conf:ro  
> depends\_on:  
> - api  
> - frontend  
> restart: unless-stopped

Also maybe worth mentioning that I’ve added VIKUNJA\_WEBHOOKS\_ENABLED after the initial instalation in a later restart.

---

<div class="post-metadata">

**Author:** ![kolaente](https://community.vikunja.io/user_avatar/community.vikunja.io/kolaente/32/5_2.png) [@kolaente](https://community.vikunja.io/u/kolaente)\
**Post date:** [27 January 2024 10:36 UTC](https://community.vikunja.io/t/webhooks-dont-work/1902/7 "2024-01-27T10:36:25Z")

</div>

Which migrations were run?

---

<div class="post-metadata">

**Author:** ![ISDaddy](https://community.vikunja.io/user_avatar/community.vikunja.io/isdaddy/32/1031_2.png) [@ISDaddy](https://community.vikunja.io/u/ISDaddy)\
**Post date:** [27 January 2024 10:50 UTC](https://community.vikunja.io/t/webhooks-dont-work/1902/8 "2024-01-27T10:50:47Z")

</div>

I didnt run any migrations. It seems I’m missing something.

---

<div class="post-metadata">

**Author:** ![kolaente](https://community.vikunja.io/user_avatar/community.vikunja.io/kolaente/32/5_2.png) [@kolaente](https://community.vikunja.io/u/kolaente)\
**Post date:** [27 January 2024 17:08 UTC](https://community.vikunja.io/t/webhooks-dont-work/1902/9 "2024-01-27T17:08:49Z")

</div>

Can you check in the `migrations` table which migrations were run?

---

<div class="post-metadata">

**Author:** ![ISDaddy](https://community.vikunja.io/user_avatar/community.vikunja.io/isdaddy/32/1031_2.png) [@ISDaddy](https://community.vikunja.io/u/ISDaddy)\
**Post date:** [27 January 2024 20:09 UTC](https://community.vikunja.io/t/webhooks-dont-work/1902/10 "2024-01-27T20:09:56Z")

</div>

There is no `migrations` table.  
This is what’s in the `migration` table:

| SCHEMA\_INIT | |
| --- | --- |
| 20190324205606 | |
| 20190328074430 | |
| 20190430111111 | |
| 20190511202210 | |
| 20190514192749 | |
| 20190524205441 | |
| 20190718200716 | |
| 20190818210133 | |
| 20190920185205 | |
| 20190922205826 | |
| 20191008194238 | |
| 20191010131430 | |
| 20191207204427 | |
| 20191207220736 | |
| 20200120201756 | |
| 20200219183248 | |
| 20200308205855 | |
| 20200308210130 | |
| 20200322214440 | |
| 20200322214624 | |
| 20200417175201 | |
| 20200418230432 | |
| 20200418230605 | |
| 20200420215928 | |
| 20200425182634 | |
| 20200509103709 | |
| 20200515172220 | |
| 20200515195546 | |
| 20200516123847 | |
| 20200524221534 | |
| 20200524224611 | |
| 20200614113230 | |
| 20200621214452 | |
| 20200801183357 | |
| 20200904101559 | |
| 20200905151040 | |
| 20200905232458 | |
| 20200906184746 | |
| 20201025195822 | |
| 20201121181647 | |
| 20201218152741 | |
| 20201218220204 | |
| 20201219145028 | |
| 20210207192805 | |
| 20210209204715 | |
| 20210220222121 | |
| 20210221111953 | |
| 20210321185225 | |
| 20210328191017 | |
| 20210403145503 | |
| 20210403220653 | |
| 20210407170753 | |
| 20210411113105 | |
| 20210411161337 | |
| 20210413131057 | |
| 20210527105701 | |
| 20210603174608 | |
| 20210709191101 | |
| 20210709211508 | |
| 20210711173657 | |
| 20210713213622 | |
| 20210725153703 | |
| 20210727204942 | |
| 20210727211037 | |
| 20210729142940 | |
| 20210802081716 | |
| 20210829194722 | |
| 20211212151642 | |
| 20211212210054 | |
| 20220112211537 | |
| 20220616145228 | |
| 20220815200851 | |
| 20221002120521 | |
| 20221113170740 | |
| 20221228112131 | |
| 20230307171848 | |
| 20230611170341 | |
| 20230824132533 | |
| 20230828125443 | |
| 20230831155832 | |
| 20230903143017 | |
| 20230913202615 | |
| 20231022144641 | |
| 20231108231513 | |
| 20240114224713 | |

---

<div class="post-metadata">

**Author:** ![ISDaddy](https://community.vikunja.io/user_avatar/community.vikunja.io/isdaddy/32/1031_2.png) [@ISDaddy](https://community.vikunja.io/u/ISDaddy)\
**Post date:** [27 January 2024 20:19 UTC](https://community.vikunja.io/t/webhooks-dont-work/1902/11 "2024-01-27T20:19:21Z")

</div>

These are all the tables that are there:

 ![image](https://community.vikunja.io/uploads/default/original/2X/2/2856fbd65c43a8269c228606bb7b9370198208ac.png)

---

<div class="post-metadata">

**Author:** ![kolaente](https://community.vikunja.io/user_avatar/community.vikunja.io/kolaente/32/5_2.png) [@kolaente](https://community.vikunja.io/u/kolaente)\
**Post date:** [27 January 2024 21:15 UTC](https://community.vikunja.io/t/webhooks-dont-work/1902/12 "2024-01-27T21:15:25Z")

</div>

Does it work if you delete the entry for `20230913202615` and restart the Vikunja api?

Was this a new installation or an upgrade?

---

<div class="post-metadata">

**Author:** ![ISDaddy](https://community.vikunja.io/user_avatar/community.vikunja.io/isdaddy/32/1031_2.png) [@ISDaddy](https://community.vikunja.io/u/ISDaddy)\
**Post date:** [27 January 2024 21:34 UTC](https://community.vikunja.io/t/webhooks-dont-work/1902/13 "2024-01-27T21:34:45Z")

</div>

It was a fresh instalation.  
That seems to have gotten rid of the missing table error, however now when I add a comment to a task I’m still getting this error:

> models/Handle 162 Event payload does not contain task ID

---

<div class="post-metadata">

**Author:** ![kolaente](https://community.vikunja.io/user_avatar/community.vikunja.io/kolaente/32/5_2.png) [@kolaente](https://community.vikunja.io/u/kolaente)\
**Post date:** [27 January 2024 22:28 UTC](https://community.vikunja.io/t/webhooks-dont-work/1902/14 "2024-01-27T22:28:56Z")

</div>

This should be fixed with the latest unstable build, can you check with that?

---

<div class="post-metadata">

**Author:** ![ISDaddy](https://community.vikunja.io/user_avatar/community.vikunja.io/isdaddy/32/1031_2.png) [@ISDaddy](https://community.vikunja.io/u/ISDaddy)\
**Post date:** [27 January 2024 23:50 UTC](https://community.vikunja.io/t/webhooks-dont-work/1902/15 "2024-01-27T23:50:09Z")

</div>

Got the latest API unstable docker image and the issue is still there.

---

<div class="post-metadata">

**Author:** ![ISDaddy](https://community.vikunja.io/user_avatar/community.vikunja.io/isdaddy/32/1031_2.png) [@ISDaddy](https://community.vikunja.io/u/ISDaddy)\
**Post date:** [28 January 2024 09:14 UTC](https://community.vikunja.io/t/webhooks-dont-work/1902/16 "2024-01-28T09:14:15Z")

</div>

This error only happens when I add or update a comment.

This doesn’t appear to be webhook related. I missunderstood that webhooks need to be setup per project manually and tought they worked globally based on actions taken.

---

<div class="post-metadata">

**Author:** ![kolaente](https://community.vikunja.io/user_avatar/community.vikunja.io/kolaente/32/5_2.png) [@kolaente](https://community.vikunja.io/u/kolaente)\
**Post date:** [28 January 2024 12:11 UTC](https://community.vikunja.io/t/webhooks-dont-work/1902/17 "2024-01-28T12:11:57Z")

</div>

Looks like the ci build failed and thus the unstable build you used didn’t contain the fix. The current latest unstable build now has the fix, please pull the update and try again.

---

<div class="post-metadata">

**Author:** ![ISDaddy](https://community.vikunja.io/user_avatar/community.vikunja.io/isdaddy/32/1031_2.png) [@ISDaddy](https://community.vikunja.io/u/ISDaddy)\
**Post date:** [28 January 2024 13:31 UTC](https://community.vikunja.io/t/webhooks-dont-work/1902/18 "2024-01-28T13:31:53Z")

</div>

I can confirm the error is no longer there on the latest unstable version.
