WebHook 'Run Test' claims: Result: Error (Failed to connect)

Running Beta 2.27.2 on Android 8.1

In a webhook widget;
I set a URL, (in the form: http://example.com:8081/nul
(I can supply the actual domain to Blynk devs via PM)
method: POST
Content type: text/plain
Body: EVN=Connect Cab

When I click the run test button, my server gets the POST and returns HTTP 204, but the app claims that it failed to connect!

I wondered if HTTP 204 was confusing it so I sent HTTP 200 and it worked - but only once, now it says it failed to connect no matter if I return HTTP 200 or 204. No idea if the return code has anything to do with it, and 204 should work anyway.

The HTTP call is definitely working perfectly, but the test code thinks it is not working, the problem is that the code that determines if the rule of 10 failures has been exceeded also deems the calls to be failing, and the 11th use of the webhook fails.

I tested the HTTP POST using Restlet client and I do not get any errors or issues reported there. I might add that I also use such calls from IFTTT webhooks and have not had any issues, - but I cant see if their webhook thinks it failed.

I am wondering of the result is being cached, so once it fails, it will fail until the cache is flushed.

It looks like app has troubles connecting via that link, this message means it didn’t received response from the server. Can you use beta app’s build and send the logs from the app?

ok done.

Note HTTP 204 indicates that no content is to be expected.

Servers handling web hooks would typically return HTTP 204

It would show OK if the server returned 200-300 http codes, so this is for sure not the case of http 204, it is due to something else.

1 Like

I think my server is sending an additional space…
I am rebuilding and will test that…

removing the additional space made no difference.
I cant get it to give me another log file.

Looks like it is an issue of http client, that throws an error in your specific case, I’ll try to implement a workaround to this issue.

1 Like