Webhook notifications don't fire

I’ve setup my yaml to send web hooks to my server to notify on build stages.
The build works correctly, and I get fail/success and the resulting build uploads to firebase.
I do not receive any POST request (actually - I receive no request) from Travis CI during the build to my web server.
Here’s my .yaml file:

language: node_js
- "8"
- echo 'Deploy!!'
- echo 'Installing Deps!'
- yarn
- cd functions
- yarn
- cd ..
- echo 'Building!'
- npm run build:release
- npm install -g firebase-tools
- firebase deploy --token "$FIREBASE_TOKEN"
- https://myDomain.com/travis.php
on_success: always # default: always
on_failure: always # default: always
on_start: always # default: never
on_cancel: always # default: always
on_error: always # default: always

Note that I’ve changed the actual API URL for security purposes.
I know that the webhook script work because I trigger it with fetch and postman.
How can I verify that travis is initiating the POST request?


The notification logs are not publicly visible at the moment. We can look at the logs for you if you want to share the build log URL. Otherwise, I suggest emailing support@travis-ci.com, so we can take a look further.

1 Like

Thanks. Here it is: https://api.travis-ci.org/v3/job/460736864/log.txt

According to our logs, this build in question fired the webhook notification successfully at Nov 28 12:03:33 UTC, and again at Nov 28 12:06:33 UTC.

And by “successfully,” I mean that the web server returned a 2xx status.

Somehow missed the header part in the documentation.
It is working flawlessly :slight_smile:

We configure notifications.webhooks using an encrypted url here https://github.com/ruby/ruby/blob/9948addda67f4b7a6e3575f1eba9025f998811d2/.travis.yml#L535-L539.

In recent failed builds like the following ones, it seems we didn’t receive requests to the webhook url:

According to Webhook notifications don't fire, I think I need you to take a look at the logs which are not visible on our side. Could you check notification logs of these builds?

FYI, the last webhook we successfully got was from https://travis-ci.org/github/ruby/ruby/builds/671188703 on Apr 5th.

Today I saw it worked at this job https://travis-ci.org/github/ruby/ruby/builds/677240027. So probably the issue is resolved from today somehow.

We didn’t receive a webhook for https://travis-ci.org/github/ruby/ruby/builds/677961401. So the issue still persists.