FlowiseAI / Flowise

Drag & drop UI to build your customized LLM flow
https://flowiseai.com
Apache License 2.0
32.05k stars 16.72k forks source link

[BUG] Flowise API not returning anything #1827

Closed SikamikanikoBG closed 9 months ago

SikamikanikoBG commented 9 months ago

Describe the bug

Issue Description:

Environment Setup:

Flowise is operational within a container, hosted on a local network computer with the IP address X.X.X.27, utilizing port 3000. The port is confirmed to be accessible through the firewall settings. The chatflow feature is functioning as intended when tested within the canvas environment. Integration Efforts:

A separate machine with the IP address X.X.X.44 is running Wordpress. A snippet of HTML code (referred to as the WPcode) has been implemented and activated to incorporate the chatflow feature into a Wordpress site. Post-implementation, the chat popup appears on the website as expected, indicating initial success in deployment. Encountered Issue:

Upon initiating a chat through the newly implemented popup on the Wordpress site, the chat does not progress beyond the loading phase, symbolized by a perpetual display of three dots. This suggests that the chatflow is not successfully fetching or sending messages. Network connectivity tests confirm that the Wordpress host machine (X.X.X.44) can communicate with the Flowise service on X.X.X.27:3000 via curl requests, indicating the absence of network-level blocking or port accessibility issues. Additional Diagnostics:

Direct API calls to Flowise from the host machine (X.X.X.27) using Insomnia yield a status code of 200, which typically indicates successful request processing. However, these calls return no results, suggesting an issue with the service's response or data handling. Examination of the chatflow and message logs reveals no record of messages being received from the API, further supporting the existence of a data processing or transmission discrepancy. Summary: The primary issue involves the inability of the chatflow feature, integrated into a Wordpress site, to function as expected. Despite successful network communication tests and the presence of the chat interface on the site, messages are not being processed or displayed. This problem is accompanied by successful API status responses but no actionable data, suggesting a deeper issue within the Flowise service's handling of chat messages or API requests.

To Reproduce Steps to reproduce the behavior:

Create a simple chain Embed in Wordpress Try to chat

Expected behavior The API and chat to work properly

Screenshots image image image image

Flow If applicable, add exported flow in order to help replicating the problem.

Setup

Additional context Add any other context about the problem here.

HenryHengZJ commented 9 months ago

The API should works as expected like this:

image

When you are making direct call via Imsomnia what output result do you see?

SikamikanikoBG commented 9 months ago

image

Insomnia works fine with the provided example, thank you!

The issue with the embedded chatbot on the Wordpress website persists.

The code snippet:

The chatbot somehow cannot connect to the API I assume: image

SikamikanikoBG commented 9 months ago

It was issue with CORS - my webpage was on one server and flowise was hosted on another... Simple fix - host both on one machine.