I'm trying to troubleshoot webhook event not firing, however even with debug enabled I'm not getting any logs generated.
-rw-rw-r--. 1 1000 1000 5.6M Aug 21 19:59 flarum-2024-08-21.log
-rw-rw-r--. 1 1000 1000 3.9M Aug 22 11:00 fof-best-answer.log
-rw-rw-r--. 1 1000 1000 3.9M Aug 22 12:43 flarum-2024-08-22.log
sh-4.4$ grep -i webhook flarum-2024-08-22.log
sh-4.4$
The post as per screenshot was 6 minutes ago, but the last log entry in flarum-2024-08-22.log
was 10 minutes ago. Any ideas? I can't figure out why the log is not generating. I use the queue driver + scheduler, I tried disabling the queue driver to rule that out but it didn't change anything. I am triggering posts in a tag that has the discussion started & posted events enabled. I've been using it successfully for quite a while and just added this new slack webhook.
Flarum core: 1.8.5
PHP version: 8.0.30
MySQL version: 10.5.22-MariaDB
Loaded extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, json, pcntl, readline, Reflection, SPL, session, standard, sqlsrv, bz2, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, gettext, gmp, iconv, intl, ldap, exif, mysqlnd, PDO, Phar, posix, shmop, SimpleXML, sockets, sqlite3, sysvmsg, sysvsem, sysvshm, tokenizer, xml, xmlwriter, xsl, mysqli, pdo_mysql, pdo_sqlite, xmlreader, zip, Zend OPcache
+------------------------------------------+---------+--------+
| Flarum Extensions | | |
+------------------------------------------+---------+--------+
| ID | Version | Commit |
+------------------------------------------+---------+--------+
| flarum-flags | v1.8.0 | |
| flarum-tags | v1.8.0 | |
| flarum-approval | v1.8.1 | |
| flarum-markdown | v1.8.0 | |
| flarum-mentions | v1.8.3 | |
| flarum-subscriptions | v1.8.0 | |
| v17development-seo | v1.8.1 | |
| askvortsov-rich-text | v2.1.7 | |
| flarum-sticky | v1.8.0 | |
| flarum-lock | v1.8.0 | |
| askvortsov-auto-moderator | v0.1.3 | |
| flarum-likes | v1.8.0 | |
| afrux-forum-widgets-core | v0.1.7 | |
| fof-user-directory | 1.3.3 | |
| fof-follow-tags | 1.2.2 | |
| fof-byobu | 1.3.6 | |
| v17development-blog | v0.7.7 | |
| v17development-user-badges | v1.1.0 | |
| therealsujitk-gifs | v4.1.1 | |
| the-turk-stickiest | 3.0.1 | |
| nearata-tags-color-generator | v2.3.0 | |
| nearata-no-self-likes | v1.2.1 | |
| nearata-internal-links-noreload | v2.2.0 | |
| nearata-gif-avatars | 1.0.0 | |
| nearata-embed-video | 3.3.2 | |
| miniflar-top-like-givers-widget | 0.1.0 | |
| michaelbelgium-discussion-views | v7.2.3 | |
| maicol07-sso | 1.11.5 | |
| isaced-email-verification-switch | 1.0.1 | |
| ianm-log-viewer | 0.1.1 | |
| ianm-follow-users | 1.4.6 | |
| fof-webhooks | 1.2.3 | |
| fof-user-bio | 1.3.2 | |
| fof-upload | 1.5.4 | |
| fof-subscribed | 1.1.4 | |
| fof-socialprofile | 1.1.6 | |
| fof-sitemap | 2.2.1 | |
| fof-profile-image-crop | 1.1.6 | |
| fof-pretty-mail | 1.1.2 | |
| fof-polls | 2.2.2 | |
| fof-links | 1.2.3 | |
| fof-linguist | 1.1.2 | |
| fof-impersonate | 1.1.1 | |
| fof-forum-statistics-widget | 1.2.1 | |
| fof-formatting | 1.0.3 | |
| fof-drafts | 1.2.10 | |
| fof-default-user-preferences | 1.2.1 | |
| fof-best-answer | 1.4.2 | |
| fof-bbcode-tabs | 1.0.3 | |
| fof-bbcode-details | 1.1.2 | |
| fof-analytics | 1.1.0 | |
| flarum-statistics | v1.8.0 | |
| flarum-nicknames | v1.8.0 | |
| flarum-lang-english | v1.8.0 | |
| flarum-emoji | v1.8.0 | |
| davwheat-custom-sidenav-links | 1.0.1 | |
| datlechin-silent-edit | v0.1.0 | |
| datlechin-discussion-overview | v0.0.1 | |
| datitisev-post-galleries | 1.1.1 | |
| darkle-fancybox | 1.1.3 | |
| club-1-cross-references | v1.1.1 | |
| clarkwinkelmann-who-read | 1.4.1 | |
| clarkwinkelmann-prominent-post-numbers | 1.0.1 | |
| clarkwinkelmann-post-bookmarks | 1.0.0 | |
| clarkwinkelmann-mass-actions | 1.1.2 | |
| clarkwinkelmann-follow-tags-prompt | 1.1.0 | |
| clarkwinkelmann-discussion-open-position | 1.1.0 | |
| clarkwinkelmann-composer-page | 1.1.1 | |
| clarkwinkelmann-author-change | 1.0.3 | |
| blomstra-usercard-stats | 0.1.2 | |
| blomstra-sort-order-toggle | 0.2.0 | |
| blomstra-database-queue | 1.1.0 | |
| askvortsov-markdown-tables | v1.2.1 | |
| askvortsov-discussion-templates | v0.8.3 | |
| askvortsov-checklist | v1.3.1 | |
| afrux-top-posters-widget | v0.1.4 | |
| afrux-online-users-widget | v0.1.6 | |
| afrux-news-widget | v0.1.1 | |
| afrux-forum-stats-widget | v0.1.1 | |
+------------------------------------------+---------+--------+
Installation path: /usr/share/nginx/flarum
Queue driver: database
Session driver: file
Scheduler status: Active
Mail driver: smtp
Debug mode: off
Edit: Looks like I had to enable debug on flarum too in order to get the webhook debug logs, is that expected?
[2024-08-22 17:16:06] flarum.DEBUG: [fof/webhooks] Flarum\Post\Event\Posted: webhook 3 --> invalid URL / ignored event
[2024-08-22 17:16:06] flarum.DEBUG: [fof/webhooks] Flarum\Post\Event\Posted: webhook 4 --> invalid URL / ignored event
[2024-08-22 17:16:06] flarum.DEBUG: [fof/webhooks] Flarum\Post\Event\Posted: webhook 5 --> not subscribed
[2024-08-22 17:16:06] flarum.DEBUG: [fof/webhooks] Flarum\Post\Event\Posted: webhook 6 --> not subscribed
[2024-08-22 17:16:06] flarum.DEBUG: [fof/webhooks] Flarum\Post\Event\Posted: webhook 7 --> not subscribed
[2024-08-22 17:16:06] flarum.DEBUG: [fof/webhooks] Flarum\Post\Event\Posted: webhook 10 --> invalid URL / ignored event
[2024-08-22 17:16:06] flarum.DEBUG: [fof/webhooks] Flarum\Post\Event\Posted: webhook 12 --> invalid URL / ignored event
[2024-08-22 17:16:06] flarum.DEBUG: [fof/webhooks] Flarum\Post\Event\Posted: webhook 13 --> invalid URL / ignored event
[2024-08-22 17:16:06] flarum.DEBUG: [fof/webhooks] Flarum\Post\Event\Posted: webhook 14 --> not subscribed
[2024-08-22 17:16:06] flarum.DEBUG: [fof/webhooks] Flarum\Post\Event\Posted: webhook 15 --> invalid URL / ignored event
[2024-08-22 17:16:06] flarum.DEBUG: [fof/webhooks] Flarum\Post\Event\Posted: webhook 16 --> invalid URL / ignored event
[2024-08-22 17:16:06] flarum.DEBUG: [fof/webhooks] Flarum\Post\Event\Posted: webhook 17 --> not subscribed
Webhook 16 (database ID) is the one I'm having issue with, which shows invalid URL / ignored event
. It is a slack webhook with format https://hooks.slack.com/services/XXXXXXX/XXXXXXX/XXXXXXXXXXXXXXX. I'm not sure if that error means it's an invalid URL or just an ignored event? There are two primary tags on the discussion, and I've selected the second primary (sub) tag for the webhook which was working for my previous webhooks.
Update:
Turns out the tag I had this new webhook enabled on had permissions set to members only, however the webhook can only trigger on admin or guest so I had to change my tag to be accessible by guests. All working now!!