<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[TlsFailure - Latenode Webhook]]></title><description><![CDATA[<p dir="auto">Hey team,</p>
<p dir="auto">I use an automation platform called Latenode. It's basically like Zapier but heaps cheaper...</p>
<p dir="auto">I'm playing around with the hub SDK atm. I keep getting a TlsFailure error when sending the request to the Latenode webhook URL though. The SSL cert seems to be all legit on the Latenode end.<br />
<img src="/assets/uploads/files/1728593628151-d4000b30-10c7-4ab5-995a-2eaebbe45686-image.png" alt="d4000b30-10c7-4ab5-995a-2eaebbe45686-image.png" class=" img-responsive img-markdown" /></p>
<p dir="auto">This is the webhook URL:<br />
<a href="https://webhook.latenode.com/9786/dev/276ef231-6ae4-40f0-8643-e65aed2b29bb" rel="nofollow ugc">https://webhook.latenode.com/9786/dev/276ef231-6ae4-40f0-8643-e65aed2b29bb</a></p>
<p dir="auto">(I'll change it when I make the integration live so if that link is dead in a month or so and someone looks at it, it probs wont work).</p>
<p dir="auto">Any ideas? I've tried adding rejectUnauthorized: false into the request, but that hasn't worked.</p>
<p dir="auto"><strong>And this is my code:</strong></p>
<pre><code>var buttonManager = require("buttons");
var http = require("http");
var url = "https://webhook.latenode.com/9786/dev/276ef231-6ae4-40f0-8643-e65aed2b29bb";

function makeRequest(url, button, clickType) {
    var fullUrl = url + `?button_name=${encodeURIComponent(button.name)}&amp;click_type=${encodeURIComponent(clickType)}&amp;battery_status=${encodeURIComponent(button.batteryStatus)}`;
    
    http.makeRequest({
        url: fullUrl,
        method: "GET",
        headers: {"Content-Type": "application/json"}
    }, function(err, res) {
        if (err) {
            console.log("Request error: " + err);
        } else if (res) {
            console.log("Request status: " + res.statusCode);
            if (res.statusCode === 308 &amp;&amp; res.headers["Location"]) {
                // Follow the redirect
                console.log("Following redirect to: " + res.headers["Location"]);
                makeRequest(res.headers["Location"], button, clickType);
            }
        } else {
            console.log("Response is undefined");
        }
    });
}

buttonManager.on("buttonSingleOrDoubleClickOrHold", function(obj) {
    var button = buttonManager.getButton(obj.bdaddr);
    var clickType = obj.isSingleClick ? "click" : obj.isDoubleClick ? "double_click" : "hold";
    
    makeRequest(url, button, clickType);
});

console.log("Started");
</code></pre>
]]></description><link>https://community.flic.io/topic/18481/tlsfailure-latenode-webhook</link><generator>RSS for Node</generator><lastBuildDate>Wed, 11 Nov 2026 00:04:09 GMT</lastBuildDate><atom:link href="https://community.flic.io/topic/18481.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 10 Oct 2024 20:56:25 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to TlsFailure - Latenode Webhook on Mon, 14 Oct 2024 12:10:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.flic.io/uid/5197">@dhtbrowne</a> I just tried. Seems to work fine now.</p>
]]></description><link>https://community.flic.io/post/21545</link><guid isPermaLink="true">https://community.flic.io/post/21545</guid><dc:creator><![CDATA[Emil]]></dc:creator><pubDate>Mon, 14 Oct 2024 12:10:47 GMT</pubDate></item><item><title><![CDATA[Reply to TlsFailure - Latenode Webhook on Mon, 14 Oct 2024 09:48:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.flic.io/uid/57">@Emil</a> Amazing thank you. I have reached out to them and they say they have fixed it now<br />
<a href="https://community.latenode.com/t/flic-webhook-integration/322" rel="nofollow ugc">https://community.latenode.com/t/flic-webhook-integration/322</a></p>
<p dir="auto">Will do some tests in the morning when I have the hub in front of me.</p>
<p dir="auto">Thanks for your help</p>
]]></description><link>https://community.flic.io/post/21544</link><guid isPermaLink="true">https://community.flic.io/post/21544</guid><dc:creator><![CDATA[dhtbrowne]]></dc:creator><pubDate>Mon, 14 Oct 2024 09:48:59 GMT</pubDate></item><item><title><![CDATA[Reply to TlsFailure - Latenode Webhook on Fri, 11 Oct 2024 20:33:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.flic.io/uid/5197">@dhtbrowne</a> The server sends an invalid certificate chain according to <a href="https://datatracker.ietf.org/doc/html/rfc5246" rel="nofollow ugc">https://datatracker.ietf.org/doc/html/rfc5246</a> 7.4.2 Certificate certificate_list:</p>
<blockquote>
<p dir="auto">This is a sequence (chain) of certificates. The sender's certificate MUST come first in the list. Each following certificate MUST directly certify the one preceding it.</p>
</blockquote>
<p dir="auto">This is a trace when connecting to that server:<br />
<img src="/assets/uploads/files/1728678507929-f80466db-03b8-418c-8b5e-78776e68e1ab-image.png" alt="f80466db-03b8-418c-8b5e-78776e68e1ab-image.png" class=" img-responsive img-markdown" /><br />
As you can see, the second certificate is incorrectly duplicated so hence the last one does not certify the one preceeding it.</p>
<p dir="auto">If you go to <a href="https://www.digicert.com/help/" rel="nofollow ugc">https://www.digicert.com/help/</a> you can also see that the server is incorrectly configured (second certificate is duplicated):<br />
<img src="/assets/uploads/files/1728678674107-48706b83-1cd6-40ca-99f1-ec0173f5aeaa-image.png" alt="48706b83-1cd6-40ca-99f1-ec0173f5aeaa-image.png" class=" img-responsive img-markdown" /></p>
<p dir="auto">I suggest you to reach out to the website owner to fix the problem.</p>
]]></description><link>https://community.flic.io/post/21540</link><guid isPermaLink="true">https://community.flic.io/post/21540</guid><dc:creator><![CDATA[Emil]]></dc:creator><pubDate>Fri, 11 Oct 2024 20:33:05 GMT</pubDate></item></channel></rss>