WebHooks / HTTP Listener dosn't work after Switch 21 Update

Post Reply
bkromer
Member
Posts: 99
Joined: Thu Jul 11, 2019 10:41 am

WebHooks / HTTP Listener dosn't work after Switch 21 Update

Post by bkromer »

Hi there,

we just updated Switch to the latest Version 21.
So far everything went fine. All Flows are up and running. :!:

But our WebHooks seem not to work anymore.
Also the SwitchHttpListener.exe shows up in task manager from time to time but keeps disappearing afterwards.

I noticed that in the settings Webhooks is stated as "Legacy"!? Maybe there are some changes I am not aware of?

When I call a Switch WebHook at HTTP POST which only takes HTTP not HTTPS I get a "connection refused" error.
I am aware of the Port. And this worked before the update.

Anybody facing the same issue?
Benjamin
Padawan
Advanced member
Posts: 358
Joined: Mon Jun 12, 2017 8:48 pm
Location: Belgium
Contact:

Re: WebHooks / HTTP Listener dosn't work after Switch 21 Update

Post by Padawan »

I noticed that in the settings Webhooks is stated as "Legacy"!? Maybe there are some changes I am not aware of?
The new version added support for webhooks in Node.js scripting. Apparently this works a little differently compared to webhooks in legacy javascript.

The port and settings in the "Webhooks (legacy)" section of the preferences is relevant for:
- the webhooks element in Switch
- all custom scripts in legacy javascript who use webhooks
- all apps and configurators in legacy javascript who use webhooks (Flow Links, ...)
(Basically everything which uses webhooks and which was already available before Switch 2021 fall)

Webhook functionality used by tools written in node.js javascript uses the port set in "Port for the Switch Web Service" property in the "Web services" section of the general Switch preferences.

There is some information on this in notes in the documentation:
https://www.enfocus.com/manuals/UserGui ... tener.html
https://www.enfocus.com/manuals/UserGui ... ences.html

I had issues with Switch 2021 fall in my Flow Links app, but it was not related to webhooks. Based on your error I would advise to: Make sure you are using the correct port/http or https combination which is set in the Webhooks Legacy section of the preferences
bkromer
Member
Posts: 99
Joined: Thu Jul 11, 2019 10:41 am

Re: WebHooks / HTTP Listener dosn't work after Switch 21 Update

Post by bkromer »

Thanks for the support.
I deactivated HTTP and HTTPS WebHooks in the settings which forces Switch to restart.
Then I activated it again (restart again) and then it worked. I restarted Switch and the Server itself multiple times but this didn't solve the problem.

Now everything workes fine and I'am going to update my legacy scripts. :)
Benjamin
Post Reply