Flowise icon indicating copy to clipboard operation
Flowise copied to clipboard

[BUG] Collect Lead Not Working For More Than One User

Open AsharibAli opened this issue 9 months ago • 9 comments

I was trying out the new "Collect Lead" feature implemented by @0xi4o and encountered the following issue:

The lead form only works once, meaning that after someone fills out the lead form, it does not reappear for anyone else. I tested this using the built-in chat and the embed option, both in production and development environments. However, the form fails to show after being filled out a single time.

@0xi4o , could you please investigate this issue? If I am making a mistake, kindly inform me.

Thank you.

AsharibAli avatar May 04 '24 21:05 AsharibAli

once the lead is filled out, it will saved into local storage so it prevents the same user to see the lead form everytime. Now, if you try opening up in an microsoft edge, or igconito chrome, you should see the form

HenryHengZJ avatar May 05 '24 12:05 HenryHengZJ

Thank you @HenryHengZJ. I understand but there is another issue with the submit button of the "Form Lead" via the embed option. It seems that the button is not working at all and is calling an endpoint on localhost which does not exist. The form only seems to be working on the production flowise dashboard and not via the API/Embed option. When we click on the submit button with the blue arrow, it calls the endpoint which is causing the issue.

POST http://localhost:3000/api/v1/leads/ net::ERR_FAILED

I think the issue is with FlowiseChatEmbed codebase that is causing the issue.

AsharibAli avatar May 05 '24 13:05 AsharibAli

yep the chat embed is not yet pushed with new release, it now is, can you try checking again?

HenryHengZJ avatar May 06 '24 15:05 HenryHengZJ

@AsharibAli this should be resolved can you try again?

HenryHengZJ avatar May 07 '24 15:05 HenryHengZJ

I am using the latest version of the https://github.com/FlowiseAI/FlowiseChatEmbed and it is still calling localhost:3000

titogarrido avatar May 07 '24 22:05 titogarrido

@AsharibAli this should be resolved can you try again?

The bug is not resolved, it's still calling the same API endpoint(POST Request), which doesn't exist.

Dear @0xi4o could you please look at it, just because you implemented this feature, you know it very well than us.

AsharibAli avatar May 08 '24 05:05 AsharibAli

Somehow the apiHost variable is not being used for the "lead" call.

titogarrido avatar May 08 '24 17:05 titogarrido

@titogarrido Yep you're right. apiHost from configuration was not being used.

cc: @AsharibAli

I've opened a PR with the fix: https://github.com/FlowiseAI/FlowiseChatEmbed/pull/152

0xi4o avatar May 09 '24 05:05 0xi4o

Amazing, Thanks for fixing the issue 🔥

AsharibAli avatar May 09 '24 05:05 AsharibAli