baptisteArno / typebot.io

💬 Typebot is a powerful chatbot builder that you can self-host.
https://typebot.io
Other
6.8k stars 1.84k forks source link

[Bug] http request not send body #1643

Open mtuliosan opened 1 month ago

mtuliosan commented 1 month ago

I am experiencing an issue with Typebot where it is not sending the values in the body of the request. When I restart the container, it works for a while but then stops sending the values again. There are no error logs, and the Typebot logs show that the request was sent correctly for my specific test and an integration with Baserow. Sending a test request works perfectly, but when I test the flow, it stops sending the values.

I initially thought the issue might be with Baserow, but the same request works fine in Postman. I also considered that the variables might be losing their values, but even with fixed values in the body, it does not work. When I enable the "execute on client" flag, it works, but when testing via WhatsApp using the Evolution API, the flow stops. With this flag active, the JSON is sent normally on the web.

baptisteArno commented 1 month ago

Can you clearly describe it by following this template:

  1. Steps to reproduce
  2. What's happening
  3. What were you expecting

It's even better if you can provide a screen recording.

mtuliosan commented 1 month ago

Steps to reproduce https://drive.google.com/file/d/1R_7r-7-_BC7yHCtpMT8tVyIu-_P5DP3L/view?usp=drive_link

What's happening Not send body in request http POST

What were you expecting send body in request http POST

Deyvi-dev commented 1 month ago

I'm having the same problem myself in the typebot itself from https://app.typebot.io I believe it is something with the Serverless or Edge function in vercel

baptisteArno commented 1 month ago

Can you reproduce the bug by consuming webhook.site URL? AFAIK, the error can come from Baserow

mtuliosan commented 1 month ago

Indeed, I tested it with webhook.site and Baserow, and the body is only not being sent to Baserow. Strangely, when testing from Typebot, it works, but it doesn't work when running the flow. When I restart Typebot, it starts working again. I never have to change anything on Baserow.

mtuliosan commented 1 month ago

Indeed, I tested it via Postman with Baserow and it works normally. The problem only occurs with Typebot. Strangely, when testing from Typebot, it works, but it doesn't work when running the flow. When I restart Typebot, it starts working again. I never have to change anything on Baserow.

@baptisteArno

mtuliosan commented 1 month ago

Steps to reproduce:

Captura de tela de 2024-07-18 00-12-13

Captura de tela de 2024-07-18 00-12-31

Example: https://app.typebot.io/typebots/clyqokouw0027jql9vp8h361m/edit

baptisteArno commented 1 month ago

Can't reproduce so I'll need another example for someone else maybe to guess what's wrong

eltonciatto commented 1 month ago

I'm also facing this error on my self-hosting typebot, in fact, I was going to report it to you before finding this issue, my dev and I discovered, in part, what is causing the problem... We did tests on self-hosting on others servers outside of Vercel, and HTTP Request worked perfectly, however, when it is used in Vercel, both in your version and in mine, it generates this error. (i.e. we have concluded that this is a unique issue using Vercel). We are migrating to Railway and it solved the problem. We looked at everything related to Vercel and didn't consider what it could be.

Translate using Google Translate

eltonciatto commented 1 month ago

We were able to reproduce the error only with typebot on Vercel, using Baserow to save data in the database, it does not save and gives an error in the HTTP Request only in the POST method

baptisteArno commented 1 month ago

So the issue arises only with Baserow? 😂

eltonciatto commented 1 month ago

No, with others served too! I used Baserow as an example.

baptisteArno commented 1 month ago

I just tried with webhook.site, it works just fine so I am confused. Can you provide an easily reproducable example?

eltonciatto commented 1 month ago

IMG-20240715-WA0016.jpg

IMG-20240712-WA0002(2).jpg

The testing we did was both on Baserow and on the Make API.

See images above.

Note: I don't know in which service the user who opened the issue is facing a problem, however, in my tests, there was a problem in both Make and Baserow.

mtuliosan commented 1 month ago

But in your case, you need to add the header Content-Type application/json.

N0N4M3BNS commented 4 weeks ago

My side has a problem too, when using the POST method, my body is not passing. So how do I debug and fix it?

UPDATED: Now the issues already, the header not update to header Content-Type application/json, still pass in text/plain;charset=UTF-8

N0N4M3BNS commented 3 weeks ago

image Block HTTP Request, for header in POST method like have problem, when pass content-type application/json not detect, when pass x-api-key not work too. Someone can answer this issues?

renesamajauskas commented 2 weeks ago

Hello everyone.. I'm new here!

I've been having the same problem for some time now. Today in some tests I realized that this happens after a request is made to OpenAI (in my case).

When I take down the typebot container and start it again, it works again (until there is another request to OpenAI, which causes blank lines to be created in Baserow again)

The last version that worked normally here was 2.24.1... After that, all updates had this same problem

I didn't notice any changes in the logs, either from typebot or baserow...

The request works normally, bringing result 200, but the data is not passed, as people commented