Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outgoing webhook not launched after an Incoming Webhook is called #16238

Open
nabilgasri opened this issue Nov 9, 2020 · 4 comments
Open

Outgoing webhook not launched after an Incoming Webhook is called #16238

nabilgasri opened this issue Nov 9, 2020 · 4 comments
Labels
Area/Integrations A mattermost integration (plugin, integration, etc) Difficulty/1:Easy Easy ticket Hacktoberfest Help Wanted Community help wanted Tech/Go Server

Comments

@nabilgasri
Copy link

Hi everyone!

Summary

Mattermost does not lauch an outgoing webhook after an incoming webhook is called.

Steps to reproduce

1- Create a public channel "test_outgoing"
2- Create an incoming webhook inside the team holding the test_outgoing channel.
3- Create an outgoing webhook. bind it the the channel test_outgoing. example a webhook starting a jenkins build.
4- Send a message to the test_outgoing channel using the "incoming_webhook"

Expected behavior

The outgoing webhook is launched (jenkins build starts)

@amyblais
Copy link
Member

amyblais commented Nov 9, 2020

@nabilgasri What Mattermost server version are you on? What OS and version are you using? Do you see any errors in server logs or developer console?

@nabilgasri
Copy link
Author

nabilgasri commented Nov 28, 2020

@amyblais
There is no errors on the server side.
I reproduced the bug locally with the mattermost-preview docker image. Here how I did:

  1. run mattermost-preview as explained on the documentation

docker run --name mattermost-preview -d --publish 8065:8065 --add-host dockerhost:127.0.0.1 mattermost/mattermost-preview

  1. create a Team and a webhook channel named test_webhook

  2. create an incoming webhook test_incoming_webhook

  3. create an outgoing webhook test_outgoing_webhook, set "http://host_ip/test_in_out_webhhok" as a callback url

  4. go to http://localhost:8065/admin_console/environment/developer and add the http://host_ip to "Allow untrusted internal connections to:" section

  5. run an ngninx server:
    docker run --name ngx-docker -p 80:80 --rm -d nginx

  6. write manually a message on the web page of the channel => logs on nginx show a call to /test_in_out_webhhok

  7. send a message th the incoming webhook
    curl -i -X POST --data-urlencode 'payload={"text": "Hello, this is some text\nThis is more text. :tada:"}' http://localhost:8065/hooks/$hook_id => should have the same erroe as on step 7.

Hope it helps finding the root cause.

@amyblais
Copy link
Member

amyblais commented Dec 7, 2020

@DHaussermann @mickmister Is this something you're able to help test if this is a bug?

@mickmister
Copy link
Member

mickmister commented Dec 9, 2020

@nabilgasri It looks like incoming webhooks have never supported the use case of sending to an outgoing webhook. I've created a ticket here for investigation https://mattermost.atlassian.net/browse/MM-31208

@mickmister mickmister added Area/Integrations A mattermost integration (plugin, integration, etc) Difficulty/1:Easy Easy ticket Hacktoberfest Help Wanted Community help wanted kind/feature Categorizes issue or PR as related to a new feature. Tech/Go Server Up For Grabs labels Dec 9, 2020
@amyblais amyblais removed the kind/feature Categorizes issue or PR as related to a new feature. label Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/Integrations A mattermost integration (plugin, integration, etc) Difficulty/1:Easy Easy ticket Hacktoberfest Help Wanted Community help wanted Tech/Go Server
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants